madhan_a
November 30th, 2006, 11:33 PM
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 :
<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
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 :
<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