How to get zone selected by the user in the Managed bean code

Hello

In our project, we use af:inputDateto to get details about the information of Date, time, and time zone.

< af:inputDate label = "#{bundle." LABEL_1}.
autoSubmit = 'true '.
value = "#{pageFlowScope.attributeValuesBean.DateTime} '"
valueChangeListener = "#{pageFlowScope.resourceCreateEditBean.pageValueChangedListener} '"
ID = "id3" >
< af:convertDateTime type = "both" timeStyle = timeZone = "#{"long"pageFlowScope.resourceCreateEditBean.preferredTimeZone}" / > "
< / af:inputDate >

the value attribute of date. MinValue is mapped with pageFlowScope.attributeValuesBean.dateTime which is a java.util.Date.

for specific details, I used following code

SimpleDateFormat sdf = new SimpleDateFormat ("dd MMM yyyy hh: mm: z");
String s = sdf.format (date);

which returns the date in the format "dd MMM yyyy hh: mm: z". However, this API will always return timezone of server, and in accordance with our project we need the details of the user selected time zone.

is it possible to get the time zone selected by the user on the dateTime picker?

Ajay,

When LOV TimeZone is active on the date picker, it is not possible to retrieve the time zone selected by the user. There is an enhancement request filed for this feature.

Since this is a known issue, there is a way to accomplish what you want:

(1) the date picker does the conversion of the local time zone to UTC (GMT) time and provides a Java Date object.
In order to bypass this conversion, you can use one of the techniques is:

It's basically asking for the date picker to convert time UTC time UTC (no conversion) :-)

(2) separate the zone LOV the date picker. You can use the function af:getCommonTimeZoneSelectItems() for this purpose.

Tags: Java

