aspose file tools*
The moose likes Struts and the fly likes Struts2: Retern all the values inside the list in my Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2: Retern all the values inside the list in my Action " Watch "Struts2: Retern all the values inside the list in my Action " New topic
Author

Struts2: Retern all the values inside the list in my Action

Paul Michael Serrano
Ranch Hand

Joined: Nov 22, 2004
Posts: 59
Good Day,

I have an ArrayList (wcAlerts - with getter and setter) in my action. I could properly display all the values inside my list with this code in my JSP



My question is, if I change my checkbox or dropdown list, could I get the all values within my iterator (wcAlerts will be updated)?

Thanks,
Paul
Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

hey Paul,

The only thing that is carried back to the action would be your "name" attirbute and nothing else... (only if you have the setMethod of the variable) your list wont reflect any changes that you have done... so I doubt...


Time is what we want the most, but what we use the worst. -- William Penn
Paul Michael Serrano
Ranch Hand

Joined: Nov 22, 2004
Posts: 59
Hi Robin,

I guess you are right... I've tried debugging it through eclipse, and when I looked at the value of my ArrayList (wcAlerts --> I do have getter and setter for this ArrayList) it is null. All the while I thought OGNL will handle this for us. The only visible variables to me are the variables outside wcAlerts arrayList. Anyway, does anyone have an idea how could I get the values from the form? I was thinking to create a FormBean that could get all the values from the jsp and create a temporary container for the value of my ArrayList(wcAlerts) I'll just remove my <s:iterator> tag.

Any suggestions are open.

Thanks,
Paul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2: Retern all the values inside the list in my Action