Problem in getting the locale

I have a constructor
public MyBean(){
fc=FacesContext.getCurrentInstance();
bundle =ResourceBundle.getBundle("MyBundle",fc.getViewRoot().getLocale());
System.out.println("View Root locale"+fc.getViewRoot().getLocale().toString());
this.makeForms();
public String makeForms(){}
In the localeBean class i have
public class LocaleBean {
private Log loger=LogFactory.getLog(LocaleBean.class);
private String locale;
public void langEn(ActionEvent actionEvent) {
FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale("en","US"));
this.locale =FacesContext.getCurrentInstance().getViewRoot().getLocale().toString();
public void langAr(ActionEvent actionEvent) {
FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale("ar","SA"));
this.locale =FacesContext.getCurrentInstance().getViewRoot().getLocale().toString();
In JSF i have given
<f:view locale="#{LocaleBean.locale}"> to get the corresponding locale.But when i run the code always i get the locale as English ie ' en ' .It is not changing at all.Can anyone please help me?

I don't see anything wrong with your code, but you haven't given us the sequence of events. When is the locale changed in the LocaleBean? When is the other bean constructed? Etc., etc.

Similar Messages

  • I can't get the local Lowes store with Firefox, IE works fine, why?

    I am having trouble getting to the website of my local Lowes store. I am able to get to lowes.com but when i try to show the store locator to pick a local store nothing happens. It is important to be able to get the local store website so as to be able to see pricing and availability of items. With internet explorer this happens automatically, but not so with Firefox. Any help with this problem would be greatly appreciated. P.S. I did not have this problem with Home Depot.

    PLease could you help me too.  I have been onto support through several emails and online helps and they do not understand the problem correctly and have not resolved it.  I have photoshopcc 2014.  If I click on add layer mask icon I get a white thumbnail.  That seems ok.  I then select a brush - set to normal etc.  all ok.  Then I attempt to either brush in or out on my photo to reveal or hide bits of layer below and it no longer works.
    Weirdly, I noticed it was not selected in channels.  So I checked the layer mask in channels and then back in layers it works except now it works by painting on a rubylith (which it did not do before 2014 version) then when I am done if I click apply mask everything works ok and it is done.  It just does not work unless I select in channels.
    This also happens if I apply an adjustment layer.  The adjustment comes into the thumbnails with a mask and the mask is unselected in channels, I have to select and it paints a ruby lith.
    If I go to layers in the menu however and select layer mask hide all or reveal all then select my brush it works fine and as it normally did before.
    I have tried re installing etc. and every bit of normal advice but nothing works.  Can you help or do you know anyone who can.  As I am desperate here is my email: [email protected]
    thank you

  • Problem in getting the database connection from a connection pool

    Hai All,
    I am facing a problem in getting the database connection from a connection pool created on weblogic server 8.1.
    I am using the Oracle database 8.1.7.
    I have configured my connection pool, datasource and JNDI in weblogic.
    In my java program i have the following code to retrieve the connection.
    import java.sql.*;    
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    class jdbcshp1 {
        public static void main(String[] args) {
         Connection connection = null;
         try {
               Hashtable ht = new Hashtable();
               ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");  // Wanna get rid of this.
               ht.put(Context.PROVIDER_URL,"t3://localhost:7001"); // wanna get rid of this.
               // Get a context for the JNDI look up
               Context ctx = new InitialContext(ht);
            javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("myjndi1");
              //Create a connection object
              connection = ds.getConnection();
         The above code is working fine but, the two ht.put statements are creating problem.
    The problem is, after converting the application into WAR file it can be deployed
    on any machine or different port on same machine. My application fails if its deployed on
    weglogicserver which is at different port.
    Is there any way that i can get rid of those ht.put statements or any other way to solve the problem.
    any help is appreciated.
    Thanks in advance
    Pooja.

    Hai All,
    Firstly, thanks for ur reply.
    Even i have seen some code which uses context constructor with out any parameter and works fine.
    i dont understand why its not working for my code.
    When i remove those ht.put code and use context constructor with out any parameter, it giving an error.
    Context ctx = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("ocjndi");
    connection = ds.getConnection();The error is as follows:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    the above error is forcing me to include those code but if the port number is changed the code will not work. Plz let meknow if some setting have to be made.
    I appreciate all ur valuable help.
    Thanks once again.
    Pooja.

  • Getting the local full path name of a file from an item File Browser

    Hi all,
    I would like to get the local full path name, of a file selected from an item 'File browser'.
    I see in wwv_flow_files the column 'name', but actually it's a kind of id like 'F1542335/myFile.gif' for example.
    What i want is the local path of this file ("C:\Documents and Settings\All Users\....\myFile.gif").
    I hope this is possible??
    Anyway, thanks all for reading.
    Ludo

    Hello, thank you for the answer.
    Please understand that I searched before posting, and not ony 15 min.
    What i mean is that the value of a File Browser in an Apex applocation is something like 'F1542335/myFile.gif', but what I need is the local path location.
    And 'F1542335/' is not the local path location, i can't use it. Or maybe there is a way to convert it in a proper path name, such as "C:\Documents and Settings\....", but I don't think so.
    So my question is : how to get the local path name of a file in Apex?
    I'll answer if I find some good things.
    Thanks
    Ludo
    Edited by: user12945874 on 06-avr.-2010 3:59

  • Problem in getting the function template object from the repository.

    Hi all,
    I have created a par file. I have a JCO connection in that. I am facing problems in getting the function template object from the repository. This thing is running successfully when i try to deploy it in Tomcat. But i am facing problems when i try to deploy it in SAP EP 6.0.
    Below is statement which is giving error after being deployed to SAP EP6.
    This is executing fine when executed in Tomcat Server.
    // getting the object of function template
    IFunctionTemplate functionTemplate =
    aRepository.getFunctionTemplate("YADDNEWUSER");
    Note : YADDNEWUSER is the name of the RFC which I am calling from my JAVA Code.
    Thanks in advance,
    Divija

    This sounds like a bug in the smart upload code. I have used this stuff before, but it's probably an older version, so maybe they broke something. Enumerations aren't usually guaranteed to keep things in any particular order. I would say for now, make a method to take the enumeration and a param name to find the value. And write to the JSPSmart people.

  • When you expand to show local and remote sites, in DW CS6 how do I get the local to be on the left?

    When you expand to show local and remote sites, in the previous verions of DW, the files type (local or remote) selected when not seeing both, automatically came up on the left.  I liked local when I am editing and when I am ready to upload I expand to see both local in remote.  Before, the one you had selected, in my case local, was always displayed on the left.  Now in CS6 when I have local selected before I expand, the local is on the right and remote on the left. For me that is not correct.  I find that having local on the left works best for me like reading, left to right, I want the local on the LEFT so I can put the updated from left to the remote on the right. 
    -->In DW CS6 how do I get the local to be on the left?

    Thank you so much!  That did it! 

  • How can I get the local computer's ID and IP address in Labview?

    I want to get the local computer's ID and IP address, but i found i can't do it in labview.
    Could anybody do me a favor to give me some guidance?
    Thank very much!

    Under the Communication palette, under TCP, there are two functions you need to get this info':  'String to IP' and 'IP to String.'
    1.  Drop the String to IP function on the diagram. 
    2.  Do not wire any input to it. 
    3.  Take its Output and wire it to the 'net address' input of the 'IP to String' 
    5.  Display the Output of the 'IP to String' 
    Depenging on the True/False input to the 'IP to String' function, you get the machine name versus IP address. 
    See attachemnt... guess it's easier than explaining 
    Hope this helps.
    -Khalid
    Attachments:
    ip.png ‏2 KB

  • How to get the local lan connecting all the system names ?

    how to get the local lan connecting all the system names using java?
    any body know then send the coding or solution

    This question is asked and answered repeatedly. Search the forum.

  • Problem about get the workflow context

    There are 2 servers.
    One is Weblogic server (server1), deployed a fusion web project on it.
    Another is BPM server (server2), deployed the bpm process on it.
    On the fusion web project, we use API to get the tasks. But we encountered a problem about get the workflow context.
    There are 2 method to get the workflow context.
    1. getTaskQueryService().authenticate(userId, password, null, null), this method need to pass in useId and password, we can get the user form request but can't get
    password.
    2. getTaskQueryService().createContext(request), we pass the request on server1, but can't get the context on server2, exception thrown.
    Appreciate if you can give some help.

    javax.el.ELException: java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[jcooper, ERole]
         at javax.el.BeanELResolver.getValue(BeanELResolver.java:266)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
         Truncated. see log file for complete stacktrace
    Exception thrown when createContext()

  • Problem in getting the application login page

    Hi Firends,
    I am facing problem in getting the application login page.
    http://localhost:7777/pls/apex/f?p=102:1
    when i am clicking this link it is not directing me to the login page for this application.please let me know what could be the reason behind this.
    Thanks in advance

    Hi Martin, many thanks for replying. Let me know how this could effect in not getting the login page. I have checked in my application,it is by default "No application authorization required " and other option is " must not be a public user " . Should i change it to " must not be a public user from no application authorization required"
    please put more light on it. Y i am saying this because it was working fine day b4r yesterday but today i am getting problem in finding the login page of my application aftr providing the url. i am following the SSO authentication scheme and under Home>Application Builder>Application 102>Shared Components>Edit Security Attributes , i have given f?p=&APP_ID.:1:&SESSION. as home link and under Home>Application Builder>Application 100>Page 101>Edit Page Process, this code i have provided
    wwv_flow_custom_auth_std.login(
    P_UNAME => v('P101_USERNAME'),
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v('APP_SESSION'),
    P_FLOW_PAGE => :APP_ID||':1'
    as a source code.
    i am really stucked into it, and i need to finish is ASAP. Please provide all possible reasons for this problem.

  • Problem with getting the little blackberry icon

    Hi the blackberry I'm using is working and up to date. I was setting up my mates blackberry 9320 but having a problem with getting the little blackberry icon to appear in the top right corner of my phone where the GMS is and signal bar and stuff its something to do with blackberry.
    I tried downloading bbm and it say associating bbm with blackberry id and constant loads with nothing happening bbm not working
    I NEED THE TINY BB ICON AT TOP RIGHT???

    Hi neal123
                            That BlackBerry icon will appear near signal bar when we activate  BIS on a 3G device. Did he activated BIS on his account. ? 
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • I want to reinstall os X yosemite on my macbook Air but i erased the hard drive and i cant get the local recovery option; only internet recovery; is there any way to go back and get local recovery option?

    i want to reinstall os X yosemite on my macbook Air but i erased the hard drive and i cant get the local recovery option; only internet recovery; is there any way to go back and get local recovery option?

    Hi Bockworld1,
    I'm afraid you did an error when erasing your hard-drive, this has automatically erased the "local recovery". In order to pass-by this, you must use a former Mac OS X installation DVD (such as Snow Leopard 10.6.3) and then when updated to 10.6.8 you may access the Mac App Store to recover the Yosemite Installer and proceed to a fresh "update" OR creating a Bootable USB Installation drive with DiskMaker in order to alway get a installation copy.
    I also suggest you to create a USB Basic Operating System (you must select a local USB device to install Yosemite or whatever OS you want) with only the base operating system to launch your computer in case of Main Operating System issues.
    Given the amounts of issues reported by users with 10.10.2, I command you to download 10.10.2 version to get a stable OS working.
    Let me know how it is going.
    Good Luck.

  • Does @Variable() can get the locale infomaiton of the enduser

    hi, all
    like the @Variable('BOUSER') can get the current user of the webi or universe, does @Variable() can get the locale infomaiton of the enduser?
    thanks.

    @Variable provides a default list of options.
    I posted the list in this topic on BOB - scroll down to it:
    http://www.forumtopics.com/busobj/viewtopic.php?t=142539
    The extended discussion also explains that while you can create other parameters, you will be responsible for maintaining them through something like the Windows API.
    Regards,
    Mark

  • Please help, i used to have various colors to select from when selecting FILL in Keynote such as red, now I only have a few pastel colors. I cannot seem to fix this problem to get the original colors back. Can someone please advise what I need to do.

    Please help, i used to have various colors to select from when selecting FILL in Keynote such as red, now I only have a few pastel colors. I cannot seem to fix this problem to get the original colors back. Can someone please advise what I need to do.

    i have on my ipad2 and re-download it - but I can't afford to loose the presentation that I currently have ....??
    Are you using Keynote on an iPad?
    If so you posted in the wrong forum, this is the Keynote Mac discussion and it is a different application. I dont know how the iPad works at all, so I cant help you, post in the Keynote iOS discussion.
    If you are using a Mac, the colours palette is accesed by clicking on the colour well (arrowed) and then selecting a colour chip or changing the color in the colour wheel.

  • Problem with getting the Grouping Separator based on Current Locale

    Hi
    I have created a java swing application. In which I try to get the grouping separator based on System language and location(Control panel).
    But it always take comma as GroupingSeparator.
    I set the region and language to South Africa. Now It should take blank space as a GroupingSeparator but it takes comma.Here is my code:
    private char mcharDecimalSeparator;
    private char mcharGroupingSeparator;
    DecimalFormatSymbols objDecimalFormat;
    mcharDecimalSeparator = objDecimalFormat.getDecimalSeparator();
    mcharGroupingSeparator = objDecimalFormat.getGroupingSeparator();Any help will be appreciated '
    Thanks
    Sonal

    From what I see here I'd say you'd get an NPE at line 4...
    The point is: why do you care?
    You should leave parsing and formatting to localeaware library classes like NumberFormat.
    bye
    TPD

Maybe you are looking for

  • How Do I Convert Windows 10 Pro Technical Preview to Windows 10 Enterprise Technical Preview and Back Without Reinstalling Windows?

    Howdy, Much like in Windows 8 and Windows 8.1, Windows 10 provides you with experience that allows you to convert your Windows 10 Pro Technical Preview to Windows 10 Enterprise Technical Preview without having to reinstall Windows. Why would I need c

  • Satellite A110-195 PSAB0E - sound card has stopped working

    Hello, My sound card has stopped working it was working fine but suddenly the sound quality started to faint and finally it stopped working i have tried the following methods: Realtek is default audio Control Panel/ Sound & Audio Devices/ Audio tab/

  • Aging for Receivables

    Hi Every body, I am logging for first time in SAP FAN CLUB.I hope my beginning will be successful with your help. Our company has configured SAP for new business line. Our requirement is that we want Customer Receivable(Outstanding) ageing for Billin

  • Flash for  Mac 10.5

    I am trying to download Flash for a Mac with a 10.5 operational system. Is there a way to download previous versions of adobe flash?

  • Deploy windows azure worker role

    Hi,    I've created a simple azure worker role which executes few things in the database continuously and I need to deploy this worker role to azure portal. how can i deploy an azure worker role to azure portal. thanks, Snegha