How to internationalize h:selectOneMenu and select items.

I'm trying to have a web app in different languages which is working fine.
my question is, here I post an example of selectOnemenu
               <h:selectOneMenu value="#{user.gender}">
               <f:selectItem itemValue="1" itemLabel="#{dropdown.male}"/>
               <f:selectItem itemValue="2" itemLabel="#{dropdown.female}"/>
               </h:selectOneMenu>
where it said "dropdown.male" this valude is coming from properties file from the application rather than database or list. I did this because the user can change the language by selecting the appropriate properties file
ex: dropdown_de.properties for Germen Language or dropdown_it.properties for italian.
if the user select female from the dropdown, when I go in editing mode, I want the the first one or the selected one to be first. how I can do that? if it was array or list i could have done it but from the properties file its kind of difficult.
I could not find this solution from books or online. I hope some one has the answer for me.
code example is greatly welcome.
Thank you in advance.

harddisk wrote:
if the user select female from the dropdown, when I go in editing mode, I want the the first one or the selected one to be first. how I can do that? if it was array or list i could have done it but from the properties file its kind of difficult.
I could not find this solution from books or online. I hope some one has the answer for me.I don't clearly understand the problem, but I assume that you want to preselect an item? If so, then you should be presetting the value behind #{user.gender} to 2.

