You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Gallagher, Jim (RBoS ITD&S Dublin)" <Ji...@rbs.co.uk> on 2006/11/10 16:02:06 UTC

Question on formbeans and collections in iterate tags

Hi,

	I'm having an issue with a formbean not containing the data I expect
when returned from a JSP. I suspect this is a common problem, but despite
searches I can't find a solution on the net. Any assistance will be
gratefully received.

	My form consists of general data about a specific person, along with
an area about purchases. The purchases are listed using <logic:iterate>
tags, with a collection used to drive the iteration.

	On submission of the form I was hoping/expecting that the collection
would be populated into the same-named instance variable in the formbean,
allowing me to retrieve the changes made by the user in the JSP. However,
this is not happening as the formbean instance variable is null.

	Could anyone suggest a way forward or point me to web resource to
assist with this? I'm sure it's something I'm doing wrong, but I'm not sure
what.

	Thanks in advance,

			Jim



The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB

Authorised and regulated by the Financial Services Authority.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate.


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


Re: Question on formbeans and collections in iterate tags

Posted by Uday Karrothi <ka...@gmail.com>.
Even you ar settign all the values properly and getting the display
accurately. I do not think the changes you made to the Collection( in terms
of textboxes or checkboxes or Selections) will not reflect on the arrayList.
Atleast I failed in doing so. There are other ways liek using multiboxes,
indexing the properties etc.

i hope that was useful. I could give you examples but I am not sure if I am
addressing the problem right.

regards,
Uday Karrothi

On 11/10/06, Laurie Harper <la...@holoweb.net> wrote:
>
> Gallagher, Jim (RBoS ITD&S Dublin) wrote:
> > Hi,
> >
> >       I'm having an issue with a formbean not containing the data I
> expect
> > when returned from a JSP. I suspect this is a common problem, but
> despite
> > searches I can't find a solution on the net. Any assistance will be
> > gratefully received.
> >
> >       My form consists of general data about a specific person, along
> with
> > an area about purchases. The purchases are listed using <logic:iterate>
> > tags, with a collection used to drive the iteration.
> >
> >       On submission of the form I was hoping/expecting that the
> collection
> > would be populated into the same-named instance variable in the
> formbean,
> > allowing me to retrieve the changes made by the user in the JSP.
> However,
> > this is not happening as the formbean instance variable is null.
> >
> >       Could anyone suggest a way forward or point me to web resource to
> > assist with this? I'm sure it's something I'm doing wrong, but I'm not
> sure
> > what.
>
> We'd need a bit more information to be able to help much. What does your
> form bean look like? How is it configured in struts-config.xml? What do
> the relevant action mappings look like? And how is your JSP coded?
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Question on formbeans and collections in iterate tags

Posted by Laurie Harper <la...@holoweb.net>.
Gallagher, Jim (RBoS ITD&S Dublin) wrote:
> Hi,
> 
> 	I'm having an issue with a formbean not containing the data I expect
> when returned from a JSP. I suspect this is a common problem, but despite
> searches I can't find a solution on the net. Any assistance will be
> gratefully received.
> 
> 	My form consists of general data about a specific person, along with
> an area about purchases. The purchases are listed using <logic:iterate>
> tags, with a collection used to drive the iteration.
> 
> 	On submission of the form I was hoping/expecting that the collection
> would be populated into the same-named instance variable in the formbean,
> allowing me to retrieve the changes made by the user in the JSP. However,
> this is not happening as the formbean instance variable is null.
> 
> 	Could anyone suggest a way forward or point me to web resource to
> assist with this? I'm sure it's something I'm doing wrong, but I'm not sure
> what.

We'd need a bit more information to be able to help much. What does your 
form bean look like? How is it configured in struts-config.xml? What do 
the relevant action mappings look like? And how is your JSP coded?

L.


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