Similar Questions

  • How to get a reference to the delivery of the program (not at base of LV)?

    Hello

    I need to create a LV application which will be:

    -Run external executable and not on LV. It has a window of the UI which will open

    -Open PS (no title, menus, etc.) and position it under the user interface

    -If the user moves main UI, LV app FP follows the window

    -If the user closes the main user interface, LV app closes and ends.

    App - LV does not display in the bar of tasks

    So, basically, I need to develop an application that will add-on to an existing GUI, so that together they look and behave like a single user interface.

    The main thing I am struggling with now is how to get a reference to the execution of UI that I call using the exec.vi system

    Help, please!

    What operating system? If you are on Windows, you can try to use the Windows API. Specifically, FindWindow to get a reference to both windows and SetParent to set the parent of one of the windows. This example gives you the basic idea.

  • How to get special characters in the oracle column only

    Hi all

    with spec_tab

    as

    (

    Select ',' col1 of double

    Union

    Select ',' col1 of double

    Union

    Select 'something' double

    )

    Select col1

    of spec_tab

    How to get special characters in the oracle column only

    You mean like this?

    -------------

    WITH spec_tab
         AS (SELECT ',,,,' col1 FROM DUAL
             UNION
             SELECT ',' col1 FROM DUAL
             UNION
             SELECT 'some thing' FROM DUAL)
    SELECT col1
      FROM spec_tab
      where translate('~'||col1,'~0123456789abcdefghijklmnopqrstuvwxyz ','~')<>'~'
    

    Output:

    -----

    COL1

    ,

    ,,,,

    See you soon,.

    Manik.

  • How to get other channels in the channel list.

    Hi experts,

    How to get other channels in the channel list.

    for example

    "Country1, Italy countries2, India, countries3, paris, countries4, scottland, Canada5, rome"

    in the list above, I need to get all the countries and their names separately.

    as countries1, countries2, countries3 countries4 Canada5

    India, paris, Scotland, Italy, rome

    I try the one above in the fashion below

    SELECT SUBSTR

    ("Country1, Italy, countries2, India, countries3, paris, countries4, scottland, Canada5, rome,

    1,

    INSTR

    ("Country1, Italy, countries2, India, countries3, paris, countries4, scottland, Canada5, rome,

    ',',

    1,

    1

    )

    -1

    )

    OF THE DOUBLE

    everything please help me

    If you want the data to be more structured and useful:

    Column collar for a20
    Col col_value to a20

    inlist var VARCHAR2 (2000)

    exec: inlist: = 'Country1, Italy, countries2, India, countries3, paris, countries4, scottland, Canada5, rome;
    exec: inlist: = replace (: inlist,' ')

    Select max (decode (mod(lvl,2), 1, value)) Column
    , max (decode (mod(lvl,2), 0, value)) col_value
    from (select substr (: InList, + 1 start_pos, end_pos-start_pos-1) value)
    lvl
    from (select: InList)
    case when level = 1 then
    0
    on the other
    InStr(:InList,',',1,Level-1)
    end start_pos
    case when instr(:InList,',',1,level) = 0
    then length(:InList) + 1
    on the other
    InStr(:InList,',',1,Level)
    end end_pos
    level lvl
    of the double
    connect by level<>
    )
    )
    ceil(lvl/2) group
    order by 1;
          
    COLUMN COL_VALUE
    ____________________ ____________________
    Country1 Italy
    countries2 India
    countries3 paris
    Scottland countries4
    country5 rome

    Not tested on 10g

    Then you could stragg lines together...

  • How to get a list of the tables more fragmented in Oracle?

    Is there a SQL on how to get a list of the tables more fragmented in the Oracle DBMS?

    Update the statistics on the table and try this, you should see very fragmented tables upstairs with high wasted_space.

    select table_name,round((blocks*8),2) "size (kb)" ,
                                round((num_rows*avg_row_len/1024),2) "actual_data (kb)",
                                (round((blocks*8),2) - round((num_rows*avg_row_len/1024),2)) "wasted_space (kb)"
    from dba_tables
    where (round((blocks*8),2) > round((num_rows*avg_row_len/1024),2))
    order by 4 desc
    

    I changed the query a little because the ORDER BY will not work if we concat | ' Ko ' with the column because this makes the output a character column data.
    And added a WHERE condition to see that these tables where the total size is greater than the actual size of data.

    Published by: zahid79 on July 23, 2010 13:40

  • How to get Firefox to ignore the status of liaison visits when printing?

    How to get Firefox to ignore the status of liaison visits when printing?

    When I print something, visited links are a different color than unvisited links.
    Is there a way to make the color even when printing?
    (without changing the story, or how things look on the screen)

    If there isn't a way to do that, how about this by adding as a feature?

    One way to do would be to create style rules customized for the printed output that hardcode the link colors for all of the printed output. Firefox supports two ways to proceed: a file userContent.css that you create in the folder settings, and a custom stylesheet applied using the Stylish extension.

    However, 'one size fits all' could lead to unreadable results or ugly on some pages. If an add-on that can do adaptive way would be better. I do not know if someone has created a.

    For sites that do not require a login and that are not personalized, you could launch the page in a private window (right click on the link > open in a new private window or copy the URL and then Ctrl + Shift + p, then paste it in the address bar and enter). Because private windows have their own history, the print should not reflect the history of your regular windows.

  • How to get Firefox to check the compatibility of the addon first, then ask me if I want to continue the update of Firefox?

    How to get Firefox to check the compatibility of the add-on first, then ask me if I want to continue the update of Firefox? The update process currently only told me that an add-on has been disable after you apply the update to Firefox. Options > Advanced Options > switch to the update tab, "Warn me if this turns off one of my modules," doesn't seem to work.

    delores51

    This is an add-on that does this.

    https://addons.Mozilla.org/en-us/Firefox/addon/is-it-compatible/

    More specifically, what modules are always appear as incompatible after a Firefox updated? Firefox 10, extensions that are made properly shouldn't be a problem, with a few exceptions.

    Extension that contains a binary code must be compiled for each new version of Firefox. These modules are usually installed by applications on security Norton, McAfee, ZoneAlarm, etc..

  • How to get a program all the list of the names of the values in a registry key?

    Hello

    How to get a program all the list of the names of the values in a key of windows registry without having to configure the number of values in the key?

    Thank you & best regards

    Samuel J

    Hi Samuel,.

    you will get this info from "Query registry key Info.vi".

    Mike

  • Me am XP license key do not have an installation disc. How to get a copy of the Setup disk?

    Recently, I bought an IBM Net Vista original case, a site auction like eBay, but for my country (Serbia). It came with a sticker with a windows XP Professional license print top (with all holograms too, so I think this is authentic). All components in this case are mine (MB, CPU, GPU, RAM...), and I don't have an original Win XP Pro Installation CD. Can I use this license number? If so, how to get a copy of the installation disc?

    Please see: How to replace Microsoft software

  • I'm reading a file mpeg and Windows Media Player C00D1199 error. How to get good download of the missing codec?

    I'm reading a file mpeg and Windows Media Player C00D1199 error.  How to get good download of the missing codec?  I have windows 7 x 64 os.

    All is not lost.

    Download and install a pack of codecs, such as K-Lite (Google for it). You can find THAT WMP can then read the file.

    Or
    Download and install a small program called Gspot (Google it)! Drag and drop in its window one of the files, you can't plzy. It will tell you which codecs are used. You can then download and install the only after doing a search on the web for it.
    See you soon,.
    Jerry
  • How to get a glimpse of the Chrome using Adobe Dreamweaver PHP page?

    How to get an overview of the PHP page on Chrome with Adobe Dreamweaver CS 6 using Xampp. When I click on "Preview in Chrome.pic2.png

    When I click 'Yes' and the site configuration parameter, I don't understand what to do in the server side.

    pic3.png

    Click on the sign (bottom left) to create new server details.   See screenshot.

    Your directory of default web in XAMPP's htdocs.

    Folder on the server: C:\xampp\htdocs\yourSiteName

    Web URL: http://localhost/yourSiteName/

    Don't forget to add the template to your test server (Advanced tab).

    Nancy O.

  • Photography plan Cloud creative student and Teacher Edition (one year) and no idea of how to get and start using the programs?

    So I just brought the creative plan Cloud photography student and Teacher Edition (one year) and no idea of how to get and start using the programs?

    Hello

    Go to creative.adobe.com and you identify with your Adobe ID

    From there, you can download the applications you purchased.

    Normally, you are taken there immediately after the purchase.

  • DOES ANYONE KNOW HOW TO GET THESE IDIOTS ON THE PHONE?

    DOES ANYONE KNOW HOW TO GET THESE IDIOTS ON THE PHONE

    Salvation of barracks,

    We will probably address your issue and would try our best to solve this problem, but we ask to use professional words so that we can help you.

    I beg of you please explain about this, if possible we would guide you with the steps detailed here only.

    In case you want to connect with the Adobe support team, you might check out the following link.

    http://helpx.Adobe.com/x-productkb/global/Service1.html

    Please click on the blue button "Still need help" to connect with one of the Adobe Executive.

    Concerning

    Sukrit diallo

  • How to get a trial for the ADEP license?

    How to get a trial for the ADEP license?

    Hi wedone84 ,

    Please go through the link mentioned for trail downlaod: https://www.adobe.com/cfusion/tdrc/index.cfm?product=adep_experience_services&loc=en_us

    Kind regards

    Romit Sinha

  • How to access the managed bean taskflow action result?

    Hi all
    I have a requirement where I have two areas of text (username and password) and a SignIn button. When the user clicks login, my action managed bean will run the view object and get the password for this user name. And that's why it will compare the password presented by the user and the password came from the view object. I a taskflow, in which I have two points of view, we're signIn page and other is the home page, and the result of the action is successful.
    The managed bean method here signIn Page for SignIn button.

    public String execute() {}
    String EnteredPassword = PassEncrypt();
    ApplicationModule am = ADFUtils.getApplicationModuleForDataControl ("AppModuleDataControl");
    ViewObject myView1 = am.findViewObject("LogindetailsView1");
    System.out.println ("Usrname is" + this.) (Username);
    myView1.setNamedWhereClauseParam ("v_Username", this.) (Username);
    myView1.executeQuery ();
    DCBindingContainer links =
    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    DCIteratorBinding empIter = bindings.findIteratorBinding("LogindetailsView1Iterator");
    String DBPassword = empIter.getCurrentRow ().getAttribute("Password").toString ();

    System.out.println ("password is" + DBPassword);

    {if (EnteredPassword.Equals (dbpassword))}

    Here, I need to call the result of success, which will allow the user to get access to the display of the home page in taskflow.

    }
    else {}
    FacesMessage fm =
    new FacesMessage (FacesMessage.SEVERITY_ERROR, "Please check your name of user and password",
    "Please check your name of user and password");
    FacesContext.getCurrentInstance () .addMessage (null, fm);
    }
    Returns a null value.
    }

    If this can be done using the method call in taskflow then how could use it in my script?
    Please suggest.
    Thank you.

    you have a rule of navigation between these two pages
    If so, simply return the navigation rule name

    if(EnteredPassword.equals(DBPassword)) {
    return "success";
    }
    

