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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How to pass multiple select values from a checkbox in a form

  • 1.  How to pass multiple select values from a checkbox in a form

    Posted Mon June 25, 2007 11:43 PM

    Hi,
    My requirement is to pass the values of the selected checkboxes from a form to a PCA method. I have tried using getRequest().getParameter(“param”), but that does not seem to return me the checkbox values. Please assit.
    Thanks & Regards,
    Rumki


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 2.  RE: How to pass multiple select values from a checkbox in a form

    Posted Tue July 10, 2007 02:06 PM

    Make sure you use a jsp portlet:controller tag to draw the form. Optionally, you can use a ui:propertyLine or ui:propertyEditor tag to draw the checkboxes:

    <portlet:controller method=“myPcaMethod” context=“form”>


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 3.  RE: How to pass multiple select values from a checkbox in a form

    Posted Tue July 10, 2007 02:07 PM

    Make sure you use a jsp portlet:controller tag to draw the form. Optionally, you can use a ui:propertyline or ui:propertyeditor tag to draw the checkboxes:

    <portlet:controller method=“myPcaMethod” context=“form”>

    ui:propertyline
    <util:param name=“property_line_title”>My Checkboxes Title</util:param>
    <util:param name=“property_line_type” value=“checkbox-multiple” />
    <util:param name=“property_line_name” value=“myCheckboxes” />
    <util:param name=“property_line_value” value=“foo” />
    <util:param name=“values” value=“foo,bar,baz” />
    <util:param name=“titles”>Foo,Bar,Baz</util:param>
    </ui:propertyLine>

    </portlet:controller>

    In your pca method, use the portlet bean’s getProperty() method to get the form parameter values:

    public void myPcaMethod() throws Exception {
    Object myCheckboxes = getProperty(“myCheckboxes”);
    // …
    }

    If I remember correctly, the myCheckboxes property should be a comma-separated list of selected checkbox values.</ui:propertyEditor></ui:propertyLine></portlet:controller>


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods