Ah! The answer of course is starring at me in my face.

public ActionForward perform( ActionMapping,
                    ActionForm form,
                    HttpServletRequest request.
                    HttpServletServlet response )

Ofcourse I can get a reference to `HttpServletRequest' and then
call "String [] mgetParameterValue()" myself in the Action method
itself. Doh!

Struts' ActionServlet cant populate array parameters in the ActionForm
bean or am I wrong?

Should the ActionForm have indexable get and set methods. But if it does
how does an ActionForm know how large the array is. In the first large. In the
JavaBean specification you cannot say "void setAddressesSize( int N )" to
set  the size of the array and then call "void setAddress(  String s, int idx )"
 for say 0 .. N-1 addresses.

--
Peter Pilgrim          |  |        ++44 (0)207-545-9923
            .... \  \  ___   /  / ... .
            -   ----  ( * )  ---   --
_____________________________Cafe_Savannah,_San Antonio,Ibiza__



---------------------------------------- Message History 
----------------------------------------


From: Peter Pilgrim/DMGIT/DMG UK/DeuBa@DMG UK on 31/08/2001 12:02

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Struts handling of checkbox parameter values


How does do perform "String [] HttpServletRequest.getParameterValues()"
with a Struts Action and Action Form?

If you a html form with a group of html checkbox elements like so

<input type="checkbox" name="fruits" value="apple" > apple
<input type="checkbox" name="fruits" value="orange" > orange
<input type="checkbox" name="fruits" value="pear" > pear

You would get an String array with raw Servlet request parameter.
Which looks like this "orange|apple| pear" assume all item were selected.

Tia
--
Peter Pilgrim          |  |        ++44 (0)207-545-9923
            .... \  \  ___   /  / ... .
            -   ----  ( * )  ---   --
_____________________________Cafe_Savannah,_San Antonio,Ibiza__



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.







--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.


Reply via email to