Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
Struts
Populate list using Struts2
Pooja Shah
Greenhorn
Posts: 13
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi pooja..
can you please provide the details what you really want??
Thanks.
Good luck!!
A small leak can sink a Gigantic ship.>
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
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...