Can't access UIViewRoot from within constructor

the subject actually says it all: When trying to get the locale over getViewRoot().getLocale the first method returns null. in any other method everything is working. how can i get the viewRoot or load the current locale respectively in the constructor?
thanks!

Can't reproduce this problem. It works fine here with latest JSF 1.2.
Backing bean (request scoped):
package mypackage;
import javax.faces.context.FacesContext;
public class MyBean {
    private String value;
    public MyBean() {
        value = FacesContext.getCurrentInstance().getViewRoot().getLocale().toString();
    public String getValue() {
        return value;
}JSF page:
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<!doctype html>
<f:view>
<html>
    <head>
        <title>Test</title>
    </head>
    <body>
        <h:outputText value="#{myBean.value}" />
    </body>
</html>
</f:view>Output:
nl_NL

Similar Messages

  • How can i access the stepname within a steps post-expression?

    How can i access the stepname within a steps post-expression?
    i only saw the step-id of the step: Step.TS.Id
    is there a pssibility to get the stepname from the id?
    thank you!

    Hi Fischer,
    use the expression NameOf(Step).
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • HT5958 This new closed Library system stinks. Now you can't access media from other programs. Any work around?

    Let me start by saying I have been using FCP X for a year now and really love it.  We produce a half hour weekly TV series so I put it through its paces on a weekly bases.
    I was horrified to return from the holidays to find out that an automatic update yielded a whole new file system.  By packaging all of the Final Cut Event and Project folders into a single library file you can no longer access the original media from other programs such as Photoshop and After Effects without making two copies of all of the media.  This really cuts into the pipeline.  In the past we were able to recreate new show opens and transitions quickly from within After Effects by linking to the original media in the event folders to use them as source files in compositions.  The same was true of grabbing frames from Original movies for use in Photoshop for promotional materials.  With the use of the Libraries, ALL OF THE LINKS ARE BROKEN.  Yes I know you can right click on a library and still view the files, yes they are still there, but you can't do that from within another program. 
    This Library system doesn't make any sense.  Its a step back from the old system.  It was much easier, quicker, and efficient to move large event libraries and projects off and on the system and backup using Finder.  Now you have to open up Final Cut to do everything and its a lot slower.
    I want to appeal to any Apple developers who monitor this to return to the old system of file management. 

    Media does not have to be stored inside the library. Use the Consolidate library or event to move it to an external location.

  • Can free online books be downloaded to memory of ipad2 so that book can be accessed when not within wi-fi range

    can free online books be downloaded to memory of ipad2 so that book can be accessed when not within wi-fi range

    It depends on what books you're referring to. All books from the iTunes Store are downloaded to your iPad and except for any special features the book may contain that requires an Internet connection will be readable without such a connection.
    If you're talking about books from some other source, we'd need to know the source before we could offer opinions.
    Regards.

  • How can I access files from a flash drive that were previously saved using a Windows computer? When I attempt to open the file on MacBook Pro, it is asking to "convert file to"; I also have Microsoft Word installed on the Mac as well.

    How can I access files from a flash drive that were previously saved using a Windows computer? When I attempt to open the file on MacBook Pro, it is asking to "convert file to"; none of the options I choose work. I also have Microsoft Office (with Word) installed on the Mac as well.

    Format the external drive as FAT32 or ExFAT. Both computers will then be able to read and write to it.

  • Can i  access apps from itunes on my pc

    can i  access apps from itunes on my pc?
    I want to download my apps to my pc so I can clear some space on my iphone 4.
    Then I can use the space for other things e.g music.
    However at a later date I would like to access these apps and the data they have stored using my PC
    Is this possible?
    Or is this just another Mac problem?

    Most apps will store their data locally on the device. This can be restored from a backup when restoring the device, but if you remove the app any data associated with it is removed, and then subsequently purged from the device's rolling backup set on the next backup. If the app supports iTunes File Sharing you may be able to export its data to your computer, then reimport at a later date when you add the app back to your device.
    tt2

  • How can I access iMessages from iTunes backup?

    I backed up my iPhone since I needed to backup a really large iMessage conversation and I read this was a way to do it
    Now I want to access it from my computer
    how can I do this?

    Anindan wrote:
    how can i access sms from itunes back up
    You will need a Backup Extractor program; there are many available. I use iScavenge for Mac, but there are many more. https://duckduckgo.com/?q=iphone+backup+extractor The one at the top of the search claims to be free, but it is not. Don't be fooled. I can't recommend for or against any of them, except iScavenge, which is OK.
    If you are technically inclined the backup is a SQLite database, so a SQLite browser can also open the backup.

  • Can I access music from multiple accounts on one cpu?

    Can I access music from multiple accounts on one cpu

    Here's one option: http://support.apple.com/kb/PH12366
    But frankly you'd be better off creating unique user accounts on the computer and having seperate iTunes libraries for each user as described here: http://support.apple.com/kb/ht1495

  • How can i share my network from timecapsule to other devices. The thing is i can use access internet from my macbook only.

    I have recently got a Time Capsule with my Macbook pro retina 15". I am trying to setup my time capsule as a wifi station at my home. But the thing is I can only access wifi from my lap only.
    How can I share my network from timecapsule to other devices, and im using OS X 10.8.2
    Please help me!
    Thanks in advance!
    (sorry for the bad english)

    How is the TC currently connected into the network?
    It should work fine in bridge and create a wireless network.. it should already be able to share the network without being the main router.
    Setting up wireless from wireless is difficult.
    I would recommend you buy the USB to ethernet cable Apple sell as an accessory for Air and MBPr so you can actually use ethernet when required.

  • Can not access CRM from outside the office network - Access denied You do not have sufficient access rights or privileges to perform this action.

    Hi,
    I can not access CRM from outside the office network - Access denied You do not have sufficient access rights or privileges to perform this action.  I can access CRM with same user id and password from our office inside the network.  I can get
    the page to give login details once I have login details I got below error. Please help me to solve this issue.  It was working before.
    Access denied You do not have sufficient access rights or privileges to perform this action. 
    Regards,
    Noushad
    [email protected]

    On Premise system Configured with AD FS server for claims-based authentication you need to update your host file with server url to access it from outside office network.
    Refer
    this on how to update host file.
    Regards, Saad

  • How can i access filename from file (sender)

    hi All,
    can anybody tell me
    how can i access filename from file (sender)?
    thank u
    swari

    See:
    "SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean"
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    "Accessing Adapter-Specific Attributes through User Defined Function"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516

  • How can I access images from IPhoto on my Mac to Photoshop CS6

    How can I access images from IPhoto library on my Mac to Photoshop CS6?  I enable jpg with format "Photoshop" and this is what comes up -  "Could not complete your request because Photoshop does not recognize this type of file" 

    MountainArtist wrote:
    …I enable jpg with format "Photoshop" and this is what comes up -  "Could not complete your request because Photoshop does not recognize this type of file" 
    Photoshop is not a format.  It's an application.
    What you are looking at are not true JPEGs, just iPhoto's "tease" representations of the hidden images it swallowed, as explained above.

  • I have a Mac OS X version 10.5.8 and recently got an Iphone4. I can not access Icloud from my computer. Is there any software, new operating system or anything I can purchase that will allow me access to the cloud?

    I have a Mac OS X version 10.5.8 and recently got an Iphone4. I can not access Icloud from my computer. Is there any software, new operating system or anything I can purchase that will allow me access to the cloud?

    Upgrading to Snow Leopard, Lion, or Mountain Lion
    You can upgrade to Mountain Lion from Lion or directly from Snow Leopard. Mountain Lion can be downloaded from the Mac App Store for $19.99. To access the App Store you must have Snow Leopard 10.6.6 or later installed.
    You can purchase Snow Leopard by contacting Customer Service: Contacting Apple for support and service - this includes international calling numbers. The price is $19.99 plus tax. You will receive physical media - DVD - by mail.
    Third-party sources for Snow Leopard are:
    Snow Leopard from Amazon.com
    Snow Leopard from eBay
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store.
    You can purchase Lion by contacting Customer Service: Contacting Apple for support and service - this includes international calling numbers. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
    Be sure your computer meets the minimum requirements:
    Apple - OS X Mountain Lion - Read the technical specifications.
    Macs that can be upgraded to OS X Mountain Lion
      1. iMac (Mid 2007 or newer)
      2. MacBook (Late 2008 Aluminum, or Early 2009 or newer)
      3. MacBook Pro (Mid/Late 2007 or newer)
      4. MacBook Air (Late 2008 or newer)
      5. Mac mini (Early 2009 or newer)
      6. Mac Pro (Early 2008 or newer)
      7. Xserve (Early 2009)
    Are my applications compatible?
    See App Compatibility Table - RoaringApps - App compatibility and feature support for OS X & iOS.
    Am I eligible for the free upgrade?
    See Apple - Free OS X Mountain Lion upgrade Program.
    For a complete How-To introduction from Apple see Apple - Upgrade your Mac to OS X Mountain Lion.
    Model Eligibility for Snow Leopard and Lion.
    Snow Leopard General requirements
      1. Mac computer with an Intel processor
      2. 1GB of memory
      3. 5GB of available disk space
      4. DVD drive for installation
      5. Some features require a compatible Internet service provider; fees may
          apply.
      6. Some features require Apple’s MobileMe service; fees and terms apply.
    Lion System Requirements
      1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or
          Xeon processor
      2. 2GB of memory
      3. OS X v10.6.6 or later (v10.6.8 recommended)
      4. 7GB of available space
      5. Some features require an Apple ID; terms apply.

  • Can't access photos from prior tobut 1/27/10.  Thu ide to desktop.  Giant "!" appears.

    Can't access photos from prior to 1/27/11.  Thumbnails appear, but can't open, email or move them to desktop. Giant "!" appears.

    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library (Right Click -> Show Package Contents) allowing it to overwrite the damaged file.
    2. Download <a href="http://www.fatcatsoftware.com/iplm/"><b><u>iPhoto Library Manager</b></u></a> and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new *iPhoto 08* library:
    Note this will give you a working library with the same Events and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    In the iPhoto Preferences -> Events Uncheck the box at 'Imported Items from the Finder'
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library (Right Click -> Show Package Contents) on your desktop and find the Originals folder. From the Originals folder drag the individual Event Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.

  • Have iPad Air and Apple Wireless Keyboard.  Can I access emoji from the wireless keyboard?

    RE: iPad Air and Apple Wireless Keyboard
       HI,  I have an iPad Air paired with an Apple Wireless Keyboard.  Can I access emoji from the wireless keyboard?
    Thanks for any help on this subject!

    Eureka!   I kept searching and found the solution.   So, if anyone wants to know here is the solution:  press fn and the up arrow on F Keys (top) row (it's the one all way to the right.  The iPad keyboard will then pop up on the iPad and from there you can access the emoji keyboard.

Maybe you are looking for