Similar Messages

  • How do i reset safari and what items should I check or delete?

    How do I reset safari and what items should I check or delete

    Reset Safari. OS X 10.8 Mountain Lion/ Safari 6
    Click Safari in the menu bar.
    From the drop down select "Reset Safari".
    Check the box beside each item you want to reset.
    No need to check the box beside "Remove saved names and passwords".
    Click "Reset".
    For more info:  http://support.apple.com/kb/PH11914
    Best.

  • How do I search for and select a repeating phrase in a file.

    How do I search for and select a repeating phrase in a file read via Applescript. The file contains details of phone calls submitted to a charity and I want to be able to analyse the types of call taken. The phrase is 'Type of enquiry' and I want to extract the description that follows. I am a beginner at Applescript and have been working my way through Applescript 1-2-3 but cannot find an obvious solution although I have manged to open and read the file! All suggestions gratefully received.

    In applescript you can use something like the following:
    set {oldTID, my text item delimiters} to {my text item delimiters, "Type of enquiry"}
    set dataBits to text items of textToParse
    set my text item delimiters to oldTID
    the variable dataBits, then, will be a list where every list item is a string that starts with the text following that phrase. 
    You could do regular expressions searches as well, but you'd need to download and install the Satimage osax.

  • How to find total size of selected items in library

    My library contains much more than my 2GB Nano can hold. I frequently change the content of the Nano with songs and books. How can I keep track of the total size of items I'm selecting for the next Nano update to speed my update? Presently I can only guess what to unselect if the selections are of greater size than my Nano will hold.

    There is no direct way to accumulate total file size when selecting a subset of songs within the Library or a Playlist.
    The only way you can manage this is to create an empty Playlist that you can drag songs into. It will accumulate the total size of the songs as you deposit them into it (as described by StarDeb above).
    If you get to a size greater than the nano will hold, then remove one or more songs from that Playlist.
    There is no 'running-total' of only the selected items like Windows Explorer does. Sorry.

  • Lists, groups and selected item

    I'm trying to learn how to work with lists and I'm just not getting it. I've been working on this for days now to no avail.
    My first problem is eachItem is returning only last entry of groupsList instead of the selected specifiedGroup. Then what I would like to do which I'm not too keen on either is, take that selection and match it to one of the choice groups which would contain files or something that the user has preselected previously. Thanks so much! I'm learning a lot of Applescript lately but these lists get the best of me still as I don't fully understand how they work yet. Hoping this will clear my head on things.
    property groupsList : {"List1", "List2", "List3", "List4", "List5"}
    property specifiedGroup : {}
    property choiceOne : {}
    property choiceTwo : {}
    property choiceThree : {}
    property choiceFour : {}
    property choiceFive : {}
    choose from list groupsList
    copy result to specifiedGroup
    log specifiedGroup
    set results to (every item of groupsList)
    repeat with eachItem in results
              if eachItem = specifiedGroup then
                        exit repeat
              end if
    end repeat
    log eachItem

    AppleScript doesn't support variable variables, so you can't refer to variable names like that (at least not in regular AppleScript).  Using a record isn't that much better, because you can't use variables to refer to property keys, either. There are a couple of cheats that use run script, but usually those are more of a pain that they are worth.
    One way that is similar to what you are thinking about would be to create a list of lists, then use your choice to index into that list, for example:
    property groupsList : {"List1", "List2", "List3", "List4", "List5"}
    property choiceOne : {"choiceOne", "this is list 1"}
    property choiceTwo : {"choiceTwo", "this is list 2"}
    property choiceThree : {"choiceThree", "this is list 3"}
    property choiceFour : {"choiceFour", "this is list 4"}
    property choiceFive : {"choiceFive", "this is list 5"}
    set listOfLists to {choiceOne, choiceTwo, choiceThree, choiceFour, choiceFive}
    set theChoice to (choose from list groupsList) as text
    if theChoice is "false" then error number -128 -- cancel
    set specifiedGroup to missing value
    repeat with i from 1 to (count groupsList)
      if item i of groupsList = theChoice then
        set specifiedGroup to item i of listOfLists
        exit repeat
      end if
    end repeat
    log specifiedGroup

  • List and selecting items in it ?

    I use List (element in building GUI). In emulators it works nicely and I have possibility to select one item from the list (I didn't code anything about selecting it) it was automatically added to menu. This is great.
    When running the same app in actual device (Nokia 7210), the "select" is not possible / provided by the phone...Theere is no such element at all. So I actually can't select an item out of list.
    In nokia 7650 this doesn�t occur.
    My mistake, need to program ? .. how to proceed ?
    P

    Funny that mine doesn't work and I have the same firmware version...
    My situation is that I have a List, with items that are ment to be selected.. I need to have commands generally concerning the whole application and commands that are available after user have selected one item from the list.
    This is now done so that I have one List (holding those selectable items...), select button then leads to another list, where I have list of actions available to selected item.
    The previous list also has Commands appended to it.
    These commands are always available, but in phone the List Select button is gone, and accesing that other list (with detailed actions concerning only the selected item) is then impossible.

  • How do I maintain data and selection in a SWF after AutoDetach() is called?

    To date, the behaviour of my Flex panel has been based on the old CS4 sample, which stroked boxes using a thickness value specified in a combobox. Now I need to change the behaviour, but I'm not sure how to go about it.
    At the moment the SWF file is loaded on an xxxxUIPanelSelectionObserver::AutoAttach() and unloaded on the AutoDetach(). I also have code in these functions that attaches to and from subjects in the model plug-in. xxxxUIPanelSelectionObserver is derived from ActiveSelectionObserver.
    When the user collapses/minimizes the UI panel (for example into the sidebar on the RHS), AutoDetach() gets called and consequently the SWF file is unloaded and detaches observers from subjects. Consequently any data I passed to the SWF and any selections made are lost. When the user expands the UI panel, AutoAttach is called, the SWF is reloaded and observers are reattached to subjects.
    This is no good for me. When I collapse the panel I need the SWF to remain loaded and for it to be updated when any changes occur to subjects in the model plug-in.
    One approach would be to do a one time only SWF load/observer attach in xxxxUIPanelSelectionObserver::AutoAttach() and remove code from AutoDetach. But this doesn't sound safe to me and likely to lead to a boss/resource leak somewhere down the line.
    Another would be to store all data and selection information in the C++ UI plug-in and pass that into the SWF when it gets reloaded. But this means duplication of information (especially the selection information).
    The other way would be to alter when AutoAttach() and AutoDetach() get called - ideally I don't want AutoDetach to occur until the application closes. But I have no idea how that could be done.
    Any ideas on how to resolve this would be appreciated.
    Thanks in advance,
    APMABC

    I've spotted two functions - AttachToSelectionSubject() and DetachFromSelectionSubject(). They take ISubject* as an argument.
    Given the desciptions, it sounds like it allows the developer to have more control over when AutoAttach and AutoDetach get called, but as there are no examples of them in use, I'm not sure how tio exploit them.

  • How do I get rid of "Selected Item" window?

    Just updated iTunes to version 7.5 and I notice a window below the listings of my playlists (left side of screen), thus reducing the number of playlists that I can see. I would rather that the "now playing/selected item" window not be there so I can see more of my playlists and reduce scrolling. Is it possible? Thanks.

    If your CDs are marked as Compilations then you can see them by switching on the compilations feature in the browser. Go to Edit>Preferences>General and check the box "Group Compilations when browsing". When you switch the browser on Compilations will be the first item in the Artist pane, click on it and your compilations will then be listed in the Album pane. If you made these CDs yourself you'll need to mark all the tracks as part of a compilation and give them an album name (you can use the name of your playlist for example). To change the info on multiple items such as all the songs in a playlist, click on the first track you want to add information then while holding down the shift key click on the last track in the list, this will highlight all in between. Right click on the list and choose Get Info, you get a dialogue box asking if you want to update multiple items, click Yes and then the Info tab. Type in the album name and choose Yes from the drop down menu below "Compilation" which is on the bottom row of the info window then click ok and this will ensure the whole selection is identical.

  • List and selected item

    Hello,
    I’m having difficulty to understand list items,
    Here is what I need to do, I list item loaded from a table, all looks good
    Now when someone select the item from the list, I would like to put a code
    Behind button (mouse-click) and show selected item in text box (TEXT ITEM)
    Please don’t ask me to help file, I spent over two hours with no chance, looks help file
    Needs help.
    Thanks for any help in advance

    your question isn't clear at all.
    first: When you change the value of a listitem you can use the WHEN-LIST-CHANGED-trigger to do something.
    if you want to transfer the value of a list-item into another item, then you can write this code in the trigger WHEN-LIST-CHANGED
    BEGIN
      :my_block.my_item := my_block.my_listitem;
    END;or do you need something different?

  • How to move to the next Selected Item in a list.

    *Edited*
    I was just wondering how I could make a button which would move the currently selected item to the next in the array loaded into a List component. I would think to do it through AS or an event, but I'm not sure what I would reference in accordance to that component. The help would be appreciated, thank you.

    You can set the selectedIndex. When next button is clicked increment the selectedIndex.
    If( list.selectedIndex < list.dataProvider.length - 1 )
         list.selectedIndex++;

  • How to save the variant and select it for displaying output

    For       ALV variant use the FM_REUSE_ALV_VARIANT_F4 and REUSE_ALV_VARIANT_DEFAULT_GET to allow the user to save the variant and select it for displaying output.If   any of the data (Z fields in VBAP) is blank,the cell in the column must be highlighted in red.

    Hi,
       Refer thsi code
    DATA : wa_variant  TYPE disvariant,       "Work area for variant
           wa_variant1 TYPE disvariant,       "Work area for variant
    *&      Form  sub_get_default_variant                                  *
    This form will initialize the variant                               *
    FORM sub_get_default_variant .
    *--Clear
      CLEAR wa_variant.
    *--Pass the report name
      v_repid = sy-repid.                     "Report ID
      wa_variant-report = v_repid.
    *--Call the function module to get the default variant
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save        = c_save
        CHANGING
          cs_variant    = wa_variant1
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
    *--Check Subrc
      IF sy-subrc = 0.
        p_varnt = wa_variant-variant.
      ENDIF.
    ENDFORM.                                  "sub_get_default_variant
    Regards,
    Prashant

  • HT1491 How do I pay for a selected item and download to myPC

    I am new to iTunes. I want to purchase a song and play from my PC or Android phone and tablet. I could only find a way to add to my wish list. How do I purchase from my search or the wish list?
    Figured out how to purchase! Duh. Now I need to figure out how to load onto a new Apple device.
    Message was edited by: SandyK713

    Howdy SandyK713,
    This article will show you how to use iTunes to get that music onto your Apple Device.
    iOS: Syncing with iTunes
    http://support.apple.com/kb/ht1386
    Take care,
    Sterling

  • How do I reference key for selected item in a LOV?

    Suppose I have an LOV that is populated with user_last_name and user_id. If someone selects a "Jones" how can I reference the user_id for Jones in another SELECT statement?

    Your LOV displays one value and have the value of another.
    Show: Jones
    Value: 999
    So, say you LOV-item has the name :P1_NAME the you can reference it in a select statement using:
    SELECT column1, column2
    FROM table1
    WHERE user_id = :P1_NAME

  • How to suppress blank page and selection criteria in SPOOL ?

    My Z program submits two programs to spool and converts the ABAP List in the spool to PDF and emails.
    After upgrade to ECC6, the first (a report painter report) resulting PDF there was one blank page and the contents were displayed on second page. For the second report (RKPEP003 - CJI3)  the selection criteria that the report used was printed as the first page of output and the result on a subsequent page. The same thing happens when I individually execute these two reports directly in SE38 with the same selection criteria. I believe the blank page is there in the spool because when I view the spool as a RAW, there is a P in the first column, however the spool shows that there is only one page in the first and two in the second (this is true - one for selection criteria "which I don't want" and then the actual content). In 46C, when I look at the RAW view of the spool there is no additional P's in the first column.
    I do not want to have the blank page on the first report and the selection criteria listed on the output of the report. How can I do that ? I am thinking get_print_parameters can in someway get me there, but I am not sure.
    Thanks
    Hari
    Edited by: Hari Sudarsanan on Apr 8, 2009 7:28 PM
    Edited by: Hari Sudarsanan on Apr 8, 2009 8:05 PM

    The first report painter program writes a regular ABAP list.
    The second outputs an ALV.

  • How to get PO number and line item in he check item method of MB_MIGO_BADI

    Hi All,
    First time I am using BADI and I am stuck in one issue.
    I am using CHECK_ITEM method of MB_MIGO_BADI.
    While pressing CHECK button MIGO for a GR(wrt to a PO),a warning message has to displayed.This warning message has to displayed according to the line item in the purchase order.
    In the CHECK_ITEM method, how I will get the PO number and the line item imported into that method.?
    Thanks.

    HI  ,
    in Check_item method 
    DATA: ls_extdata TYPE zqsscrap_screen_field .
    LOOP AT gt_extdata INTO ls_extdata .
    endloop.
    Check what you are getting  .
    regards
    Deepak.

Maybe you are looking for