aspose file tools*
The moose likes Struts and the fly likes iterate list issue... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "iterate list issue..." Watch "iterate list issue..." New topic
Author

iterate list issue...

Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336

I have an ArrayList in action class with a getter...

I can see the values by pringting them...Now in the UI I have an iterator for it with same name and yet it doesn't populate anything...

What could be the reason values are not populated in UI....



Action class...
---------------------



in JSP:
---------




this is what is present in rendered HTML...



Is there a problem with the above one??
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
This should suffice because the current object is on the top of the value stack:



OCJP 6 (93%)
Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
Nope... Makes no change! Struggling for days now wonder what could be ?
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Can you show me the action's mapping from struts.xml? You're not accessing the .jsp directly in the browser, right..?
Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
No Iamn't !

Here it is... The mapping is fine I suppose...

Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Could you post the code of the getter method..?
Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336





This is the actual ArrayList....


with simple the getter isn't called but for the index(intially posted) one it is getting called twice...

The variable X was to keep track of getter method !!!

I can see the values in the console properly getting displayed but not in the UI...
Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
Do you have a getter for myList?
Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
ohh ! wrongun... this is the one...




Lorand Komaromi
Ranch Hand

Joined: Oct 08, 2009
Posts: 276
What does your URL look like when you open the page in the browser?
Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
This is it ....





 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: iterate list issue...
 
Similar Threads
s:iterator issue
object cascading in a template
struts-2 value stack issue...
Struts 2: how to set response for ajax function call?
passing hidden value to action class in struts-2