DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Struts Form Bean Setter method not getting invoked for Select Box

  1. #1
    Join Date
    Dec 2006
    Posts
    2

    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 :

    <html:select title="sel1" property="selectedInquiryTypes" size="5" multiple="multiple" name="userPreferencesForm">
    <htmlptions 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

  2. #2
    Join Date
    Dec 2006
    Posts
    2

    Pls reply

    Thanks
    Madhan

  3. #3
    Join Date
    May 2008
    Posts
    1
    if u've found the solution help me

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Quote Originally Posted by sedan85
    if u've found the solution help me
    Are you running the same kind of code as the OP?

Similar Threads

  1. Adding 2 images into rich text box using clib board method
    By Slatibartfast in forum VB Classic
    Replies: 2
    Last Post: 01-22-2007, 05:59 PM
  2. Replies: 3
    Last Post: 01-07-2006, 12:19 PM
  3. Replies: 0
    Last Post: 02-20-2005, 02:06 PM
  4. Replies: 0
    Last Post: 09-28-2002, 06:23 PM
  5. Replies: 0
    Last Post: 04-11-2002, 06:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center