Dropdown Menu same raw value changes back to top list item

Ok guys.  I have such a weird issue.  I have some code as follows from a dropdown menu:
<items>
                     <text>Zeutering</text>
                     <text>Rabies 1 Year (Dog or Cat)</text>
                     <text>Puppy Pack (DAPPv and Dewormer)</text>
                     <text>Kitten Pack (HCP+FeLV and Dewormer)</text>
                     <text>Adult Dog Pack 1 (Rabies, DAPPvL2+CV and Dewormer)</text>
                     <text>Adult Cat Pack 1 (Rabies, HCP+FeLV, and Dewormer)</text>
                     <text>Deluxe Adult Dog Pack (Rabies, DAPPvL2+CV, Bordatella, and Dewormer)</text>
                     <text>Heartworm Pack (Heartworm test + six months of prevention)</text>
                     <text>Microchip (Home Again Chip)</text>
                     <text>Flea and Tick Medications</text>
                  </items>
                  <items save="1" presence="hidden">
                     <text>65.00</text>
                     <text>10.00</text>
                     <text>20.00</text>
                     <text>25.00</text>
                     <text>35.00</text>
                     <text>35.00</text>
                     <text>50.00</text>
                     <text>95.00</text>
                     <text>30.00</text>
                     <text>10</text>
                  </items>
The problem I am having is this.  When I select  <text>Adult Cat Pack 1 (Rabies, HCP+FeLV, and Dewormer)</text>  from the dropdown menu the option goes to   <text>Adult Dog Pack 1 (Rabies, DAPPvL2+CV and Dewormer)</text>   which is the option above the option I selected as noted above.  The only thing I can think of is that because they have the same value it is causing this to happen.  I've never had an issue like this before with dropdown menus so I'm not sure how to fix it.
Any help is much appreciated.
Justin

Hi Justin,
You are right, the dropdown only works if the values are unique.  So one fix would be to add something to the value making it unique and then striping it off when selected.  So if your values were;
            <items save="1" presence="hidden">
               <text>65.00:1</text>
               <text>10.00:2</text>
               <text>20.00:3</text>
               <text>25.00:4</text>
               <text>35.00:5</text>
               <text>35.00:6</text>
               <text>50.00:7</text>
               <text>95.00:8</text>
               <text>30.00:9</text>
               <text>10:10</text>
            </items>
In the change event you could have some JavaScript code something like;
var valueId = this.boundItem(xfa.event.newText);
app.alert(parseFloat(valueId));
The parseFloat function will stop parsing when it hits an invalid character like the colon.
It is tempting to use a natural key (as you have) but I would probably have used a surrogate key (that is something only the form knows about, like 1,2,3, etc) and then look it up in some structure maybe as simple as a JavaScript array, depends on the complexity of your form.
Hope this helps,
Bruce

