Getting the rawValue of a Drop-Down list on the "change" event

I am having problems getting the rawValue of a Drop-Down list on the "change" event. It seems that you have to select the same item twice in a row to get the rawValue to be the value of the selected item.
::dropdownlist onChange event::
xfa.host.messageBox(this.rawValue);
On the first time a value is selected you get 'null'. The second time the same value is selected, you get the selected value.
Does anyone have any thoughts on why this is happening? Also, I CANNOT use xfa.event.newText, I need to use the rawValue of the dropdownlist.
Thanks

The change event occurs before the rawValue is changed. If you NEED to use the rawValue you'll need to use a later event. Perhaps you could use exit so that it gets triggered when the field loses focus?
Chris
Adobe Enterprise Developer Support

Similar Messages

  • Drop Down Lists and Value Change Events

    I have 4 drop down lists each with a set of values from the database.
    Based on the value of the first list(ValueChangeEvent only for list1) , I fetch data from the database and set the 'selected value' in the other lists.
    I have a Submit button which takes values from these 4 lists and puts it in the database.
    Problem:
    I change list 2 through list 4 and hit a Submit button which inserts all the values in the database.
    However,on Clicking the Submit button I never get the new selected values, it always refers to the previously fetched values.
    I tried to recreate this case in a Sandbox without a database , Here is the code:
    Page1.jsp
    <h:selectOneMenu id="list1" value="#{SessionBean1.selectedList1}" valueChangeListener="#{SessionBean1.list1ValueChangeListener}"  onchange="this.form.submit();" >
                   <f:selectItems id="dropdown1SelectItems" value="#{SessionBean1.list1}"/>
    </h:selectOneMenu>
      <h:selectOneMenu id="list2" value="#{SessionBean1.selectedList2}" >                           
                  <f:selectItems id="dropdown2SelectItems" value="#{SessionBean1.list2}"/>
       </h:selectOneMenu>
       <h:commandButton id="add" actionListener="#{SessionBean1.addActionListener}" value="Add"/>
        <h:inputText id="result" value="#{SessionBean1.result}" />SessionBean1
       public SessionBean1() {
            list1.add(new SelectItem("0","0"));
            list1.add(new SelectItem("1","1"));
            list1.add(new SelectItem("2","2"));
            list1.add(new SelectItem("3","3"));
            list2.add(new SelectItem("a","a"));
            list2.add(new SelectItem("b","b"));
            list2.add(new SelectItem("c","c"));
            list2.add(new SelectItem("d","d"));
            map.put("0", "a");
            map.put("1", "b");
            map.put("2", "c");
            map.put("3", "d");
        private void fetch_data(String value){
             selectedList2=map.get(value);
        public void list1ValueChangeListener(ValueChangeEvent vce){
                fetch_data(vce.getNewValue().toString());
        public void addActionListener(ActionEvent event){
            result=selectedList2;
        }I tried debugging and found that after the Value Change Event is fired only selectedList1 gets a new value during Update Model Values Phase and selectedList2 still has the old value.
    With this sand box project I cannot even get the second list to show the corresponding value.
    Any insight on this would be helpful

    Thank You Balus C,
    I just realized the reason why this is not working, I found the reason in your article Populating Child Menu's article, I am just
    putting it as a reference here.
    One concern is that the skipping of the UPDATE_MODEL_VALUES will also cause that the new values of the menu's which have immediate="true" set won't be set in the backing bean. This can partly be fixed by getting the new value from the ValueChangeEvent inside the valueChangeListener method and assign it to the appropriate property. But this won't work for other menu's of which the valueChangeListener isn't been invoked. This would cause problems if you select a child menu value and then select the parent menu back to null and then reselect it to same value again, the child menu which will show up again would remain the same selection instead of null while its child will not be rendered! To solve this we need to bind the menu's to the backing bean so that we can use UIInput#setValue() and UIInput#getValue() to set and get the actual values.+ The JSF lifecycle will set and get them in the RESTORE_VIEW and RENDER_RESPONSE phases respectively.+
    I am not sure I understand whether or not it is a limitation but the reason above is valid and I rolled back to binding my menus and getting to work with that.
    Is Binding UI components a wise idea because most of the attributes can be programmed using properties in Backing Beans unless you have to build new components?
    Thanks Again

  • In Firefox 4, how do I get back the context menu for the drop down list of the Location Bar so I can Open Link in New Tab, which I did often in FF 3?

    Firefox 3 has a context menu for the drop down list of
    the Location Bar. One option on this menu I used often
    is "Open Link in New Tab" -- quite convenient.
    This context menu has disappeared in Firefox 4.
    Can I get it back?

    See also:
    *Tools > Options > Privacy > History: "Remember search and form history"
    *https://support.mozilla.org/kb/Form+autocomplete
    The "Use custom settings for history" setting allows to see the current history and cookie settings, but selecting that setting doesn't make any changes to history and cookie settings.<br />
    Firefox shows the "Use custom settings for history" setting as an indication that at least one of the history and cookie settings is not the default to make you aware that changes were made.<br />
    If all History settings are default then the custom settings are hidden and you see "Firefox will: (Never) Remember History".<br />

  • Firefox 3 used to have a drop down list under the back button for recent pages. How do I get this in FF4?

    FF3 used to have a drop down list of the most recent pages that a tab had displayed under the back arrow button. FF4 does not appear to have this. How can I see history of what's been displayed in the tab say four or five pages back?

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • How to Populate a drop down list using the values of a text field?

    Hi,
    I wanted to Populate the items of my drop down list according to the value entered in the textfield above it?
    also the value of list remains consistent in other rows also where i am using the drop down list field.
    Please Try to help me in this query.
    Thanks in Advance!!!
    I am using Javascript in adobe version ES 8.2.

    Part II:
    If you have other items for your droplist(s) that are to appear in addition to the "variable language" entered by a user you can add that to the script.  For example in addition to the Party1 and Party2 name appearing in my droplist I also want the list to have an option for a user to select: The parties jointly.  I add this to the script:
    this.addItem(Party1.rawValue);
    this.addItem(Party2.rawValue);
    this.addItem ("The parties jointly");
    If you have trouble making it work, post a bit of your actual form requirements.

  • Drop Down List - Setting the Default Selected Item

    I have a drop down list in my application that gets populated by a remote database.  When you select an item from the list, a screen full of thumbnails is populated based on the selection.  We have decided that when the user gets to this component in our air application, that it looks too empty and barren.  All that displays is a drop down list with an empty screen.  So we would like to set a default setting for the drop down list so that when the user gets to this component, a screen full of thumbnails is awaiting them and they can change it if they want.  My first instinct was just to set the selectedIndex property of the drop down list to the value that we want as the default, and that works, but it only changes the label in the dropdownlist, it doesn't actually populate the screen with the thumbnails.  That is because when an item is selected, it has to be commited to the drop down list by a CLOSE event that then sets off the close handler that populates the screen with thumbnails.  So after looking at the documentation, I found that there is a method called closeDropDown that states the following:
    closeDropDown
    method
    public function closeDropDown(commit:Boolean):void
    Close the drop-down list and dispatch a DropDownEvent.CLOSE event.
    Parameters
    commit:Boolean — If true, commit the selected data item.
    When I use this method, nothing happens.  In fact if I add a listener for the CLOSE event, the close event isn't getting fired.  So I am a little befuddled.  The only thing that I can figure is that I am setting the selectedIndex and not the selectedItem before I call the closeDropDown method, and if you look above, the documentation vaguely states that that "If true, commit the selected data item".  Do I need to set the selectedItem and not the selectedIndex?  If so, I am not exactly sure how to do this since I am using a service to populate my drop down list which kind of makes the dataprovider a little unclear to me in the code because it gets replaced by an AsyncListView.  Here is what I have.
    <fx:Script>
         <![CDATA[
            protected function dropDownList_creationCompleteHandler(event:FlexEvent):void{
              getAllAudio_descriptionsResult.token = audiodescriptionsService.getAllAudio_descriptions();
              getAllAudioResult.token = audioService.getAllAudio();
         private function audioDescriptionsCallResponderHandler(event:ResultEvent):void {
              audioDesc = event.result as ArrayCollection;
         private function audioCallResponderHandler(event:ResultEvent):void {
              audio = event.result as ArrayCollection;
              audioDescDropDown.selectedIndex = 2;
              audioDescDropDown.closeDropDown(true);
         ]]>
    </fx:Script>
    <fx:Declarations>
         <s:CallResponder id="getAllAudio_descriptionsResult" result="audioDescriptionsCallResponderHandler(event)"/>
         <audiodescriptionsservice:AudiodescriptionsService id="audiodescriptionsService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
         <s:CallResponder id="getAllAudioResult" result="audioCallResponderHandler(event)"/>
         <audioservice:AudioService id="audioService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
    </fx:Declarations>
    <s:DropDownList id="audioDescDropDown" x="43" y="65" width="185" height="34" fontFamily="MyriadProSemiBold"
                        fontSize="15" skinClass="skins.VideoSkins.Video.DropDownSkin"
                        color="0xE6E6E6" selectionColor="0x054F7C" rollOverColor="0x007CBA"
                        creationComplete="dropDownList_creationCompleteHandler(event)" labelField="audioCatName"
                        itemRenderer="renderers.DropDownList3" close="DDLAudioCloseHandler(event)">
         <s:AsyncListView list="{getAllAudio_descriptionsResult.lastResult}"/>
    </s:DropDownList>
    I would really appreciated hearing from anyone who has experience or insight into setting a default for a drop down list and actually forcing it to execute that default selection.  Any thoughts at all would be helpful.  Thanks!

    I don't see your close handler in the code you posted, so if you provided it and I missed seeing it, please forgive me.  I'm a bit unclear on why the open and close of your dropdown list is so critical to your functionality.  It seems to me that the page of data would be tied to the item selected in the drop down (which to my mind is the only purpose for the drop down to be there).  So why do you first need to open and close the drop down, rather than just taking the selected value and doing whatever you'd normally do with it to populate that page?
    What I'm getting at is that I'd expect that page to be a separate component that would just have a property for the selected "thing", and that you could populate it either manually, as I suggested, or through the close handler on your drop down--I wouldn't think that there should be a need to go through the close handler every time.  Even if you don't have it implemented the way I'm thinking, you may want to think about whether you need to go through the close handler every time, or whether you could break it out so that the close handler simply determines which item to select, then jumps to another function that actually does something with the selected value.  That way, you don't have to go through the overhead of opening and closing the drop down if you need to change its value programmatically.
    HTH;
    Amy

  • Changing the size of a drop down list

    Hi Everyone,
    Is there anyway to change the size of a drop down list?  For example, our customer would like to make the drop down list for the Ship-To field on the logistics tab of the sales orders longer.  Currently, they cannot see the full name when they scroll through it.  Is this possible?  Depending on what Customer Code they enter, the field size appears to change.
    Thank you in advance for your help.
    Amanda

    I am using Tahoma size 10 as well. 
    Is the drop down size somehow related to the size of the first few records?  So, if those are shorter than those at the end, perhaps it doesn't adjust for the size of the bottom records.  For example, in our customer's database here's a sampling of what they have entered and the order:
    Wal-Mart 6124
    Wal-Mart 6125
    Wal-Mart 6126
    Wal-Mart 7001
    Wal-Mart Supercenter 1111
    Wal-Mart Supercenter 2094
    Wal-Mart Supercenter 3475
    The drop down box is large enough to see the Wal-Mart 6124, etc. but not large enough to see the Wal-Mart Supercenter ones at the bottom of the list (keep in mind there are over 100 ship-to's for this Business Parnter).  Does it maybe only look at the first fifty records or something like that?
    Thanks again,
    Amanda

  • Custom drop down list for the filter for BEX report

    Hi, all:
    I am writing a query for a BEX report that prompts the user to enter a value for a field "GL account".  I would like to have the user select from a limited number of GL options rather than have the whole Chart of accounts show up. Is there a way to make a "custom" drop down list for the filter?
    Thanks!
    Jenny

    You need to make your GL account info object as an authorization object. And in the info object ,for BEx you need to select the option "only authorized values".
    Create an analyis authorization on gl account and assign the restricted set of GL accounts to the user. Asign this analysis authorization to the user.In the query restrict this infoobject with an authorization variable. This would solve your purpose.user would be able to see only a selected set of GL accounts for which he is authorized.

  • Hide id from drop-down list at the top of the detail tab

    Hello Nakisa experts!
    I have one more question about Nakisa OrgChart 4.0 SP 1.
    How can I hide position and org unti id from drop-down list at the top of detail tab, see picture below:
    Thanks in advance.

    I'm not sure you're going to be able to change this.  I think (but I'm afraid I don't know for sure) the section is defined by \WEB-INF\uitemaplates\com\nakisa\manager\omg\ui\subucs\sectionDesigners\DetailHistoryButtonSectionSubUC.xhtml, which after a quick search through the application looks as though it might be populated by a NakisaTrollBin.jar ... which isn't really something you should be looking to edit.
    Nakisa do often write in various settings that can allow features to be tweaked and enabled/disabled.  It could be that there's something you could add into SettingsResources to apply the change you require, but you would need to contact Nakisa about this as they don't document all of these options.
    All this being said I would query why this is being done.  It is not uncommon to say have multiple positions with the same name - e.g. HR Administrator might exist in several org units.  If you are looking through several identically named org units or positions, the unique identifier is going to be the object's ID.  As such it seems most logical to me to keep the ID in the history to allow a user to discern the difference between identically named positions/org units.
    Regards,
    Stephen.

  • Show the years in a drop down list on page

    Hi All ,
    I'm using jdev 11g .
    I want show the years in a drop down list .can any one suggest me . i want to use as vo attribute .
    thanks advance

    have list of years as static list vo or .. from a read only query.. -> countryvo
    map this vo to the actual VO as a view accessor..
    seelct the attribute that you want to show as list.. then sellect LOV.. choose 'choice list' shuttle the atrributes.. and you are done..

  • How can I change the order in the drop down list of the teamviewer

    HI all
    If I can change the order in the drop down list of the teamviewer?
    example the default is "Direct Reports",I want to change it to the "Employees in Organizational Structure".
    Best Regards

    Cui,
    It is based on OADP. goto SPRo - Integration with other mySAP.com components - business packages/functional packages- manager self services()-Object and data provider-
    Thanks
    Bala Duvvuri

  • BUG: Sorting drop-down lists from the field tab when using "specify item values"

    Hi all,
    I've finished creating my form now, but I came across this whilst writing up my documentation for maintenance tasks.
    This occurs when adding new values to a drop-down list that has the "Specify item values" checkbox in the binding tab checked.
    When I then try to sort my list using the built in sort buttons, it will sort the items, but the list of specified values in the binding tab does not sort reorder to stay with the original items in the list.  This is hapenning when I sort from the Object > Field tab.  If I sort in the Object > Binding tab then the sort will include the specified values.
    For example:
    A    5
    C    2
    D    9
    Add a new value to get:
    A    5
    C    2
    D    9
    B    10
    Sort the list using the button:
    A    5
    B    2
    C    9
    D    10
    But it should be:
    A     5
    B     10
    C     2
    D     9

    I was able to duplicate this problem and it looks like a possible bug.  I've submitted it to support.

  • Get/Set values from a drop down list

    I am trying to modify the http://www.netbeans.org/kb/60/web/web-jpa-part2.html so that instead of entering the data from a text field (in update & add) the values come from a drop down list from a table. I have drop down lists that are populated bothe from the DB and hard coding. When I run, I am able to see the options on the DDs. But none of the CRUD work. I think this is because my set and get for the drop down is wrong. Then again, I also have a few text fields from the original example which also don't seem to work. Here is a piece of my addButton():
            RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
            PaymentDetails[] pv = getSessionBean1().getPaymentVoucher();
            int rowId = Integer.parseInt(selectedRowKeys[0].getRowId());
            PaymentDetails upPV = pv[rowId];
            bankCodeDD.getSelected();
            statusDD.getSelected(); // hard coded value
          upPV.setPrepBy((String) prepByField.getText());
          PaymentDetailsController pvController = new PaymentDetailsController();
            pvController.addPaymentDetails(upPV);
            addRequest = false;
            return null;How do I set and get the values from the drop down so than it passed to my bean? When I choose a row to be updated, make changes and click Update, I get this message on my Tomcat:
    com.sun.webui.jsf.component.DropDown::The current value of component form1:deptCodeDD does not match any of the selections.
    Did you forget to reset the value after changing the options?Can someone please point me to a place which shows how I can add a default value from my DD? I tried to follow http://www.netbeans.org/kb/55/dropdowncomp.html, but unable to complete because I get an error for Options api. The auto-fix imported import org.apache.jasper.Options; But the package given in the tutorial is com.sun.webui.jsf.model.Option. My Java version is 1.6.0_07.
    private Options listOptions[];
    ...//getter setter goes here
    listOptions = new Option[noofDBRows + 1];Many Thanks!

    I don't guess what I may add.
    The contents of the table named lookup appear on the screenshot.
    cell A1 contains the string One-Piece, cell B1 contains the 'associated' value 160.
    cell A2 contains the string Two-Piece, cell B2 contains the 'associated' value 130.
    cell A3 contains the string Three-Quarter, cell B3 contains the 'associated' value 150.
    Now table Main
    In column B the cells contain a pop_up menu with four items like the ones described by Jerrold.
    In column C of the cells contain the formula :
    =IFERROR(VLOOKUP(B,Tableau 2 :: A:B,2,FALSE),"")
    I enhanced it since yesterdays because I forgot to treat the case when cell is blank in column B.
    I apologize but as I'm using my machine in French, the screenshot display the French formulas.
    I repeat that you may find useful infos in the PDFs files which we may download from the menus:
    Help > Numbers User Guide
    Help > iWork Formulas and Functions User Guide
    As you are in Stoke-on-Trent maybe your system is set to use the comma as decimal separator.
    If it's that, you must replace the comma by semi-colons in the formulas (you may see them in my screenshot).
    Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 09:27:53

  • Using the values from a drop down list to display in a separate cell

    Hi all,
    I must apologise if I don;t use the right 'terminology' as I am just an ordinary guy who uses a mac. I am also deaf which means I am totally dependant on the internet for fixing solutions.
    Basically, I wanted to create a drop down list which I had no problem doing.
    In the drop down, I have the options One-Piece, Two-Piece and Three-Quarter.
    I would like to get it so that when I select the One-Piece, the value of 160 appears in a separate cell. If I select Two-Piece, then I would need 130 to appear in that separate cell. Likewise, Three-Quarter to produce 150.
    Just to clarify, if we had a two-column and one row table, then the drop-down would be in A1, which the values would appear in B1.
    I do not know the formula, and cannot find any instructions anywhere as I am probably using the wrong terminology or function name!
    Any help would be much, much appreciated..
    Carl

    I don't guess what I may add.
    The contents of the table named lookup appear on the screenshot.
    cell A1 contains the string One-Piece, cell B1 contains the 'associated' value 160.
    cell A2 contains the string Two-Piece, cell B2 contains the 'associated' value 130.
    cell A3 contains the string Three-Quarter, cell B3 contains the 'associated' value 150.
    Now table Main
    In column B the cells contain a pop_up menu with four items like the ones described by Jerrold.
    In column C of the cells contain the formula :
    =IFERROR(VLOOKUP(B,Tableau 2 :: A:B,2,FALSE),"")
    I enhanced it since yesterdays because I forgot to treat the case when cell is blank in column B.
    I apologize but as I'm using my machine in French, the screenshot display the French formulas.
    I repeat that you may find useful infos in the PDFs files which we may download from the menus:
    Help > Numbers User Guide
    Help > iWork Formulas and Functions User Guide
    As you are in Stoke-on-Trent maybe your system is set to use the comma as decimal separator.
    If it's that, you must replace the comma by semi-colons in the formulas (you may see them in my screenshot).
    Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 09:27:53

  • How to get selected value of a drop down list in CO?

    Hi All,
    Could you plz provide me the code for getting the selected value from the drop down list in CO?
    Thanks
    Debashree

    use pageContext.getParameter("paramName");
    Regards
    Srini

Maybe you are looking for

  • MRP Type V1 does not consider Ext. req. Sales Order after MRP run

    Hi Buddies My client wants to use MRP Type V1 which should consider re-order point as well as external requirement (i.e. Sales Order) for net requirement calculation.However when i tried using V1 in material master and ran MD03 it only considered re-

  • 1080p from computer to TV

    Hey guys, hope this is an ok topic/question to post in the FCP area. I just purchased a beautiful 52" 1080p LCD tv. Of course the only way to see truu 1080p res is through hi-def dvd or blue ray which I don't have. But I have downloaded a couple of 1

  • Blocking in tcodes

    hi..i blocked the se38 using sm01..but we can access that se38 by going to some other tcode..can u say how to block the se38 globally..Rewards for helpful points.. Reg' Zeemaaa....

  • How can eCATT used for testing of z program on DEV system &data on Quality?

    Hello All, Background - Custom object is (for e.g. any report program) which I want to test is present on DEV system  and required data (e.g. data that will be passed to selection screen fields of program) on Quality system. Question -How to do testi

  • Policy based routing

    Hello, I am setting up PBR. Looking at my configuration, will the next hop apply for both access lists 100 and 101? or will access-list 101 use 192.168.0.1 as the next up? I was hoping acl 101 will use 10.10.10.1 as next up. router configuration: rou