How to get user browser locale from view object

Hello,
Currently, I have a view object that's used to retrieve localized messages from data base. The resource table looks like the following:
MSG_ID VARCHAR2,  --> specify the L10N resource reference
LOCALE VARCHAR2, --> used to specify the user locale (browser locale)
MESSAGE VARCHAR2  --> real message
I'm creating a bind variable (let's say it 'RequestLocale') in this view object to specify the locale and to get the expected L10N message. Currently, the value for this bind is set as an Expression with value of 'viewObject.DBTransaction.session.locale.toString()'.
After defining the view object (and the bind variable like above), I created a table by dragging the view object to a jsf page, and run and open the page in a web browser. It seems that the messages (specified by the locale) could be retrieved correctly. But once I change the web browser language settings to another preferred language, and refresh the page, I found that the message is still for the previous locale, and not refreshed to the locale (language/country) that's newly set in web browser.
Am I supposed to do more thing to get the 'locale' work by using the adf view object bind variable?
Thanks.

Hi,
after changing the locale, can you try a re-direct of the page to see if this changes the locale. In ADF, the locale is set by the HTTP request handler in the ADF lifecycle ensuring that the locale is passed to the middle tier. So the expected change is to come from the view layer (which is why I think you need a redirect). Another option to check is to access the HttpRequestObject from the FacesContext --> External Application to check the request locale
Frank

