|
-
December 1st, 2006, 12:33 AM
#1
Struts Form Bean Setter method not getting invoked for Select Box
Hi,
Could anyone help me to solve the following issue :
I have a Struts Form bean corresponding to a <html:form> in the JSP.
The JSP form consists of select box which allows multiple selection.
When the form gets submitted , the setter method for the options is not
getting invoked by the struts. In the form bean i have a String[] array
corresponding to the JSP select options. I have also tried using
ArrayList, but the same problem persists.
My JSP code snippet :
Code:
<html:select title="sel1" property="selectedInquiryTypes" size="5" multiple="multiple" name="userPreferencesForm">
<html:options name="userPreferencesForm" property="allInquiryTypes"/>
</html:select>
In the form bean , I have :
public String[] getSelectedInquiryTypes() {
return selectedInquiryTypes;
}
public void setSelectedInquiryTypes(String[] selectedInquiryTypes) {
this.selectedInquiryTypes = selectedInquiryTypes;
}
I get the following error :
javax.servlet.ServletException: Property allInquiryTypes returned a null value
Please help me by provifing ur thoughts.
Thanks,
Madhan
Last edited by Dr. Script; December 1st, 2006 at 06:58 PM.
-
December 1st, 2006, 12:36 AM
#2
Re: Struts Form Bean Setter method not getting invoked for Select Box
-
December 1st, 2006, 08:43 AM
#3
Re: Struts Form Bean Setter method not getting invoked for Select Box
 Originally Posted by madhan_a
Please reply.
Madhan
You didn't even wait 4 minutes for a reply?!!?!!?? You need to learn patience. In a forum, sometimes answers don't come for days.
Anyway, you posted in the wrong forum. JSP is a server-side language. You posted in the client-side. I will have a moderator move it.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|