FAQs
Search
Recent Topics
Flagged Topics
Hot Topics
Best Topics
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Bear Bibeault
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
Tim Cooke
Junilu Lacar
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Jj Roberts
Carey Brown
Bartenders:
salvin francis
Frits Walraven
Piet Souris
Forum:
Struts
Populate list using Struts2
Pooja Shah
Greenhorn
Posts: 13
posted 10 years ago
Hi,
I am trying to populate a list within an iterator.
The list i am trying to populate is different from the one i am iterating over.
The code listing is as below -
<s:iterator value="providerInformations" status="status" var="statusVar"> <tr height="40px"> <td class="tdLabel"><s:property value="provider" /><s:text name="forecaster.current"></s:text></td> <td><s:textfield theme="simple" name="trunkInformation[statusVar].providers" ></s:textfield> </tr> </s:iterator>
I have tried several variations but none seem to work.
Hrishikesh Maluskar
Ranch Hand
Posts: 115
posted 10 years ago
Java->
myList99 = new ArrayList<User>(); while (rst.next()) { String id = rst.getString(1); String firstName = rst.getString(2); String address = rst.getString(7); String description = rst.getString(8); String views = rst.getString(11); User user = new User(); user.setId(id); user.setFirstName(firstName); user.setAddress(address); user.setDescription(description); user.setViews(views); myList99.add(user);
JSP->
<s:iterator value="myList"> <td> <td><font color="black" class = LblFnt><s:property value="address" /></FONT></td> <td><font color="black" class = LblFnt><s:property value="description" /></FONT></td> <td><font color="black" class = LblFnt><s:property value="views" /></FONT></td> </s:iterator>
SCJP 1.5
www.licexpadvice.com
Pooja Shah
Greenhorn
Posts: 13
posted 10 years ago
Thanks for the response.
However, the property that I want to populate is a list.
The example shows primitive types.
Raza Mohd
Ranch Hand
Posts: 247
I like...
posted 10 years ago
hi pooja..
can you please provide the details what you really want??
Thanks.
Good luck!!
A small leak can sink a Gigantic ship.>
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
[Struts 2] How to populate select control after selection of a value in another select control
How to get Iterating value in a list of VO struts2
Label key value in struts2
Struts 2 checkboxlist error - list key could not be resolved
s:radio and display tag
More...