Similar Messages

  • How to fetch user specific data from View?

    Hi
    I have a requirement in which I need to display table data specific to Session_user only. Scenario is if user belongs to a specific region he should be able to see data related to that specific region only.
    I am thinking of passing session_user name in view query but do not know whether it's possible or not.If possible how to do this.
    What is the best way to achieve it?
    Thanks
    Vibzz

    Hello
    Vibzz,
    First thing is that you need to implement security in your application, if you configured security then, Take a session scope bean in your un bounded task flow
    inside that session bean , you can get the information from security context, then write a static block inside your session bean and modify the fallowing code according to your requirement
    ADFContext adfc=ADFContext.getCurrent();// get the context instance
    SecurityContext securityContext=adfc.getSecurityContext();// instantiate the SecurityContext
    String username=securityContext.getUserName(); // returns the username from the security Context who are currently logged in
    Once you written this code just assign this username to session scope variable
    Map sessionScope =
    (Map)ADFContext.getCurrent().getSessionScope().put("UserName", username);
    So that the username with the key UserName will be available throughout your session
    and Apply in where clause according to the user logged in, or else you may directly use
    adf.context.securityContext.userName at the bind variable what ever you used inside your view criteria.

  • How to get the Actual Query of View Object

    Hi all,
    I have a standard. I need to modify the query of the VO attached to a picklist based on responsibility. I am able to achieve my requirement but it is getting reflected for all the responsibilities even though i extended the controller for a particular responsibility. I used setQuery() to change the query of my VO. When checking "About this page". The code i added also shown in the page. Now i want to get the actual query to the VO before the controller is extended so that i can set the modified query or actual query based on my responsibility. Kindly share your knowledge.
    Regards,
    Pradeep

    Hi,
    I guess following query will not work ,Why use 2 where clauses.
    SELECT * FROM (select NVL(VENUE_NAME,' ') "Venue",
    NVL(VENUE_CITY,' ') "City",
    NVL(COUNTRY_DESC,' ') "Country",
    EVENT_NUMBER
    From NS_EVENT_VENUE_DETAILS,NS_COUNTRY_MASTER WHERE COUNTRY_CODE = VENUE_COUNTRY) QRSLT WHERE (QRSLT.EVENT_NUMBER = 1539
    you can as following using bind variable.
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcquerying.htm#CEGDGIJH

  • How to get Stored Proc name from ReportClientDoc object (java)

    Post Author: cpriyanka
    CA Forum: Exporting
    We are using Crysta Report 9 and Java.
    We create ReportClientDocument by mentioning report template name ("rassdk://" + report template file path).
    Once I open ReportClientDocument, is there way I can get stored procedure name that is used (associated to report template) to get data in report.
    Thanks,
    Priyanka

    Post Author: cjmorris1201
    CA Forum: Exporting
    Priyanka,
    I am not too sure about the ReportClientDocument and java.
    Where I work we use 8.5, .Net.  We use ttx files to define our data source. 
    I can use something similar to below to retrieve the ttx name programmatically.  Perhaps you can use something similar:
    oCrystalSession.oRpt.Database.Tables.Item(1).Name
    Good luck!

  • How to Remove the Entity usage from View object at runtime

    Hi,
    A ViewObject can be created dynamically based on the Existing ViewObject Defintions. The newly created dynamic ViewObject will have all the defintion including Attributes, its structure along wtih Entity usage of the existing ViewObject definition.
    My requirement is i don't want to have the Entity usage alone whereas Remaining structure need to be retained.
    Can any body suggest on how to do it.
    regards.

    Hi,
    design time or runtime? At designtime, have you tried to just remove the entity reference? Given the disadvantage of removing the entity (and the changed behavior associated with it) what is the use case for which you want to disable the entity reference?
    Frank

  • How to get the extension Info from firefox? Do we have any firefox API to communicate with the browser? I couldnt see the HTML of the widget displayed in the toolbar how to access the widget using JS or any way

    How to get the extension Info from firefox? Do we have any firefox API to communicate with the browser? I couldnt see the HTML of the widget displayed in the toolbar how to access the widget using JS or any way

    Hi,
    Thanks for the suggestion. I've been playing around with some of the classes of the java.net package and java.io
    Using the URL class i can get the content of the data from a STATIC page and output that response to file so that is does not display to the client broswer.
    But this only works if the URL i give points to a static html page.
    So the problem i'm getting is if i'm righting in arguments in the URL, this means that server needs to process the arguments i give and its sends back a dynamic result. Because its dynamic the URL class can not handle this and throws me an exception everytime :(
    Have u ever tried to do some things like this?
    Rahul

  • How to get first row from View Object cache.

    hi,
    I am using Jdeveloper 11.1.1.6
    can we get first row from View Object cache??
    Thanks in Advance.
    Best
    Shashidhar

    Hi Frank,
    Thanks for reply!!
    My case is:
    I have a Query based ViewObject.
    One of the field is LOV and remaining fields are in ADF table. the LOV field is out side ADF table when i insert first record in ADF table and i choose LOV  filed the value is selected.
    when i create second row LOV value got refreshed because both are in same VO.
    I need to get the LOV value of first row and set same value to second Row.
    Shashidhar

  • How to create user in local datasource when UME is already switched to LDAP

    HI,
    Info : I have portal ( NW 700),  recently i switched the datasource of portal to LDAP from local datasource.
    issue: if i create user in portal it get created in LDAP, i want create few users in Local datasource.
    how to create user in local datasource when UME is already switched to LDAP?
    one solution is change the ume back to local datasource > create user > then switch back to LDAP.
    do you know any other sol?
    Regards
    Shridhar Gowda

    Please let me know the Datasource file name .. i.e. the .xml filename.
    try to analyze this name and see whether you get a solution or post it here.
    Reward points if helpful -

  • Get user's locale / Timezone

    Hi
    I am developing Customized Calendar jsp on OCS by
    only using Calendar API(calendarlet.jar) not using Portal API.
    I have problem to get User's Locale/TimeZone that User had set in Preference.
    Calendar API Select and Display baesed on UDT
    CASE :
    " User had choice certain TimeZone in Preference
    then Calendar PKG display time based on User Selected Time-Zone
    but Customized Calender JSP displayed time on UCT "
    How can I get locale/TimeZone that user had set in Calendar Preference ?
    (Using calendar API)

    That's odd. You say that java.util.Date doesn't have
    any timezone in it, but when I insert a breakpoint
    and look at the contents of the object it has a
    sun.util.calendar.BaseCalendar and that has a
    timezone in it. Date != Calendar. A Date is just a long. Like I said, right this second, if you, I, somebody in Chicago, somebody in NY, somebody in London, and somebody in Tokyo all create a Date, the long will be the same for all of us--number of millis since 1/1/1970 00:00:00 GMT. (Note that this does NOT meant that Date "has" a TZ. It does not.) The TZ comes when a String is created from the Date.
    I always just assumed that that
    timezone must be what I was having trouble with.
    As for the DB, I assumed that mysql was timezone
    agnostic, and simply took times in and spit them out
    exactly the same. Are you saying that when I put 8AM
    in, if a person in england had that database that
    same value would read midnight? If so, is there any
    way to make it timezone neutral? It's complicating
    things.It is TZ-agnostic. You're overcomplicating it.
    // In LA, I do
    date = new Date(); // Ignore util.Date/sql.Date/Timestamp distinction for now
    S.o.p(date); // prints out Thu., 9:53 a.m. PDT
    ps = con.prepareStatement("insert into whatever values (?)");
    ps.setDate(1, date);
    ps.executeUpdate();
    // In London, you do
    rs = execute("select * from whatever"); // yeah, I'm fudging the jdbc stuff. Just lazy
    rs.next();
    date = rs.getDate(1); // this Date wraps the same long as my original in LA
    S.o.p(date); // prints out Thu., 5:53 p.m. BST or whatever
    sdf = new SimpleDateFormat(some format);
    sdf.setTimeZone(new york);
    S.o.p(sdf.format(date)); // prints Thu., 12:53 p.m. EDTThe DB stores "N millis since the epoch", or something equivalent. My LA Java and your London Java read that value and interpret it as the same point in time. When we print it, it converts to the appropriate TZ.

  • When user browses away from my html

    Like most of the use of swf, my swf is embedded in an html.
    I'm wondering if I can catch the event in my swf when user browses
    away from the html. Is swf gets unloaded at the time? Can I do
    certain things in actionscript when it happens?
    Help is appreciated.
    thanks,
    Ted

    Hi Ted,
    Tough to say how much you will be able to do as the URL is
    changing,
    but I believe JavaScript has some function like "onUnload"
    that you can
    use. You can then use the fscommand-style call to invoke a
    function in
    your Flash movie to let it now it's about to be gone.
    I haven't tried this though so I don't know how effective it
    is.
    Patrick
    nehcdet wrote:
    > Like most of the use of swf, my swf is embedded in an
    html. I'm wondering if I
    > can catch the event in my swf when user browses away
    from the html. Is swf
    > gets unloaded at the time? Can I do certain things in
    actionscript when it
    > happens?
    >
    > Help is appreciated.
    >
    > thanks,
    > Ted
    >
    http://www.baynewmedia.com
    Faster, easier, better...ActionScript development taken to
    new heights.
    Download the BNMAPI today. You'll wonder how you ever did
    without it!
    Available for ActionScript 2.0/3.0.

  • How to get warranty service claim from nokia c5-03...

    how to get warranty service claim from nokia c5-03 in india because i have problem with nokia c5-03 I Purchase 2 week ago a new nokia c5-03 but from day 1 i facing same problem like 1) app close itself 2) internet browse close if any thing is downloading or downloading over 3) memory full always then i should reboot the phone then it work. 4) ovi map is open it shows memory full close the app So kindly help me how to get warranty service claim from nokia c5-03 in india i am unhappy with nokia c5-03
    Solved!
    Go to Solution.

    i updated software also but the same problem cont... I want to know that nokia will give back money or exchange for other new mobile

  • How to get user logged in to ironport web

    How to get user logged in to ironport web by  their username, time connected and the IP address?

    The onbox reporting can only show what web traffic is currently being surfed.  We can provide a near-real time view of this web traffic with a "Web Tracking Report".
    However, there is not a report available that depicts what you're describing.  (This information is best contained on the domain server).  The closes we could get with the WSA is displaying which credentials we are currently caching.  (Which users we've seen since within the surrogate timeout).  This is possible with the authcache command on the cli.
    ~Tim

  • How to get the current week from sysdate?

    Hi sir,
    i want to know how to get the current week from sysdate?
    thanks

    Hi Nicolas
    It seems you like to check my post and also make commend ;) thanks for your attention
    Have you ever read the posts above and given solutions ?Yes, I did
    Have you read the docs ? Yes, I checked
    What's the added value here ?Did youYou shared doc with solution(long one), I shared short one which point same solution(Check what Joel posted)..So what is benefit, As you can guess oracle docs are sometimes become so complicated as specialy for beginner...(At least it was like that for me and Belive me somedocs are still sooo complicated even for oracle coworkers ) But for you I dont know ;)
    => Why writting the PS in bold ?Why.. Let me think... Ohh Maybe I am looking some questions(many) and even user get answer they should not changed status so I am reading some posts and try to get problem and loosing time..
    So I am putting that PS wiht BOLD because I dont wanna lose time my friend ;) Because While I am trying to help ppl here In same time I am trying to giving support to my customer prod systems. Which mean time is very important for me...
    Hope my answer could satisfy you..
    One important PS for you.. You may not like my posts (or someone) but my friend I become tired to read&answer and make commend to on your comment which is about my posts.
    I am not newbie in forum(At least I fell like that) and I belive I know how I should make post..
    Thank you
    Regards
    Helios

  • How to get auto proxy configuration from plugin?

    I need to retrieve the name of the client's proxy server to pass it along to my signed applet (because it doesn't seem to be getting the information automatically despite the fact that the java plugin is set to the use the browser settings for proxies).
    The Java Plugin loads the proxy server information based on the browser preferences, but I haven't figured out how to retrieve that proxy information from the Plugin itself. Sometimes the javaplugin.proxy.auto.url system property is null, even if the browser (MSIE) is configured to use an auto-configuration script/url for the proxy server configuration. I can see in the Java Console that the plugin knows the auto-config url, so how can I access that property from within my applet?
    Even if javaplugin.proxy.auto.url is not null, I don't know how to call the javascript function at that URL from within the applet to get the proxy server host name and port.
    Does anyone know how to get the proxy information from the plugin?

    Thank you! Indeed, the answer was there, but I hadn't been able to find it earlier (I guess I was searching on the wrong forums). For those who might be interested, here's the thread that helped:
    http://forum.java.sun.com/thread.jsp?forum=30&thread=281981

  • How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?

    How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?
    any idea?

    Hi,
    From your description, my understanding is that you want to get user profile properties in provider-hosted app in SharePoint online using REST API.
    Here is sample code for getting user profile properties:
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    Here is a blog below about accessing data from the provider-host apps:
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • Directv HDDVR connection problem.

    I cannot connect my Directv hddvr receiver to my airport extreme. It says it is connected to the network but not to the internet. Error code 86-830. I have tried everything people have done on the discussion board with no success. I think I need to c

  • How does the interclass call the outerclass's method?

    Compile the following code, public class q extends JFrame class c2 implements ActionListener{ public void actionPerformed(ActionEvent e7){ System.out.println(q.getTitle()); Get the errors: non-static method getTitle() cannot be referenced from a stat

  • Where is iSCSI ? Solaris 10 HW1

    I've searched and seen hints, tips and the existence in Solaris Express but I was wondering if iSCSI initiator support is in the HW1 release and I'm missing it somewhere. As a sidebar, is there a collection of "What's Been Added, Changed or Fixed" fo

  • What are all the buttons for on my x201?

    I recently purchased an x201 Tablet multitouch (2 fingers and pen), and I absolutely love it.  I was wondering if anyone can point me to where I can find a users guide for my new toy.  Specifically, the fn combo actions.  I purchased it refurbished a

  • Date losing HH:MM:SS

    I'm using a oracle.jbo.domain.Date class to persist absolute time/date stamps; these are supposed to be used to trigger execution of an activity at a later date. Unfortunately, I'm seeing the time component being truncated from the Date when it's per