IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Dynamic Server Page multiple select options only shows first element in target dsp page

  • 1.  Dynamic Server Page multiple select options only shows first element in target dsp page

    Posted Thu August 22, 2013 08:18 PM

    I have following index.dsp:

        <select name="selectedOptions" multiple>
    <option value="0">0</option>
    <option value="1">1</option>
    <option value="2">2</option>
    </select>
    <input type=submit value="Submit"/>
    

    And the result.dsp is as following:

    Result Page

    %loop selectedOptions%
    Index=%value $index%:Value=%value selectedOptions%

    %endloop%


    Although the URL address shows selectedOptions=1&selectedOptions=2 as parameter name/value pairs being passed, the result.dsp only displays the first element.

    What am I missing?


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 2.  RE: Dynamic Server Page multiple select options only shows first element in target dsp page

    Posted Fri August 23, 2013 02:04 PM

    DSP will always create two fields for each field from the form:
    fieldname contain the first value, as string type
    fieldnameList contain all the values if there are more than one, as string array
    in the pipeline.

    So, you can change your code to:

    %loop selectedOptionsList%
    Index=%value $index%:Value=%value selectedOptionsList%

    %endloop%


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 3.  RE: Dynamic Server Page multiple select options only shows first element in target dsp page

    Posted Fri August 23, 2013 04:07 PM


  • 4.  RE: Dynamic Server Page multiple select options only shows first element in target dsp page

    Posted Fri August 23, 2013 04:43 PM