How to select a drop down option item while using logic:iterate?

I am using the following peice of code -
{color:#808080}+String countrySelected = (String)request.getAttribute("country");+
+....+
+<logic:iterate id="countryVO" name="countryList" type="com.sa.biz.vo.airport.CountryVO">+
+<%+
+if (countrySelected != null){+
String countrySel = countryVO.getCountryCode().toString();
String selected = (countrySel.equalsIgnoreCase(countrySelected)) ? " " "Selected" : " ";+
+%>+
+<option value="<%=countryVO.getCountryCode()%>*<%=selected%>*"><bean:write property="countryName" name="countryVO"/></option>+
+<%+
+}+
+%>+{color}
{color:#808080}+</logic:iterate>+
{color}{color:#000000}The drop down is a list of country names (value - country code, display text - country name) which gets populated from the database. I need to ensure that the countrySelected is the menu item which gets selected in the drop down.
The expected option item is not rendered as selected when i run this code? Please help!!{color}

<option value="<%=countryVO.getCountryCode()%>" <%=selected%>>Apply the above change which should help you out on the same. :)
REGARDS,
RaHuL

Similar Messages

  • How to add a row for every 5 records using logic:iterate

    Hi,
    In my application, using logic:iterate iam displaying 20 records per page.
    I want to insert a row for every 5 records.
    Please tell how to insert that row.
    Thanks in advance.
    Mohan

    I think this could work for you
    for (int x=1 ; x<=20 ; x++) {
    addRowWithRecord
    if (x%5==0)
    addEmptyRow
    }

  • I modified the budget categories on the numbers template so now the transaction tab does not communicate with the budget tab. I figured out how to change the drop down options but how do I get it to reflect on my budget sheet? Please help.

    If you are familar with the Numbers Budget Template it has two tabs 'Budget' and 'Transactions'. If you use the template as it is designed when you input expenses on the transaction tab it will automatically add that amount into the selected category on the budget tab. I have madified my budget tab to reflect the caegories that I need, which included adding several to the template. I also added to the table so it reflects my income and expenses so I can track where I am at with a glance. Since I did this, I can't get my transactions tab to communicate with the budget tab. I figured out how to change the options in the drop down box for category but I con't figure out how to get it to reflect onto my budget tab. I'm sure that it is an easy fix, however, I am just not well versed in Numbers. I appreciate your time in helping me with this issue.
    Respectfully,
    Jon

    My guess is that while you added catetories to your Budget Sheet by adding new lines and filling in the category column, you didn't also add the formulas to these new budget lines.
    The proper way to add those lines would have been to select a cell in the line just above where you want to add a line and type Option/Alt-DownArrow. This would have copied the formulas into the new line. Maybe you did this, and maybe not. You didn't give details on how you added the lines.
    Select C2 and D2 and Command-C to copy them to the Clipboard.
    Select all the cells of Columns C and D except for the top and bottom rows and Command-V to Paste.
    If I have properly guessed the problem, you should be in business. This assumes that your Categories are exaclty the same as the entries in your Pop-up menus. Spelling counts, as does case.
    Jerry

  • How to overwrite certain drop down menu items

    Hi,
    i have a dropdown menu where i disabled custom text entry. the last item in the dropdown is the "Other" option where I want the user to write extra details. I was wondering if there's a way to pop up a text field when the "Other" option is selected.
    Also, the dropdown field stretches all the way across the page..so when the "Other" option is chosen, would it be possible to automatically shrink the field to fit a text field next to it for the user to type in details.
    I'm not sure if there's a better way to do this....any help would be much appreciated!
    thanks!!

    Hi,
    Hopefully you will get it working soon.
    I suspect that the form is not saved as Dynamic:
    Other than that, double check the that the object references in the script matches the objects in the forms, including subforms if objects are in different subforms.
    If you could share the problem it would help finding the problem.
    Niall

  • How to select from drop-down menu connected to SQL database and then autofill?

    Hello,
    I am in the process of creating a series of forms and I need some help if working out how to do the following.
    I have already set up a data connection to an SQL database, and I have three fields connected: Job Number, Job Name and Customer Name.
    What I want to do is have it so that the Job Number is a dropdown box, so they can select the number, and then the other two fields, Job Name and Customer Name, are autofilled to the information corresponding to the Job Number.
    Is anyone able to help me do this please??
    Thank you!!

    The 101 of database connections from LiveCycle Designer can be found in Stefan Camerons blog.
    This is the right place to start.
    http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/
    http://forms.stefcameron.com/2006/12/18/databases-inserting-updating-and-deleting-records/
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    http://forms.stefcameron.com/2006/10/12/displaying-all-records-from-an-odbc-data-connectio n/

  • How to update popup (drop down) cells in Numbers using Applescript

    I understand that the list popups (dropdown lists in cells) cannot be dynamic in Numbers.
    I have the same dropdown list in multiple cells and tables, and this list often needs to be changed. Its not practical to amend one list, then copy/paste it into 200 plus cells that require the dropdown facility (they are not in sequential rows).
    Can Applescript be used to do the copy/paste function, as i could specify the cell ranges. My simple attempt only managed to copy/paste the cell values rather than the dropdown/popup list.
    Any constructive help would be appreciated.
    Thanks.

    Hi Hiroto,
    I have this script running, with one issue.
    set tValues to my doThis(1) -- get values of the selection
    if tValues is not "" then
      activate
              display dialog "Select the cells where you want to create the PopUp." & return & "After that, click on the 'OK' button."
              my doThis(tValues) -- set the cell format of the new selection to "PopUp Menu" and set the values of the each menu item
              tell application "Numbers" to display dialog "Done"
    else
              tell application "Numbers" to display dialog "You must select the cells in a table before running this script."
    end if
    on doThis(n)
              tell application "Numbers"
                        set tTables to (tables of sheets of front document whose its selection range isnot missing value)
                        repeat with t in tTables -- t is a list of tables of a sheet
                                  if contents of t is not {} then -- this list is not empty, it's the selected sheet
                                            set activeTable to (get item 1 of t)
                                            if n = 1 then return value of cells of selection range of activeTable-- return values of the selection
                                            set format of (cells of selection range of activeTable) to pop up menu -- set the format to pop up menu
                                            return my setValuePopUp(n) -- set value of each menu item
                                  end if
                        end repeat
              end tell
              return ""
    end doThis
    on setValuePopUp(L)
              tell application "System Events"
                        tell process "Numbers"
                                  set frontmost to true
                                  delay 0.3
                                  set inspectorWindow to missing value
                                  set tWindows to windows whose subrole is "AXFloatingWindow"
                                  repeat with i in tWindows
                                            if exists radio group 1 of i then
                                                      set inspectorWindow to i
                                                      exit repeat
                                            end if
                                  end repeat
                                  if inspectorWindow is missing value then
      keystroke "i" using {option down, command down} -- Show Inspector
                                  else
      perform action "AXRaise" of inspectorWindow -- raise the Inspector window to the front
                                  end if
                                  delay 0.3
                                  tell window 1
      click radio button 4 of radio group 1 -- the "cell format" tab
                                            delay 0.3
                                            tell group 2 of group 1
                                                      set tTable to table 1 of scroll area 1
                                                      set tc to count rows of tTable
                                                      set lenL to (count L)
                                                      if tc < lenL then -- ** add menu items **
                                                                repeat until (count rows of tTable) = lenL
      click button 1 -- button [+]
                                                                end repeat
      keystroke return -- validate the default name of the last menu item
                                                      else if tc > lenL then -- ** remove menu items **
                                                                repeat while exists row (lenL + 1) of tTable
                                                                          select row (lenL + 1) of tTable
      click button 2 --  button [-]
                                                                end repeat
                                                      end if
                                                      tell tTable to repeat with i from 1 to lenL -- ** change value of each menu item **
                                                                set value of text field 1 of row i to item i of L
                                                      end repeat
                                            end tell
                                  end tell
                        end tell
              end tell
    end setValuePopUp
    ==============================
    When the popup is created, if there is one header row, it adds "1" to the list of popup items, if there are two header rows, it adds "1", "2" to the list of popup items. What should i amend to remove this (i have two header rows in my sheet).
    I would ideally like to add a "-" to the list (to represent nothing selected in the cell) as default i.e. top of the list (i could add the symbol to my source data but that would look untidy). At the moment, after running the script all cell values change to 1.
    Oh, what would the best way to modify the script so it selects a specific cell range? At the moment i have to first select a column, then run the script, then select the source cells, then click ok on the dialog box before it does the magic.
    Someone else will be running the script, and if its easy to change, i would prefer to have an absolute source cell range values so the user can just rund the script without any selection required.
    If you can advise on this, that would be most helpful.

  • Multiple drop down menu items to populate the a separate text box...more help please

    Thanks to Gilad D67 for showing me how to have multiple drop down menu items appear in a separate text box. This stuff blows my mind. Is there any script I can use to make a new drop down menu item appear in the same text box, but on a new line below a previous entry. For example. I select 'cat' from my drop down menu and it appears in my text box. Now I choose 'dog' from my menu and it appears in my text box like so  'cat dog.' Is there any way I can make 'dog' go straight to a new line automatically without having to manually go into the text box and change it?
    cat
    dog (new selection goes straight to a new line)
    Now, I don't have a clue if this is also possible, but imagine, I don't like my drop down menu selection of 'dog' and I go back into the menu and I change to 'rat' but in the text box, 'dog' still appears and 'rat' is added. Do I have to manually delete 'dog' from the text box or is there script that can do this for me.
    Any assistance would be incredible. It amazes me how people know this stuff.
    This is the script I have so far
    (function () {
        // Do nothing if not committed
        if (event.willCommit) return;
        // Set up an array to hold the individual paragraphs of text
        var aQuotes = [3];
        // Populate the array with the paragraph text
        aQuotes[0] = "Use common singular nouns, plural nouns [plural ‘s’] and proper names to say what things are"
        aQuotes[1] = "Use numbers 1–10 to count"
        aQuotes[2] = "Use basic adjectives and colours to say what someone/something is or has"
        // Get the selected item, which is the export value of the selected combo box item
        var item = event.changeEx
        // Display the text corresponding to the selected item in the text field
        getField("Text30").value += " " + aQuotes[item];

    You have to set the option for the text field to be multiline and then change the last line of the script to:
    getField("Text30").value += "\r" + aQuotes[item];
    To reset the field you can use a separate button with a Clear Form command, and then you just select this one field from the list.

  • Drop down option for an output field in an ALV display

    hi,
    how to provide a drop down option for a field in the output of an ALV Grid display........
    Thanks in advance

    Hi Deepthi,
    Please refer this program BCALV_EDIT_07 and BCALV_EDIT_06.
    This will help you in your program
    <b>Reward Points if Useful</b>
    Thanks
    Vishwanath Purohit

  • Acrobat Forms - Make fillable text box appear after box checked or drop down menu item selected

    I have been asked to build an approvals form for my workplace however the approval processes vary considerably depending on the subject. I have been asked to create a list of topics in the form of check boxes or a drop down menu which will then populate a list of text boxes with differing approval authorities and corresponding spaces for signatures.  i.e. if 'Topic 1' is selected a list of names and signature spaces will appear, however if 'Topic 2' is selected a different list of names and signature spaces will appear instead.
    In order to achieve this I think I only need to find out how to link check boxes or drop down menu items to the appearance of different text boxes.
    I should also add that I am a beginner with this stuff.
    Thank you very much for any help you can provide.

    Remove the red coloured part
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible {
    left: auto;
    top:0;
    or start again with the original SpryMenuBarHorizontal.css and follow the rules as in http://www.dwcourse.com/dreamweaver/ten-commandments-spry-menubars.php#one.
    Either way will get you back on track.
    Good luck.
    Ben

  • Multiple drop down menu items to populate the same separate text box. How can I do it?

    In Acrobat Pro X, I've figured out how to create a drop down menu with items that will populate a separate text box, but how can I get multiple menu items to populate the same text box. For example. My drop down menu has three items  cat, dog, mouse. I choose cat and it appears in my separate text box (hooray). Next, I choose 'dog' from the same menu. I would like it to appear in the same text box along with my previous selection 'cat.' Is this possible? I'm very new to Java Script, any assistance would be greatly appreciated! Thank you

    She is the script I'm using
    (function () {
        // Do nothing if not committed
        if (event.willCommit) return;
        // Set up an array to hold the individual paragraphs of text
        var aQuotes = [3];
        // Populate the array with the paragraph text
        aQuotes[0] = "cat"
        aQuotes[1] = "dog"
        aQuotes[2] = "mouse"
        // Get the selected item, which is the export value of the selected combo box item
        var item = event.changeEx
        // Display the text corresponding to the selected item in the text field
        getField("Text field 1").value = aQuotes[item];

  • How to keep drop down option to one field in a ztable

    hi all,
    i created one ztable in this table i have two fields
    fieldnames are  matnr and indicator.
    now my requirement is i have to keep drop down option for indicator field. when i click on this field it has to show three vales 'X' OR 'Y' OR 'Z'.
    anybody can tell me how to do this.
    thanks,
    maheedhar

    Hi Maheedhar,
    Declare the field value on the selection screen as shown below.
    PARAMETERS: p_matnr LIKE ztable-field AS LISTBOX VISIBLE LENGTH 10.
    and maintain those 3 values(X,Y and Z) at the domain level in that field of the  Ztable.
    If Problem solved REWARD points and close the thread otherwise reply.
    Regards,
    Mukesh Kumar
    Message was edited by:
            mukesh kumar

  • Urgent help!display db value as selected in drop down using select option

    Hi All,
    My problem is i had resultset from database and i want to display it as drop down.By default it should show the actual database value for that field also user should be able to change it by selecting from drop down. What is happening is it is by default displaying the last value from the resultset and not the selected one. my code on JSP is :
    <%
    Statement stm1 = null;
    ResultSet rs1 = null;
    stm1 = con.createStatement();
    rs1 = displog.searchorthodon(con);
    String qry1 = "SELECT * FROM orthodontab;";
    rs1 = stm1.executeQuery(qry1);
    %>
    <table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#444444" align="center">
    <tr>
    <td width="171px" align="right" class="txtFieldLable">Orthodontist :
    <td width="171px" align="left" height="33" class="freeformfielddata">
    <select name="orthoden">
    <% while (rs1.next()){ %>
    <option value="<%=inputorthodon%>" selected ><%=rs1.getString("ortho_name")%></option>
    <%} %>
    </select>
    Thanks and Regards.I will be greatful to know where i am going wrong.

    <% int i = 1;
    while (rs11.next()){
    if (i==2)
    {%>
    <option value=i selected ><%=inputap%></option>
    <%}
    else
    %>
    <option value=i ><%=rs11.getString("AP")%> </option>
    <% }i++;}i=1; %>
    </select>
    <%
    This is a code and here instead of if(i==2) i actually want to compare rs11.next() with inputap. what will be the syntax.any help will be greatful

  • Drop down list item to select date

    I am using oracle form 6i, i want to use drop down list item to select date
    I was able to manipulate my codes to get values for the three drop down list items year, month and day
    but at when list change trigger on month to populate day , it populated accordingly but at point if I selected other month, it added the days of the new month selected to
    the days of already selected month. And delete list_element command failed to provide solution..
    Can any one help me out -- <email address removed by moderator so that you won't get spammed for all Eternity>

    1976 as year and march as month
    declare
    last_date date;
    nDays number;
    cursor days(v_last_date in date,vnDays in number) is
    select first_day(v_last_date)+rownum-1 sdate from dual
    connect by rownum<vnDays+1;
    begin
    select last_day(to_date(monthITEM||yearITEM,'MonthYYYY')) from dual;
    // the month is in the monthITEM
    // the year is in the yearITEM
    // last_day will have the last day of that month.
    //now you have to find the no. of days.
    select to_char(last_Date,'dd') into nDays from dual;
    for dates in days
    loop
    add_list_element(listname,dates.sdate,dates.sdate,1);
    end loop;
    end;

  • My drop down options menu is transparent. Why is this happening & how do I fix it?

    Ever since I've upgraded to Firefox 19 from 18 none of my drop down menus work, they're all completely transparent as you can see in the following screen shot: http://i.imgur.com/PvKyZ6K.png
    It's this way in every field in which drop down options appear, including the awesomebar (which is the most annoying).

    Did you try a clean reinstall?
    Do a clean reinstall and delete the Firefox program folder before (re)installing a fresh copy of the current Firefox release.
    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 21.0: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible, to cleanup the Windows registry and settings in security software.
    *Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you will lose all personal data like bookmarks and passwords from profiles of other Firefox versions.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure that "remove personal data" is NOT selected when you uninstall Firefox.
    If you keep having problems then also create a new profile.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall
    Boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.

  • How do I move emailed photos to iPhoto with Lion? I've lost the drop down option.Karen

    How do I move emailed photos to iPhoto using Lion? I've lost the previous drop down option.
    Thank you, Karen

    There are multiple ways. I am not at my Lion machine at the moment, so I am not sure I can remember them all, but here is one: Click on the "Details" button in the upper right corner of the message. If there are image attachments, the drop down menu should appear.
    Or, try right click on the image. I think I saw "Add to iPhoto" in the contextual menu.

Maybe you are looking for

  • How can I change a name on my ipod

    How can I change the user name on my ipod. I'm trying to take my wife's account off my son's new Ipod

  • How to round off quantity in inventory

    Hi, How to avoid decimal places for PC(Piece) in the goods movement transactions..  I have given 0 decimal places in CUNI transaction. It is working properly for Production Order during Conrimation but it is not working in Inventory transactions like

  • Calling Desktop.open() on avi/mp3/wmv/etc (media) files.

    Hello all, I am using the Desktop class to open files on the desktop in my signed applet. This is working perfectly for ppt, pps, doc, xls, txt, jpg, pdf files. However, for some reason I am unable to launch any media-type files using this method. I

  • Do I need to restart database in change of spfile?

    Hi All, Do I need to restart database in change of spfile? my database is in 10.2.0.3 on AIX. and one more thing when I do more on spfile it displaying the contents that is readable i am thinking that spfile is binary file so how it can be possible.

  • Where is radius/tacacs communication taking place

    hello, if iam logging in to a domain, and my domain is configured for an authentication to an ACS, where is the radius/tacacs communication taking place? - is it from client to ACS - or is it from domain to ACS