struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathew, Manoj" <Mathew.Ma...@principal.com>
Subject RE: ArrayList and DynaActionForm
Date Wed, 28 Apr 2004 13:28:45 GMT
so i need to fill the list with vaues in any action before throwing the jsp page.Right?
But in my case, the size is not fixed. Some time it will have 100 and in other time it will
have just 10 values.

Richard , I think i missed some. I don't know where to write the retest()method since i am
using DynaActionForm

Please help me out guys.

Thank-you,
Manoj Mathew

-----Original Message-----
From: Takhar, Sandeep [mailto:Sandeep.Takhar@CIBC.ca]
Sent: Wednesday, April 28, 2004 6:15 AM
To: Struts Users Mailing List
Subject: RE: ArrayList and DynaActionForm


Someone else may have replied, but even though these seem like overkill and although I haven't
implemented either I would suggest:

http://www.niallp.pwp.blueyonder.co.uk/
For lazyDynaValidatorForm

and

http://www.rabago.net/struts/formdef 

sandeep

-----Original Message-----
From: Mathew, Manoj [mailto:Mathew.Manoj@principal.com]
Sent: Tuesday, April 27, 2004 3:32 PM
To: Struts Users Mailing List
Subject: RE: ArrayList and DynaActionForm


I a m using request scope.
So i need to go for lazylist implementation.

Would you go little more in detail?



Thank-you,
Manoj Mathew
-----Original Message-----
From: Takhar, Sandeep [mailto:Sandeep.Takhar@CIBC.ca]
Sent: Tuesday, April 27, 2004 2:23 PM
To: Struts Users Mailing List
Subject: RE: ArrayList and DynaActionForm


form.set("list", new ArrayList());

should work

Problem is that unless you are using a lazy list implementation of some sort or session scope,
the list won't be initialized for your populate.

sandeep

-----Original Message-----
From: Mathew, Manoj [mailto:Mathew.Manoj@principal.com]
Sent: Tuesday, April 27, 2004 3:16 PM
To: Struts Users Mailing List
Subject: RE: ArrayList and DynaActionForm


Richard

  Actually i have implemented Action forms which have List as element. It's fine.
But my issue is when i put List as an element of DynaActionForm? In this case i don't have
setters and getters and i cannot prepopulate it.

Thank-you,
Manoj Mathew

-----Original Message-----
From: Richard Yee [mailto:ryee86@yahoo.com]
Sent: Tuesday, April 27, 2004 1:13 PM
To: Struts Users Mailing List
Subject: RE: ArrayList and DynaActionForm


Mathew,
See:
http://marc.theaimsgroup.com/?l=struts-user&m=108261575210769&w=2

The thread subject is:  Re: How to pre-populate values
to <nested:radio> buttons from

The date was 4/22/04.

Regards,

Richard

--- "Mathew, Manoj" <Mathew.Manoj@principal.com>
wrote:
> 
> 
> Narayan
> 
> you got the answer for this? Can you please share
> that with me?
> I searched the Archive, but couldn't find Richard's
> earlier solution.
> I am using 
> <form-bean name="creditCostsForm" type="...">
>         <form-property name="creditCosts"
> type="java.util.ArrayList" />
> 
> but gettingArrayIndexoutofBond while setting...
> 
> matt
> 
> 
> -----Original Message-----
> From: Richard Yee [mailto:ryee86@yahoo.com]
> Sent: Monday, April 26, 2004 4:45 PM
> To: Struts Users Mailing List
> Subject: Re: ArrayList and DynaActionForm
> 
> 
> If you have a fixed # of elements or if you put the
> count of elements in your form bean, you can put
> code
> in your reset() method to initialize the List
> attribute with the proper # of elements. This will
> enable you to use request scope and not use the
> LazyList. If you check the archives, I answered
> another question about a week ago on this and
> provided
> step-by-step instructions.
> 
> Regards,
> 
> Richard
> 
> 
> --- narayanan a <sna_narayanan@yahoo.com> wrote:
> > All,
> > 
> > I have an ArrayList in a DynaActionForm. I am
> > populating the ArrayList in my Action class and
> > displaying the list as text boxes in the JSP page.
> > When the user clicks on the submit button, Struts
> is
> > not able to put back the values into the ArrayList
> > and
> > it throws IndexOutOfBoundsException. The form bean
> > is
> > in request scope. This problem can be solved by
> > putting the form bean in session scope, but I do
> not
> > want to do that. 
> > 
> > Any help would be appreciated.
> > 
> > Thanks
> > 
> > 
> > 	
> > 		
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Photos: High-quality 4x6 digital prints for
> > 25¢
> > http://photos.yahoo.com/ph/print_splash
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
> > 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25¢
> http://photos.yahoo.com/ph/print_splash
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

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


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

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


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

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


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


Mime
View raw message