File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes ONGL Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ONGL Question" Watch "ONGL Question" New topic

ONGL Question

Saravanan Vijayappan
Ranch Hand

Joined: Jan 02, 2007
Posts: 47

I am storing the below Catalog objects in List catalogList = new ArrayList() in action and it has correct getter/setter methods, how can access the fields from Catalog object in jsp through OGNL.

I tried the below OGNL expression in my jsp, but %{cat['name']} is not returning a value but the iterator works, Can some one please let me know the correct syntax to fetch the value from Object property. Thanks

Cheers,<br />Sarav
Saravanan Vijayappan
Ranch Hand

Joined: Jan 02, 2007
Posts: 47
I got the answer, I use this

1. <s:iterator id="cat" value="catalogList">
2. <s:submit value="%{name]}"/>
3. </s:iterator>
I agree. Here's the link:
subject: ONGL Question
Similar Threads
Struts2 test condition in s:if not working
Struts 2 forms and collections
Struts2 nested iterators with listboxes
Storing of Data
Struts2 - <s:iterator> in two-Dimensional Array.