I figured out one of my problems. Now, it calls the setter method in a form bean, but
when it gets to the action class, the String[] variable for storing multibox selection
is empty. Do you know what I'm missing?
Thanks,
Tuan
> -----Original Message-----
> From: Tuan H. Le
> Sent: Tuesday, December 03, 2002 9:42 AM
> To: Struts Users Mailing List (E-mail)
> Subject: html:multibox values not populated in the form bean
>
> Hi,
>
> I'm having a problem that the setter method in the form bean does not get called
>when I submit an HTML form with a <html:multibox> to an action class.
>
> I read some of previous related posts in the archives, but I couldn' t find a
>solution to this problem. Please advise on how to troubleshoot this problem. Thanks!
>
> Here's my code
>
> ------- JSP code -----------------------
>
> <html:form action="/approveSubmit"
> name="approveSubmitForm"
> type="com.phs.ezhr.presentation.form.ApproveSubmitForm"
> method="post"
> target="_parent">
> ...
>
> <logic:present name="employeeList" scope="session">
> <logic:iterate id="employee" name="employeeList" scope="session"
>type="com.phs.ezhr.business.vo.EmployeeVO" indexId="idx" offset="offset" length="25"
>>
> <td>
> <html:multibox property='approveList' value='<%=employeeId%>'
>onclick='selectChoice( this.form, this )'>
> </html:multibox>
> </td>
> ...
>
> </logic:iterate>
> </logic:present>
> </html:form>
>
>
> ------ Generated HTML code ---------
>
> <form name="approveSubmitForm" method="post" action="/focaltool/approveSubmit.do"
>target="_parent"><input type="hidden" name="org.apache.struts.taglib.html.TOKEN"
>value="3eaa663392c1d65f7d5dbcd81f5498a4">
>
> <table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%">
> <tr>
> <td bgcolor="#F9B949" width="17"> </td>
> <td valign="top">
> <table cellspacing="0" cellpadding="0" border="0">
> <!-- Iterate over the results of the query. Max of 25 records per page -->
> <tr>
> <td rowspan="500" width="9"> </td>
> <td>
> <input type="checkbox" name="approveList" value="000001">
> </td>
> <td> </td>
>
> ...
>
> ------------ Form bean ------------------
>
>
> private String[] approveList;
>
> /**
> * Set the approve checkbox list array
> * @param anApproveList
> */
> public void setApproveList( String[] anApproveList ) {
> System.out.println( "Setter method for approve list get
>called!!!!!!!!!!!!!!!!!!!!!!!!!!" );
> this.approveList = anApproveList;
> }
>
> public String[] getApproveList() {
> return this.approveList;
> }
>
> public void reset( ActionMapping mapping,
> HttpServletRequest request ) {
>
> }
>
>
>
> << File: ATT43476.txt >>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>