struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Puneet Lakhina" <puneet.lakh...@gmail.com>
Subject Re: DynaActionForm indexed properties
Date Fri, 03 Nov 2006 15:40:26 GMT
On 11/3/06, Niall Pemberton <niall.pemberton@gmail.com> wrote:
>
> On 11/2/06, Puneet Lakhina <puneet.lakhina@gmail.com> wrote:
> > Hi,
> > This is the first time I am trying to use indexed properties with
> > DynaActionForm. Now the number of fields that I will have is not
> certain. So
> > does that mean I cant use DynaActionForm. And i don't have normal
> strings in
> > my list. I have a custom object.
> >
> > so what i have currently is something like this
> >
> > <form-bean name="dynaForm" type="org.apache.struts.action.DynaActionForm
> ">
> > <form-property name="number" type="mypackage.Number[]" />
> > </form-bean>
> >
> > I cant specify any size because I don't know the size before hand. So
> this
> > has no problems loading the page, but on submit it throws an
> > ArrayIndexOutOfBoundsException.
>
> LazyDynaBeans automatically grows Lists and arrays to the right size:
>
>
> http://struts.apache.org/1.x/userGuide/building_controller.html#lazy_action_form_classes


Thanks seems like the exact thing I wanted. But I'm stuck on struts 1.1 at
my workplace and based on this
http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html LazyActionform
has been added to struts 1.2.6
Is it possible to plug this thing into 1.1?has anybody done that?
Thanks

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


-- 
Puneet

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message