Maybe you are looking for

  • Major issues with Satellite S70 - t wireless has

    Hello I received a Satellite - S70t 31/10 and then had some problems wireless. From the start up my computer and began its activities on the internet, I suddenly noticed the sudden slow but also many problems such as the loss of packets and ping (whi

  • Need help with the supervisor password

    Dear support, I would ask you for help. I have a Toshiba Tecra M5 laptop and 4 years when I install it for the first time, I wonder "supervisor password". I entered my private password and everything was fine. Now, I want to change my internal HARD d

  • Clone Stock HDD to new 850 EVO Pro - T440s

    Hi all I was wondering if there is a good tutorial somewhere on the right sequence of steps to successfully clone my HDD to the SSD Pro 850. I'm more curious about what had to be done before, during or after the process of cloning (AHCI?) the bios se

  • Formatting the SD memory card

    I didn't know that it would erase all my pictures to format my memory card! I need them back please help me get my photos from my son back! I tried the trash... and searched through my computer is it past. SOMEONE PLEASE HELP MEEEE!!!!!!!!!!!!!!!!!!!

  • Deskjetf2480 only half a page of printing / takes a long time to do anything

    Ive got, this printer for a while now and to be honest not happy with it. Everything has started using it again and replaced the old ink cartridges. The problem is printing only half a page at a time, then pausing for centuries, then spit it out agai