Process multiple select form element in JSTL

I am trying to retrieve the values from a multiple select dropdown. From searching the forums, I now know that I need to use getParameterValues instead of getParameter in JSP. However, how would like to do this in JSTL with the core tags? Here is the code I now have (but it only prints the first element selected from the multiple select.
    <c:forEach var="map_entry" items="${param}">
      <strong><c:out value="${map_entry.key}"/></strong>
      <c:out value="${map_entry.value}"/><br />
      <c:forEach var='stuff' items='${map_entry.value}'>
        <c:out value='${stuff}'/><br /><br />
      </c:forEach>
    </c:forEach>Notice the second foreach loop doesn't work (it only prints the first value). Any ideas? Thanks!

use something like this:
<c:forEach var="elem" items="${paramValues.multipleSelect}">
<c:out value="${elem}"></c:out>
</c:forEach>
the key is "paramValues" instead of "param"
regards, Alex

Similar Messages

  • Why can't I use 'process multiple files' in elements 12?

    why can't I use 'process multiple files' in elements 12?

    Problem now fixed thanks.
    Sent from John's iPhone

  • How to process Multiple Select

    In the html page, for a SELECT with MULTIPLE enabled, such as:
    <html:form action="send.do">
    <html:hidden property="idValueHidden"/>     
    <select id="test" name="search_type" size="4" multiple onChange="javascript:GetValue()
         <option value="a" selected>A</option>
         <option value="b" selected>B</option>
         <option value="c" selected>C</option>
         <option value="d" selected>D</option>
    In the GetValue()
    For a single selected, I can do:
    document.forms[0].idValueHidden.value = document.forms[0].search_type.selectedIndex;          
    But now the multiple entries are selected. I'll get multiple selectedIndex. Question now is how to get and process the selectedIndex(es) and assign to idValueHidden in the javascripts GetValue()? (I guess I need to somehow declare idValueHidden as an array then through a loop to do the get/set).
    Thanks.
    Scott

    Hi,
    Check out Steve's sample #16 "Deleting Multiple Employees Based on Selected Checkboxes" at http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html.
    Good luck,
    Hernando
    hjbconsulting at comcast dot net

  • Multiple selection Forms in JSP

    I have a JSP page that should insert as many as selected choices on
              the forms into a sql server database.
              This example is done in ASP:
              http://www.codeave.com/ASP/multiple_where.asp
              

    "Sam" <[email protected]> wrote in message
              news:[email protected]..
              > There is 1 JSP page which needs to process as many as selected rows on
              > the form <OPTION> MULTIPLE.
              Sam,
              Is there a question in your last two posts or are you just sharing
              statements of fact with us ;)
              

  • Best way to create a multiple select form?

    I have been trying to create a form that will allow selection parameters to be entered to populate a list that the user can then select one or more of the values in the list for use in another form.
    The following is the code I have come up with so far:
    DECLARE
    lc_query VARCHAR2(32767);
    lc_where VARCHAR(4000);
    BEGIN
    lc_query := 'SELECT HTMLDB_ITEM.CHECKBOX(1,ROWNUM) AS prd_check, '||
    ' HTMLDB_ITEM.HIDDEN(2,a.asset_id) AS asset_id, '||
    ' sup.name||'' ''||prd.description|| '||'' Asset Tag:''||a.asset_tag '||'' Serial Number:''||a.serial_number AS asset_name '||
    'FROM supplier sup, '||
    ' product prd, '||
    ' asset a '||
    'WHERE a.prd_id = prd.prd_id '||
    'AND prd.sup_id = sup.sup_id '||
    'AND a.hardware_software = ''HDW'' '||
    'AND a.responsibility_indicator IN (''1'',''2'',''4'',''9'') ';
    IF :P4_AT_ID <> -1 THEN
    lc_where := lc_where ||' AND a.at_id = :P4_AT_ID';
    END IF;
    IF :P4_SUP_ID <> -1 THEN
    lc_where := lc_where ||' AND prd.sup_id = :P4_SUP_ID';
    END IF;
    IF :P4_PRD_ID <> -1 THEN
    lc_where := lc_where ||' AND a.prd_id = :P4_PRD_ID';
    END IF;
    IF :P4_SELECTION IS NOT NULL THEN
    lc_where := lc_where
    ||' AND ( UPPER(a.asset_tag) LIKE ''%''||UPPER(:P4_SELECTION)||''%''
    OR UPPER(a.serial_number) LIKE ''%''||UPPER(:P4_SELECTION)||''%''
    OR UPPER(a.reference_number) LIKE ''%''||UPPER(:P4_SELECTION)||''%''
    OR UPPER(prd.description) LIKE ''%''||UPPER(:P4_SELECTION)||''%'' ) ';
    END IF;
    lc_query := lc_query ||lc_where;
    RETURN lc_query;
    END;
    I then call the following process that calls a package to insert the rows into my base table of the calling form:
    DECLARE
    l_asset_id NUMBER;
    BEGIN
    IF HTMLDB_APPLICATION.G_F01.COUNT > 0 THEN
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    l_asset_id := TO_NUMBER(HTMLDB_APPLICATION.G_F02(HTMLDB_APPLICATION.G_F01(i)));
    survey_pkg.p_ins_ua ( p_prsn_id => TO_NUMBER(:P4_PRSN_ID),
    p_asset_id => l_asset_id,
    p_eftv_from => TRUNC(SYSDATE));
    END LOOP;
    END IF;
    END;
    However, if the search query does not narrow down enough rows (about 50 rows) I get an ORA-01403 error on selection of the rows.
    Question:
    Is this the correct approach?
    If YES then does anyone know where I have gone wrong?
    If NO then what is a better approach?
    Thanks in anticipation,
    Jon

    In the end I abandonded the use of using HTMLDB_ITEM and HTMLDB_APPLICATION packages and went back to more standard functionality.
    Rather than developing a report using the function above I instead created a multi-select list ITEM and created a List of Values for this based on the function above. This then changes the values in the list on change of my selection criteria. The underlying item then provides my input into my package to create values in the other form, much tidier solution!

  • Process multiple files elements 11

    When I try to process multiple files on elements 11 the option is greyed out can anyone tell me why that might be happening?

    Generally that means that you are in guided of basic mode. Switch to 'Expert' mode and that should do it.

  • Multiple select multipart/form-data + FileUploader

    Hi
    I'm using asp multiple select form field with
    multipart/form-data +
    FileUploader to upload a file (works fine) and writing the
    contents of
    a form to a database which works fine apart from the multiple
    select
    which although allows me to select multiple items only
    returns the
    first selected item to the database.
    Anywork arounds to this??
    Thanks in advance!!
    Buzby
    There's nothing more dangerous than a resourceful idiot

    Multi-part requests are not packaged the same as regular requests, so the getParameter() method doesn't work on it (although I think it would get anything passed through the query string as part of the action parameter but I'm not sure).
    You can also try the com.oreilly.servlet class MultipartRequest. I don't know if that's the same one found in the www.servlets.com link, but it is REALLY easy. Essentially, it looks like this:
    MultipartRequest mr = new MultipartRequest(request, "[pathtosavefiles]'");
    String param = mr.getParameter("paramname");
    So instead of calling getParameter() on the request object, you now instead call it on the MultipartRequest object. When you instantiate the MultipartRequest object, it parses the request body for you, and also saves any uploaded files into the directory you specified in your path in the constructor.
    I hope that helps.
    Michael

  • FORM MULTIPLE SELECT JAVASCRIPT

    Some folks have posted that Javascript could be used to provide a multiple-select option on a form element (users can select multiple values, which are processed into one csv string by Javascript and sent back to the appropriate column in a table)
    If you know how to do this, could you please post, step by step, how this could be accomplished. Say for a case where an employee in EMP could work in multiple departments, the DEPTNO value was a varchar and the form would enable something like 10,20,40 to be entered into the DEPTNO column via a multiple select
    I'm using 3.09

    I would also be interested in this. I've already done it the hard way...(actually it wasn't too bad after all) by writing my own function to parse the list of values and then validate them one at a time. It would be nice to be able to pick them from a list...

  • Struts: getting multiple selected values from a select element

    Hi Friends,
    I am a total newbie with struts,I have manage to run a simple login script,
    Now I was wonderingif there is a select box and user has the ability to select multiple values from it how do I get those values in the *Form class
    my select tag looks like this
    <html:select property="listboxValue" mulitple="mulitple">
    ...options--
    </html:select>
    in the ****Form extends ActionForm{....I have setter and getters for getting the value  from select box as below
    public void setListboxValue(String value){
    this.listboxValue = value;
    and the getter is
    public String getListboxValue(){
    return this.listboxValue ;
    please never mind the missing brackets and such.
    What I was hoping to get to work was something like this
    public void setListboxValue(String[] value){
    this.listboxValue = value;
    but that does not work...If I have the an array being passed,it seems like this method is no even envoked
    Please guide me
    Thanks

    I'm having trouble to get in the ActionForm all the selected values in my multiple select. I select all the values by setting to true the selected attribute of all the options in a javascript function. In the ActionForm the variable is String[]. I'm not getting any ClassCastException, but I only receive the first value selected (String array with just one element).
    Select definition:
    <html:select name="detalleConsultaForm" property="destinatarios" multiple="true" size="8" >
    Javascript function:
    function validalistarelacion(campo)
    {   if (campo.length < 1)
    alert("Campo sin valores");
    campo.select();
    return false;
    for (var i = 0; i < campo.length; i++)
    campo.options.selected = true;
    return true;
    ActionForm:
    String[] destinatarios;
    public String[] getDestinatarios() {
    return destinatarios;
    public void setDestinatarios(String[] destinatarios) {
    this.destinatarios = destinatarios;
    What I get:
    2006-03-30 12:54:19,899 [ExecuteThread: '10' for queue: 'weblogic.kernel.Default'] DEBUG BeanUtils - setProperty(es.tme.apl.mante
    nimientosPlanificados.form.DetalleConsultaForm@59def5, destinatarios, [2320])
    2006-03-30 12:54:19,899 [ExecuteThread: '10' for queue: 'weblogic.kernel.Default'] DEBUG ConvertUtils - Convert String[1] to class
    'java.lang.String[]'
    Thnx

  • Sub folders and Process multiple files in Photoshop Elements 10

    I am looking to apply the same adjustments to numerous images in numerous sub-folders and overwrite the original images.
    Using the Process Multiple Files options,  I added the main folder (which contains no images) to the Source field, selected the Include All Subfolders tick-box, also selected the Same as Source tick-box (which warns you original files will be overwritten) and then completed the image adjustments I required.   However, after running the process all the adjusted images were saved in the main folder and did not overwrite the originals contained in each sub-folder.  Does anyone know if there is a setting I am missing to replace the images in the sub-folders or is this by design ?

    bossti a écrit:
    hi, so is it possible to keep the same subfolder structure as output location? regards! bostjan
    No...
    I think you are going to run great risks in trying to use batch process like 'process multiple files' or 'export' while relying on subfolder structures.
    - the organizer is much more powerful with its database and keywords management than a folder structure organization,
    - Batch processes are limited in Elements
    - 'Good practice' calls for keeping originals intact.
    What are you wanting to do exactly ? We might be able to suggest alternative workflows.

  • Multiple selections in an HTML form

    The option selector (<select>...</select>) in an HTML form allows the
    user to make multiple selections. However, when the form parameters
    are posted to an XSQL page, only the first value selected will be
    assigned to the corresponding XSQL parameter.
    This is very unfortunate, because I would like the selected values to
    be used in a query like this:
    <xsql:query>
    select ...
    from ...
    where ...
    and elem in ({@list})
    and ...
    </xsql:query>
    where 'list' is the name of the option selector. However, since only
    the first value selected is substituted, the query does not work.
    The <xsql:include-request-params/> will "rowify" the values selected,
    but this can only be utilized by a style sheet associated with the
    XSQL page.
    Does anyone know how to get access to all the selected values in the
    XSQL page?
    HELP!

    Hi,
    Here is an approach that may work for you.
    In the registration process, assign each individual a userid...  e.g. bob123.
    When they log into your site, create a SESSION variable, SESSION.userid = bob123.
    In your db, for every player have two fields, one is the userid of the person that is attached to that player, and another field for the jersey number.  You could also have a field for assigned/unassigned.
    Populate the grid with the unassigned players.  Have the empty jersey number field on the grid and make it editable.  When an individual assigns a jersey number to the person, (you can have them update after each person selected or at the end), you can let a cfc update the db and using their SESSION.userid, they become the "owner" of that player.  The update also will update the db with their jersey number.  The update can also turn them from unassigned to assigned so noone else can "claim" them.
    Now anytime the user logs in, they'll have their players, easy to get to using a WHERE sql statement = WHERE SESSION.userid = bob123.
    cfwild

  • Get all the values from a multiple select in a multipart form

    Hi there!
    I am using a form with enctype="multipart/form-data" in order to upload files from the form.
    I have read this page: http://commons.apache.org/fileupload/using.html and everything works well for my form.
    The only problem is that I can't get all the values from a "multiple select" html object. I get only one value.
    Using servlets I have used this method:
    public java.lang.String[] getParameterValues(java.lang.String name) But now I have enctype="multipart/form-data" in my form and I can't use this way...
    Is there a way to get all the values of a multi-valued parameter?
    Thanks a lot!
    Stefano

    Hi
    I have got solution for this problem so, I am listing here logic
    assume tag name of html
    <select name="moption" multiple="multiple">
    iterate it in as
    String moption="";
    boolean cnt=true;
    while(itr.hasNext())
    FileItem fi=(FileItem)itr.next();
    if(fi.isFormField())
    if(fi.getFieldName().equals("moption"))
    if(cnt==true)
    moption=fi.getString();
    cnt=false;
    else
    moption=moption+","+fi.getString();
    If wants more help then mail me your problem
    at [email protected]
    Thanks!
    Anand Shankar
    Edited by: AnandShankar on 6 Nov, 2009 12:54 PM

  • How can i select multiple values form select list

    Hi ,
    I have created few items in a page and all items are Lov items and based on these items stacked charts will display. My requirement is I need to select multiple values form LOV's
    Eg: In Interactive report goto filter and select an item and expression as IN and select multiple items and i need to select multiple values like this.
    Please anybody help me how to get multiple values.
    I have one more doubt Can we have a Print preview option in APEX.
    I have to see print preview for stacked charts. is it possible?
    Regards
    Narender B

    HI ,
    Thank you for valuable information and looks good.but Here our client need to select multiple values.... for eg: Open IR report and click on Actions button --->select filter
    select any column , operator as IN and from expression select multiple items.
    I need to select multiple values in that way so, could you please guide me how can i achieve this.
    Regards
    Narender B

  • PhotoShop Elements 10...I need help with font size for watermark in Processing Multiple Files.....

    I have PhotoShop Elements 10, and I am trying to watermark some of my photos, I have successfully added them one at a time with a font large enough to be seen. Now I am trying to add it using the "process multiple files" , I can do that but the font even at 72 the largest setting is so small on the photo you can barely read it! Can anyone help me the size larger on my photos?

    Thank you, Michael. I just watched the Russell Brown video again for CS6 and looked real closely at his settings in ACR and he was using 240ppi. I changed my file in image size to 240 ppi and then ran the script and the layer didn't change size this time when I ran the script.
    It is kind of annoying to have to change the image size everytime I want to run this script and then change it back again as most of my files are 300 ppi. I used to run his script for edit in ARC in CS5 and recall that if I just remembered to change the settings in ARC to 300 ppi while the script was playing and before pressing 'open' that the image wouldn't change size during the raw processing, but this doesn't seem to be working in CS6. Do you know of a way to use this script and not have to change the ppi for the image to 240?
    Thanks again.

  • Multiple Select boxes in one form

    Does anyone know if it is possible to have multiple select
    boxes inside one form? I have six different select boxes that are
    generated by six separate queries. The action page for all six
    select boxes is the same so I just want one submit button so users
    don't get confuse. I don't want to cluster up the page with submit
    buttons but I may resort to that option.
    My problem is the select boxes generate a number and when
    that number is submitted I want to pass two other variables with it
    to the action page. I tried putting a "Form" tag around the 6
    select boxes. Inside each select box I tried to add an "Input
    type="hidden"" and give thte name and values that I needed. That
    worked for the first select box but when I tried the second select
    box it used the hidden values for the first select box.
    If anyone can help, I would greatly appreciate it. Or if you
    have any other suggestions I am open to any.
    Thanks

    Paross1,
    I wasn't thinking about that and you gave me a great idea.
    Here is how I changed my select boxes.
    <cfform
    action="Resolution_History.cfm?year=#year#&sessiontype=#sessiontype#&btype=res"
    name="form">
    <select name="SRINPUT">
    <option value="">SR
    <CFOUTPUT Query="findSR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="HRINPUT">
    <option value="">HR
    <CFOUTPUT Query="findHR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="SCRINPUT">
    <option value="">SCR
    <CFOUTPUT Query="findSCR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <br>
    <select name="HCRINPUT">
    <option value="">HCR
    <CFOUTPUT Query="findHCR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="SJRINPUT">
    <option value="">SJR
    <CFOUTPUT Query="findSJR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="HJRINPUT">
    <option value="">HJR
    <CFOUTPUT Query="findHJR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <INPUT TYPE="Submit" VALUE="Submit" alt="submit
    button">
    </cfform>
    On the action page I need the below IF statement to work so
    it will set the variables. It isn't working at this time. Its not
    bringing the values of billnumber, houseorig or the billtype.
    Do you have any thoughts? I know it is close. I need to set
    all of the inputs to input4 to generate my queries.
    <cfif form.srinput gt 0>
    <cfset houseorig eq "s">
    <cfset billtype eq "r">
    <cfset srinput eq input4>
    <cfelseif form.hrinput gt 0>
    <cfset houseorig eq "h">
    <cfset billtype eq "r">
    <cfset hrinput eq input4>
    <cfelseif form.scrinput gt 0>
    <cfset houseorig eq "sc">
    <cfset billtype eq "r">
    <cfset scrinput eq input4>
    <cfelseif form.hcrinput gt 0>
    <cfset houseorig eq "hc">
    <cfset billtype eq "r">
    <cfset hcrinput eq input4>
    <cfelseif form.sjrinput gt 0>
    <cfset houseorig eq "sj">
    <cfset billtype eq "r">
    <cfset sjrinput eq input4>
    <cfelse>
    <cfset houseorig eq "hj">
    <cfset billtype eq "r">
    <cfset hjrinput eq input4>
    </cfif>

Maybe you are looking for

  • ADOBE READER 8.1 WILL NOT WORK-KEEP GETTING ERROR MESSAGE 1606: COULD NOT ACCESS NETWORK LOCATION %APPDATA%

    Have tried to uninstall the Adobe Program but it will not let me.  I keep getting the 1606 error message.  I have went to the Microsoft Help site and it says that the registry may need to be modified.  They also advised you that if you do not modify

  • Error in XML Parsing

    Hi Experts, We have a JDBC to FILE scenario. In SXMB_MONI, the  XML structure is like this : <row>   <F1>No</F1>   <F2>2006-05-15 00:00:00.0</F2>    <F3>Ball Screw Inspection Tool - see ECM HS-060004-ECM</F3>       </row> In RWB, it becomes like this

  • How to handle paging in a databinded table

    hi i just builded a table which is filled by an executequery situated in my VO. my rows are displayed 10 by 10. when i click on the next button, the rows displayed stay the same. They are not refreshed. how can i display the next rows of my query ? t

  • Password Protect Part of a Director Movie

    Hi, I've recently purchased INM Impressario and i've added a bunch of PDFS to my director movie. I'll be handing this movie out to my students, but i would like only certain students to view certain pdf files. Is there a way i can either password pro

  • Oracle EBS virtual machine

    Hello, I am interrested to test Oracle EBS and evaluate its capabilities Is there a virtual machine that hold the whole Oracle EBS and is downladable on the net Thanks in advance