You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Samyukta Akunuru <Sa...@info-engineering.com> on 2004/02/12 21:12:31 UTC

String[] in the form bean

Wendy,

Thanks for the quick reply. I did as follows but get the error:
javax.servlet.jsp.JspException: No getter method available for property ids for bean under name org.apache.struts.taglib.html.BEAN
Though I have getters in my bean and I made "ids" as a hidden field in my jsp.

Thanks,
Samy

-----Original Message-----
From: Wendy Smoak [mailto:Wendy.Smoak@asu.edu]
Sent: Wednesday, February 11, 2004 5:05 PM
To: Struts Users Mailing List
Subject: RE: [OT] - Request against Session


> From: Samyukta Akunuru [mailto:Samyukta.Akunuru@info-engineering.com] 
> Using session/hidden variables-what would be the best way to 
> carry the array of selected checkboxes to the next page.

(Please trim your posts.)

I assume there's a String[] in your form bean.  You can iterate over it
and write out several <html:hidden> tags with the appropriate values.
Struts should fill up your String[] property again when the resulting
form is submitted.  

But just putting the form bean in session scope should solve it.  You'll
have to be careful in the 'reset' method, but other than that the form
bean will keep all your values as you go along.
        <action
            path="/accountInquiry"
            type="com.example.AccountInquiryAction"
            name="accountForm"
            scope="session"    
            ...

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org