Similar Messages

  • Decision Table values changes back after deploy.

    Hi All,
    I created Decision Table and filled it by some values.
    Then I built my Rules Composer project and deployed it.
    After that I changed some values in my Decision Table from RulesManager and uploaded their.
    Then I deployed my Rules Composer again.
    After that I looked in Decision Table from RulesManager again and saw that all values were changed back to their original values.
    Does anybody knows is this feature or bug?

    Hello SMatveev,
    The functionality is as follows:
    1. You selected the active version to open the project - made changes to the rules, uploaded this. This version though is the latest, it has not been activated. The rules project which will be open will still be the active version, that means the changes recently made will not be displayed.
    2. You selected the latest version to open the project - made changes to the rules, uploaded this. This version is the latest as well as the active version. The rules project which will be open will be the latest version, that means the changes recently made will be displayed.
    3. After the changes were made, you uploaded (even activated) the changes. The rules are changed in NWDS and uploaded, now the version of the rules as were in NWDS at the time of deployment will be the latest/active version of rules in the server.
    The behavior you saw is expected. (3rd point)
    The way to prevent this loss of modifications made to rules using rules manager, is to - first download the runtime version of rules from server using the option available in NWDS; make the required changes to this active version and upload this DC to server.
    Best Regards,
    Arti

  • LOV value changes to first in list when using valueChangeListener

    All,
    I'm having a problem using a valueChangeListener with an af:inputListOfValues. The listener is firing properly but unless
    I use the search popup to select the value it is changing the value back to the first row in the list.
    If I try to type in a value it's just going to be changed back to the first row in the list.
    I'm sure there's something simple that I'm missing. Any ideas? Thanks.
    I am using JDev 11.1.2.2.0
    Below is how the list is defined and the Java behind the listener:
    <af:inputListOfValues id="workCenterEntryId"
                             popupTitle="Search and Select: #{bindings.WorkCenterEntry.hints.label}"
                             value="#{bindings.WorkCenterEntry.inputValue}"
                             label="#{bindings.WorkCenterEntry.hints.label}"
                             model="#{bindings.WorkCenterEntry.listOfValuesModel}"
                             required="#{bindings.WorkCenterEntry.hints.mandatory}"
                             columns="#{bindings.WorkCenterEntry.hints.displayWidth}"
                             shortDesc="#{bindings.WorkCenterEntry.hints.tooltip}"
                             binding="#{pageFlowScope.PalletBuildBackingBean.workCenterEntryId}" editable="always"
                             simple="false"
                             valueChangeListener="#{pageFlowScope.PalletBuildBackingBean.changeWorkCenter}" autoComplete="on" autoSubmit="true">
    <f:validator binding="#{bindings.WorkCenterEntry.validator}"/>
    <af:autoSuggestBehavior suggestedItems="#{bindings.WorkCenterEntry.suggestedItems}"/>
    </af:inputListOfValues>
    public void changeWorkCenter(ValueChangeEvent valueChangeEvent) {
         FacesContext facesContext = FacesContext.getCurrentInstance();
         valueChangeEvent.getComponent().processUpdates(facesContext.getCurrentInstance());
         //More code to do other stuff
    }

    Thanks for your response.
    Here's what I tried:
    1) I removed the value change listener and the problem still occurred.
    2) I set AutoSubmit to false and the problem stopped.

  • All ringtones are the same, can't change back?? HELP!

    I just noticed that all my ringtones are the same for everyone that calls in. I have downloaded a few music ringtones & also use some of the ones off iPhone itself but I never use "Marimba" & that's what all my calls are coming in as. What the heck??

    restart the phone and check if your selections are selected.
    If still not right, reset by pressing home button and off button at the same time for about 10 sec
    Then check again.
    If no help, restore!

  • How to handle value change events of select list in custom component?

    My HelloUIComp code...How to handle events for "Select"...if i choose option1 from select then one text box is to be displayed in custom component and if i choose another option then some other text box is to be displayed in custom components...
    public class HelloUIComp extends UIComponentBase {
        public static final String account="custom.account";
        public static final String RENDERER_TYPE = null;
        HtmlCommandButton button = createButton();
        //HtmlSelectOneMenu select=createSelect();
        public void processDecodes(FacesContext context) {
             Calling the lifecycle method "processDecodes" on the
             internal button is absolutely critical to create action events
             button.processDecodes(context);
             super.processDecodes(context);
        private HtmlCommandButton createButton() {
             FacesContext context = FacesContext.getCurrentInstance();
             HtmlCommandButton newButton = new HtmlCommandButton();
             newButton.setId("Add");
             newButton.setValue("Add");
             newButton.setType("submit");
             //newButton.setOnclick("return func_1(this,event);");
             MethodBinding binding = context.getApplication().createMethodBinding("#{pc_MyProjectView.go}", null);
             newButton.setAction(binding);
                  newButton.setParent(this);
             return newButton;
      /*  private HtmlSelectOneMenu createSelect()
             HtmlSelectOneMenu selectCategory=createSelect();
             return selectCategory;
         public void encodeBegin(FacesContext context) throws IOException {
              String style = (String)getAttributes().get("style");
              String startdate = (String)getAttributes().get("startdate");
              String enddate = (String)getAttributes().get("enddate");
              //String add=(String)getAttributes().get("add");
              ResponseWriter writer = context.getResponseWriter();
             writer.startElement("table", this);
            writer.writeAttribute("border","2","2");
            writer.startElement("tbody", this);
            writer.startElement("tr", this);
            writer.startElement("td", this);
            writer.writeText("Account Category", null);
            writer.endElement("td");
              writer.startElement("td", this);
              writer.writeText("Reg-No", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("Account-No", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("Start-Date", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("End-Date", null);
              writer.endElement("td");
              writer.endElement("tr");
              writer.startElement("tr",this);          
              writer.startElement("td", this);
              writer.startElement("select", this);
            if (style!=null)
                   writer.writeAttribute("style", style, null);
            writer.writeAttribute("name","category","category");
            writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              //to access data
              Account accountObj;
              AccountData accountDataobj;
              List listOfAccounts;
              int noOfAccounts;
              accountDataobj=new AccountData();
              listOfAccounts=accountDataobj.getAccounts();
              noOfAccounts=listOfAccounts.size();
              for(int i=0;i<noOfAccounts;i++)
              writer.startElement("option", this);     
              accountObj=(Account) listOfAccounts.get(i);
              writer.writeText(accountObj.getCategory(), null);
              writer.endElement("option");
              //System.out.println(accountObj.getRegNo());
              //System.out.println(accountObj.getAccountNo());
              writer.endElement("select");
              writer.endElement("td");
            writer.startElement("td", this);
              writer.startElement("select", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("name","regno","regno");
              writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              for(int i=0;i<noOfAccounts;i++)
              accountObj=(Account) listOfAccounts.get(i);     
              writer.startElement("option", this);
              writer.writeText(""+accountObj.getRegNo(), null);
              writer.endElement("option");
              writer.endElement("select");
              writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("select", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("name","accno","accno");
              writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              for(int i=0;i<noOfAccounts;i++)
              accountObj=(Account) listOfAccounts.get(i);
              writer.startElement("option", this);
              writer.writeText(accountObj.getAccountNo(), null);
              writer.endElement("option");
              //writer.startElement("option", this);
              //writer.writeText("00200155", null);
              //writer.endElement("option");
              writer.endElement("select");
              writer.endElement("td");
              writer.startElement("td", this);
              button.encodeBegin(context);
             button.encodeChildren(context);
             button.encodeEnd(context);
            writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("input", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("type","text","text");
              writer.writeAttribute("name","startdate","startdate");
              writer.writeAttribute("value",startdate,startdate);
              writer.writeAttribute("readonly", "","");
              //writer.endElement("input");
              writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("input", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("type","text","text");
              writer.writeAttribute("name","enddate","enddate");
              writer.writeAttribute("value",enddate,enddate);
              writer.writeAttribute("readonly", "","");
              writer.endElement("td");
              writer.endElement("tr");
              writer.endElement("tbody");
              writer.endElement("table");
         public String getFamily() {
              return "HelloFamily";
         }

    NewEclipseCoder wrote:
    How to handle events for "Select"...if i choose option1 from select then one text box is to be displayed in custom component and if i choose another option then some other text box is to be displayed in custom components...Two ways:
    1) submit the form to the server and render the desired textbox depending on the option.
    or
    2) render all textboxes and use Javascript/DOM to display/hide them depending on the option.

  • How can I change the order of list item properties in the alert email sent to the assigned-to owner?

    Using SharePoint 2010 Foundation.
    I have an Issue list configured to send an email to the assigned-to owner (List Settings | Advanced settings | E-Mail Notification = Enabled). I have since added columns to the Issue list. All of the data from my columns appear in the email alert but the
    newest additions show up at the bottom of the list in the alert email instead of in the column order I have defined (List Settings | Issue Content Type | Column Order). However, if I click the "Mobile View" in the alert email I received, the Mobile
    View does have the items listed in the column order.
    Why are these different and how do I get the email alert to match my column order?

    Actually the view which you recieve requires the column ordering to be the way you prefer. So whatever is your default view, change the column orders and then check the email alerts.
    Alpesh Nakar's Blog
    Alpesh
    Just SharePoint Just SharePoint Updates
    SharePoint Saturday India Online
    Nov 20 2010 Contributing Author
    SharePoint 2010 Unleashed
    MCTS: SharePoint 2010 Configuration
    MCITP: SharePoint 2010 Administrator

  • Change Topic To-Do List Items

    Hey all,
    Is there a way to add items to the "To Do List" in the Status
    tab of the Topic Properties window? I'd like to keep track of
    additional tasks and maybe remove some of the ones that are there.
    Possible?
    Thanks in advance,
    Ben

    Hi Ben
    I would encourage you to complete a Wish Form and tell Adobe
    you would like to see this as being something editable. Who knows,
    maybe if Adobe hears from enough folks they will include it in a
    future version. Certainly won't ever happen if nobody suggests it!
    Click
    here to view the WishForm/Bug Reporting Form
    Cheers... Rick

  • Update form not returning correct data selection in dropdown menu

    Using CS3 DW along with SQL 2008 R2. I have a number of dropdown menus on an entry form (using VBScript/ASP) that are feed by SQL queries. All data is accepted in the entry form and writes to the table in the database without any issues. I created an Update form and based on a Rec ID clicked on from a list the Update form is presented with all the data in the correct fields except for one dropdown menu. All the other menus go to the correct selection except for the one. Spent 2 days attempting to resolve this. If I change the dropdown menu to a field the correct data is presented when the form comes up, but doesn't allow the user to make a selection from the menu. When I change it back to a dropdown menu the saved selection is not selected - just lists the entire list of items in the menu. Any help or ideas on this is greatly appreciated.

    Hello All,
    Once more thank you. I have sorted the issue out.
    I observed that I was selecting the wrong field. I selected the field matching the record set of the select instead of the field matching the record set of the table I am working as seen on the image belew
    I was selecting this - This is the record set of the table that hold values for the city select list
    Instead of this. This is the record set of the table behind the form I am working on
    My issue is now re-solved.
    Mike

  • Interactivity with dropdown menu

    Hi,
    I need dropdown menu for my project. I know Captivate is
    giving dropdown menu if i use project>Skin but its skin is not
    matching with my project interface also it is not letting me to
    customized it.
    If i make the dropdown menu in flash and import the .swf in
    captivate, is it possible to give interactivity to flash
    dropdownmenu to the captivate slides and if yes how to do it?

    Hello pocketPc
    In most cases you would create this the same way that you
    would any other kind of interactive simulation.
    You start by capturing your screens using either the training
    simulation or assessment simulation recording mode. Captivate would
    then add click boxes to the dropdown menu and radio button when you
    click on these items in the application you are capturing your
    screens from.
    That way once you finish your screen capture session you
    would end up with a slide that shows for example the radio button
    in its default state and another slide with the radio button
    selected. Same goes for the dropdown menu.
    If this isn't what you require then please provide us with
    some more details so that you can advise you better.
    Regards,
    Mark

  • Need help on how to create dropdown menu in dreamweaver 9

    Hello Forum Members
    I am working on dreamweaver , making my website by using dreamweaver 9 .
    My problem is, i want to create a dropdown menu but when i move my cursor on any item then the drop down links appears on the same item itself and that item diappears.
    For Example my menu is like --- item1 item 2 item 3 item4 item5
    item2.1 Item3.1 item4.1
    item2.2 item3.2 item4.2
    now when i move my cursor on any of these menu headings (like item 2, item 3, item 4) which has drop down links the main menu item disappears and the drop down links (item 2.1, item2.2 like wise) reflects on the place of that (item2) menu item.
    Please help me with this and not with the scirpt that would be the last option because i do not have any knowledge of html. Please tell me the feature in dreamweaver 9 from where i can correct it.
    Thanks In Advance
    Sean

    Please Help

  • Email subject and Back to top in WPC

    Hi All,
    I have 2 questions in WPC.
    When you click the E-Mail link in the page header links section on a page, WPC opens a blank mail message with a subject that is prefixed with "Web Page Composer:". Is there a way we can change that.
    Articles have a Back to Top link at the bottom. Is there a way to remove that ?

    Hi Suresh
    I have same requirement to control back to top in WPC.  Can you explain further about the container and layout settings please?
    Thanks!
    Lee Lewis

  • Why does Safari (version 7.0.6) startup page switch back to top sites?

    I have tried setting preferences, under the General Tab, to have new windows open with Home Page, which works fine so long as I don't quit Safari. However, whenever I quit Safari and then relaunch it (i.e., every time I restart my computer), the default setting changes back to Top Sites.

    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Preferences/com.apple.Safari.plist
    Right-click or control-click the highlighted line and select  
              Services ▹ Show Info in Finder (or just Show Info)
    from the contextual menu.* An Info dialog should open.
    ☞ Does the dialog show "You can read and write" in the Sharing & Permissions section?
    ☞ In the General section, is the box labeled Locked checked?
    ☞ What is the Modified date?
    If you don't have read and write access to the item, change the settings as directed here. Note, however, that if one file has wrong access settings, most likely others do as well. If the item is locked, unlock it.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • Related Issue column in tracking list gets changed into drop down list in Infopath

    Hi All,
     i have created Tracking list in sharepoint 2010. which has column[Related issue - lookup for field in list[title] by default.
    this field will have a multiple selection check box,2 buttons [Add and remove] and text box[which show the items selected in check box].
    my issue is ,when i try to modify my list in Infopath. this column[Related issue] gets changed into drop down list item.Is is possible  to get the same [old format] back. if so pls guide me..
    I faced the same in Radio button,but i restored it by changing it into option button in Infopath
    V Jean

    Hi ,
    The
    multiple-selection list box control should be by design in InfoPath form, which is corresponding to the SharePoint "Related Issues" field, in my opinion, it cannot be converted to [old format] in InfoPath form, you may need to use SharePoint Designer 2010
    to customize your Issue Tracking list NewForm.aspx/EditForm.aspx per the way in the following article, then "Related Issues" field will still be the old format,
    http://www.cjvandyk.com/blog/Articles/How%20do%20I%20-%20Customize%20the%20NewForm.aspx%20or%20EditForm.aspx%20of%20my%20SharePoint%20list.aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • How to send a list item value to URL to open data related to item value

    Hi,
    Iam using Apex4.0 and iam facing some problem. Iam unable to send selected list item value to the url specified in the HTMl region.
    Here i want to open the data related to list item value in other page.
    List item - :Familyp
    i want to pass this selected value to the url and when ever user selected the list item and clicks on the url, then it should display the item value related data in new page.
    I tried with &FamilyP in url but it's not working. Any one help me plz.
    Regards
    Vamsi.Tata

    Is it a normal Select list or Multi Select list?
    If you have select list that allows you to select multiple options then you cannot pass it through URL. Multi-select /Shuttle keep colon separated list in the item, and this confuses Apex because the Apex URL uses colons for a different purpose. No escaping or URL encoding will help.
    If it is normal select list that allows selection of only one option then you can pass through the url. Unless of course the data has a colon in it.
    For multi-select, and when the value contains colon, the only way is to save the value in session state, same page item or any other place like Application Item, and then reference it at the other end. Never pass through the URL.
    Regards,

  • Unable to select the value from a list item in forms 6i

    Hi ,
    I'am using forms 6i. I have created a list item in my form as below.
    Item_type = list item
    list style - popup list
    elements in list - A, B, C,D
    When I open the form all the above values are displayed for the list item. But I'am unable to select the item( either A,B,C,D).
    Please let me know if I need to add any thing else programatically to acheive this. The block on whixh these values are diplayed is a datablock.
    This is very urgent. Any suggestions would be of great help.
    Thanks
    Deepthi

    If you have a list item where you have:
    Display A value 1
    Display B value 2
    Display C value 3
    Display D value 4
    If want to initial the value of the item to be A, you can set the initial value of the item to 1 in the property pane.
    Otherwise in an initialisation triger have
    :block.list_item := 1;
    HTH
    Tony

Maybe you are looking for

  • Can i start a new itunes library on a mac?

    i understand that holding shift woks for windows but not mac. my specific problem is that i have 300 songs on the computer but 700 on the ipod. i just bought an album on the computer that i cant transfer to the ipod. if i can start a new library and

  • Problem with examples

    Hi. I'm new to intermedia, and when I try to run the sample applications (like the imgdemo in .../ord/img/demo) it returns me this error: Dropping table IMGDEMOTAB... Creating and populating table IMGDEMOTAB... Loading data into cartridge... FAILED:

  • Large Product Module

    How do I call a large product module onto the page? Here's the format for my small product module: {module_product,31999,5038261}. Where can I check? Thanks.

  • Oracle V/S SAP

    Hi All, My company is planning to go for Oracle Financials and currently in the process of getting proposals from various partners. Management is actually interested in Oralce, but one of the partners suggests that SAP is more professional and a bett

  • Dreamweaver preview and flash movie

    Greetings All, Im sure this question has been answeredmany times but i cant seem to find any solutions. Here it is: - In dreamweaver I add an .flv file to play on my web page. - When previewing from dreamweaver into Firefox or Safari the movie shows