java - Passing variable number of parameters from form in to action in struts 2 -


i using struts2 in application , have form in jsp submitted action class.

the number of input fields in form can vary @ runtime , hence action class can not have fixed setter , getter parameters. trying capture these variable number of inputs in single action class. want know if possible via struts 2 , if how can ? aware of input field names in form (input field names populated via iterator in jsp form).

note: 1) aware of way capture form values (parameters) in action class via appropriate getter , setter form values in action class. 2) have gone through model driven action described in struts 2 http://struts.apache.org/2.3.1/docs/model-driven.html

i not solution on searching , appreciated.

form population code:

<s:form action="/reports/getreport.action" cssclass="table_with_padding">    <s:iterator value="reportparamslist.items" id="paramlist_item">        <tr><td><s:property value="#paramlist_item.paramdesc" /></td><td><s:textfield name="#paramlist_item.paramname" /></td></tr>     </s:iterator>     <s:submit theme="ajax" loadingtext="%{getresource('sitewide.loading.text')}" targets="app_area" type="button" align="left" cssclass="app_form_button" value="submit" /> </s:form> 

just take list in form , bind data list on view


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -