Populating a Drop Down menu from a EJB

Hi,
I have a scenario where the the user clicks on the one of the links on Page A and then the page navigates to Page B. On the Page B a drop down menu appears. Now I have to implement such that the drop down menu has to be populated dynamically by values returned from the EJBs which will be called when the link on the Page A is clicked.
Can any one giude me as to how to do this.
Thanks in Advance. !!

Just write code logic in the bean action method behind the commandLink accordingly?

Similar Messages

  • Dynamic Drop Down Menu from an Access Database

    Hello Everyone,
    I am user Adobe Designer 7 to create a fillable PDF, and I would like to get the options for a drop down menu from my MS Access database. Basically I would like to populate the drop down menu with the names in the Access database. There i Have a table called PhoneNumbers and it contains the names of all the people I want to appear in the drop down menu that I just created.
    This is what I did:
    I created a drop down menu and then I clicked on Object > Binding > under "Default Binding (Open, Save, Submit)" choose "New Data Connection"
    then connect to the database using a fileDSN. I opened the table where with the "names" column (PhoneNumbers)
    and under the "Query," option, I wrote:
    select * from PhoneNumbers
    Then it gave me all the fields from the table and I dragged the "Last name" field over the drop down menu. I will need to find a way to get the "First Name" field to join the Last Name field to create one name that looks like this: Hill, Angie
    The problem is that even though it shows the name from the Access database, it does not give me a list of all the names when I open the form in Reader 7...
    No matter how much I click that drop down arrow, the name does not change...
    It's almost as if it gets to the databse and gets the data from the database, but it cannot loop through it...
    It's almost as if it's missing the code to loop through it...
    Why is this? Any ideas how to fix it so it gives me a list of ALL the names, when I click on the drop down button?
    After that, how can I add the first name to it?
    The form would look like this:
    Angie H. 202 641 2055
    Right now it does look like that, but I cannot change to another name when I click the drop down menu. For the code to be working when I change to another name, the phone number also changes to the phone number of that person:
    Barry S. 703 555 1258
    The name is in a drop down menu, the phone number is in a textbox.
    Can you help me with this?

    ANGELA,<br /><br />Well, the good new is that you are not far off...What you need is to insert the following code using Java Script under the Initialize function.  Just replace the Connection name,  The Hidden Value, and the Display Text with your information.  This is a function is 8.0 but will work with 7.0<br /><br />/*     This dropdown list object will populate two columns with data from a data connection.<br /><br />     sDataConnectionName - name of the data connection to get the data from.  Note the data connection will appear in the Data View.<br />     sColHiddenValue      - this is the hidden value column of the dropdown.  Specify the table column name used for populating.<br />     sColDisplayText          - this is the display text column of the dropdown.  Specify the table column name used for populating.<br /><br />     These variables must be assigned for this script to run correctly.  Replace <value> with the correct value.<br />*/     <br /><br />var sDataConnectionName = "DataConnection";     //     example - var sDataConnectionName = "MyDataConnection";<br />var sColHiddenValue = "CAT_Corp_SeqNo";               //     example - var sColHiddenValue = "MyIndexValue";<br />var sColDisplayText = "CAT_Corporate";               //     example - var sColDisplayText = "MyDescription"<br /><br />//     Search for sourceSet node which matchs the DataConnection name<br />var nIndex = 0;<br />while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName)<br />     {<br />          nIndex++;<br />     }<br /><br />var oDB = xfa.sourceSet.nodes.item(nIndex);<br />oDB.open();<br />oDB.first();<br /><br />//     Search node with the class name "command"<br />var nDBIndex = 0;<br />while(oDB.nodes.item(nDBIndex).className != "command")<br />     {<br />          nDBIndex++;<br />     }<br /><br />//     Backup the original settings before assigning BOF and EOF to stay<br />var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");<br />var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");<br /><br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF", "bofAction");<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF", "eofAction");<br /><br />//     Clear the list<br />this.clearItems();<br /><br />//     Search for the record node with the matching Data Connection name<br />nIndex = 0;<br />while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)<br />     {<br />          nIndex++;<br />     }<br />var oRecord = xfa.record.nodes.item(nIndex);<br /><br />//     Find the value node<br />var oValueNode = null;<br />var oTextNode = null;<br />for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)<br />     {<br />          if(oRecord.nodes.item(nColIndex).name == sColHiddenValue)<br />          {<br />               oValueNode = oRecord.nodes.item(nColIndex);<br />          }<br />          else if(oRecord.nodes.item(nColIndex).name == sColDisplayText)<br />     {<br />          oTextNode = oRecord.nodes.item(nColIndex);<br />     }<br />}<br /><br />while(!oDB.isEOF())<br />{<br />      this.addItem(oTextNode.value, oValueNode.value);<br />       oDB.next();<br />}<br /><br />//     Restore the original settings<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup, "bofAction");<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup, "eofAction");<br /><br />//     Close connection<br />oDB.close();

  • Populating a Drop down menu JSP form

    How to go about populating a drop-down form from Oracle Database using JSP?
    I have the connecting to the Oracle Database running. I also can query forms, but i can't create a drop-down menu form.

    Start the dropdown box with the regular select tags "<select name=this>"
    Then open a JSP block and get a resutlset, loop through the resultset and and put the values from the resutlset into the <option> tags for the HTML.
    Example
    out.println("<option value=\"" + rs.getString(1) + "\">" + rs.getString(1) + ">");
    Then close the loop and that should populate a dropdown within the html form.

  • How can I create a rollover drop down menu from a link in Dreamweaver CS5?

    Hello all,  I am working on a portfolio website and I was just wanting to know if there is any way that I can create a drop down menu from a text link that cascades once the cursor has made contact with the link. I would like to have it in my navigation bar where the Portfolio link is. Basically, my navigation bar looks like this : Home | Resume | Portfolio | Contact. I only want three items on the drop down menu beneath the portfolio link: Traditional Art, Photography, Graphic Design. I would really appreciate any help I can get! Thanks!

    Have a look at what Nancy does http://alt-web.com/DEMOS/CSS-Horiz-menu-2.shtml

  • Help needed with populating a drop-down list from an Access Database

    Topic
    data drop-down list
    Jason Murthy - 11:39am Feb 14, 2005 Pacific
    Hello,
    I am trying to use the data drop-down list from the custom library. I enter the name of my data connection and the other 2 variables in quotes when they are initialized, just like the example says to, but it still doesn't work. Anyone have any thoughts?
    Thanks,
    Jason
    Reply To This Discussion | Back to Topic List | Bookmark | Change Subscription
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages 11 messages. Displaying 10 through 11.
    First Previous Next Last Show All Messages
    Denzil White - 5:46am Jul 28, 05 PST (#10 of 11)
    Oh and before you say anything more I have also tried changing it from Javascript to the FormCalc, and no diff, maybe I am more stupid than I realised, heh,heh
    Post Reply | Bookmark
    Henk Pisuisse - 12:06am Aug 9, 05 PST (#11 of 11)
    I am having trouble (sleepless nights) with populating a drop-down list from an Access Database. The result is: I only get the first record from the data connection. So the connection works but I cannot go through the other records. Maybe there is an other way to do this.
    I am trying to selectively fill a form with data from an MS-access database.
    I hope someone can help me.
    [email protected]
    The Netherlands (small country in Europe)

    If you email the access DB and the form to [email protected], I will try to take a look at it for you.

  • Ichat drop down menu from menu bar shows up in the wrong place.

    I'm not sure how this happened, but for some reason, ever since I've moved to college, my Ichat drop down menu from the menu bar shows up on the left side of my screen, and you can only see half of the menu. I don't know how to fix this problem so if anyone could help me out that would be great.
    Sincerely,
    Cody Martin

    Yep.
    Go to the Buddy List Status Message and option the Edit option.
    Delete that Status Message that you have that is over 42 characters.
    Ones of about 60 or more will introduce the "Left Shift" (And the fact the drop Down may line up with the right hand edge of the Menu Bar icon on in-between lengths)
    In Snow Leopard it is possible to have a Long Message that displaces the Drop Down Off Screen.
    The other factor is the order of the Menu Bar Icons on that side of the Screen
    The iChat one can be Dragged if you use the Apple (CMD) key.
    If the Drop Down can not fit the message in before the right hand edge of the Screen it will displace.
    Having a Second mac User Account and deciding to Display which mac User is Logged in can give you some extra "space"
    3:24 PM Sunday; October 11, 2009

  • HT3819 I have turned two computers on to home sharing. I am now on this computer wanting to put my music on to this itunes and i know i need to find the other computer in the drop down menu from " Home Sharing " but that menu isnt there on the left?

    I have turned two computers on to home sharing. I am now on this computer wanting to put my music on to this itunes and i know i need to find the other computer in the drop down menu from " Home Sharing " but that menu isnt there on the left?

    If you have the horizontal menu bar showing (File, Edit, View,...), select View, then select Show Sidebar. 
    If the menu bar is not showing, dorp down the menu in the very upper left corner and select show menu bar, then follow steps above.
    Hope that helps.  Good luck.

  • How do I remove the autocomplete drop-down menu from textboxs, not the awesome bar?

    I like having the drop-down menu from the url, but the autocomplete option for textboxs within like when I type my username and it pops up with all of the ones that has been used on that site are really annoying. How do I get rid for the latter? I didn't have this before I upgraded to Firefox, and now I can't get rid of it. Fyi, I'm rather tech inept, don't use complicated comp sci words please!

    You can use History > 'Clear Recent History" to clear already saved form data.
    *https://support.mozilla.org/kb/Clear+Recent+History
    Use these steps to remove saved (form) data from a drop down list:
    #Click the (empty) input field on the web page to open the drop down list
    #Highlight an entry in the drop down list
    #Press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries
    See also "Prevent Firefox from automatically completing URLs":
    *https://support.mozilla.org/kb/search-your-bookmarks-history-and-tabs-awesome-bar

  • Drop down Menu from UNDER a banner?

    Here is an image of what I'm trying to create in Adobe Muse. I want the pictured drop down menu to appear to come from beneath the banner menu when you hover over the word "Accommodations".
    I got a response from a staff member that said this was possible using the "Tooltip Widget" and using a trigger on top of the banner. When I tried using this widget it was impossible to put the target and the tooltip trigger on different layers, or at least it was impossible for me to figure out how.
    Thus, the trigger for the dropdown had to be under the banner (and thus UNCLICKABLE) in order for the drop down to appear to be under the banner.
    Can someone please clarify whether or not this is possible using this program? Here is a link to the original discussion... http://forums.adobe.com/thread/1247488

    Hmmmm.... you may have to look at an alternative method to execute this concept. Take a look at Edge Animate Not only can you creat this type of menu, but you will also have a more dynamic and vibrant menu

  • How can I create a drop down menu from an array

    Hello all,
    I am attempting to create a subvi that allows the end user to add a part number to an .txt file, and assigns that part number a value than can be used to select one of two modes of communication to be used to write to a EEPROM.   I am using the "write key.vi" and the "read key.vi" to create and read the .txt file.  What I would like to do is is use "get section names.vi" to read all of the part numbers and dump them into a drop down menu after the end user generates the file using the subvi.
    I guess my question is how do I dump a 1D string array into a drop down menu.
    I have attached some semi-functional .vi's to give an idea of what i am attempting to do.
    Erik
    Attachments:
    FirsttryPN.vi ‏15 KB
    PNwrite.vi ‏16 KB

    Place a Ring control on your front panel, then create a property node on the block digram. You can wire the output array of "Get Section Names" to populate the Strings[ ] property of the Ring.
    Retrieve the specific string selected by the operator by wiring the Ring control to the Index Array function.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • TS5249 I'm connecting my Bose T1 mixer to GarageBand via a MAC air.  In the drop down menu from smart control, it shows no audio input. Any suggestions?

    I'm connecting my Bose T1 mixer to GarageBand via USB cable.  In the drop down menu under smart control, it does not recognize this input or any input.

    go to system preferences > sounds > select audio input

  • Populating a Drop-Down Menu via xml in php

    I am new at programming. I am looking for a way to link a drop menu to 3 drop down menus dynamically. In other words, the 3 ddm's will have the same options according to the value selected in first ddm. Can someone provide a tutorial for this? Also, i am using php to pull the data for those ddm's from xml file.
    Thank You

    php is server side... so you want user to choose option from dd menu #1, reload the page to populate dd menu #2 (process on server via php), choose option from dd menu #2, reload the page again to populate dd menu #3 (process on server via php), then finally choose option from dd menu #3 and then after reloading the page three times already (once for initial load and two more time for each subsequent server process) load the page for a fourth time to process the entire form entry? Whoa daddy... that's a lot of page loads.
    Just want to be clear of your desire. I don't think you'll find many tutorials for the mentioned method. There are many, many three tier drop down menus in javascript that provide client side processing without page reload.

  • How can I cancel itunes match without the latest version of itunes? I can't get the drop down menu from the store

    I have a mac which doesn't support the new itunes. The instructions I have from apple say that I have to use a pull down store menu from the itunes store and then I should be able to view my account and cancel by turning off the auto renew button next to itune match, The only trouble is I can't see the itune match at all.

    Turning off the auto-renew does not cancel the service. To actually cancel, or turn off the service, you need to contact iTunes Store support. What the instructions are are getting is telling you to do is to cancel the auto-renew. You can accomplish that by, in iTunes:
    1. Pull down the Store menu and select "view account."
    2. Enter your credentials when prompted.
    3. In the middle of the page click the hightlight button:

  • Need help placing my drop down menu from flash into Dreamweaver

    I had this working once.  I am ping one you smart ones can help me out wuth this.  WHat am I doing wrong?

    I have not used any CSS to code my website, have purely used tables in a html template.
    Sorry to say, but you can't make drop-down menus without CSS code.  Which begs the broader question, why are you afraid of learning CSS?  It's much more efficient than tables and you can do so much more creative stuff with it. 
    Pure CSS Drop-Menus (with CSS gradients and transitions)
    http://jsfiddle.net/NancyO/zN7fU/
    Nancy O.

  • When I open a drop down menu from the tool bar, and move the pointer down the list of choices, they become constantly "darkly highlighted" and the typefaces change to black making them unreadable.

    As the pointer is moved down the list of choices in a drop down box, once the pointer passes each choice, that choice becomes constantly “darkly highlighted” and the type face of that choice turns black. So, as the pointer moves down the list of choices all of the choices become a block of darkly highlighted black text, making it impossible to read the choices which were passed over by the pointer.
    It is though the HTML, JavaScript or Java attribute of ''*<code>onMouseover</code>'' is missing the attribute of ''*<code> onMouseout</code>'', thereby when the user moves the pointer off the boundaries of the element, that element retains the CSS given it by the''*<code> onMouseover</code>''

    I should probably add that i am working in asp!

Maybe you are looking for