wood burning stoves
The moose likes Struts and the fly likes Bean, logic:iterate and ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Bean, logic:iterate and ActionForm" Watch "Bean, logic:iterate and ActionForm" New topic

Bean, logic:iterate and ActionForm

Luke Zechariah
Ranch Hand

Joined: Sep 27, 2005
Posts: 128
I have the following classes:
A bean class by name AssistanceRequest:

the action form:

the action class:

where arRqstArray is an array of AssistanceRequest objects i.e. bean objects.

On the jsp:

What I am trying to acheive is when I change anything on the "notes" property, I am not able to see the changed value in the action when I submit. Previously I used to get a null pointer exception so I have made the scope session. This solves the exception but that does not show the changed value of the notes.

If you put a code like

(see I have changed the name to actionform in the above snippet) it will work fine, because the "notes" property will be in the form. But if you put a bean inside a form and then try to change it, when you submit I am not able to store the changed property of the bean in the form.

What I mean is after submitting, in the action class:

The value printed shows the previous values of the property "notes" not the updated values from the jsp. So I have to store the changed value of the bean in the form.

Please help and thanks for your time.

I agree. Here's the link: http://aspose.com/file-tools
subject: Bean, logic:iterate and ActionForm
It's not a secret anymore!