File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Fatching data  problem from  html:selection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Fatching data  problem from  html:selection " Watch "Fatching data  problem from  html:selection " New topic
Author

Fatching data problem from html:selection

Amit Indore
Ranch Hand

Joined: Jun 20, 2008
Posts: 31
Hi All,
Here i put my code:

My problem is that i want to fetch the value from ArrayList userList with the bases of 1,2,3.
please send me whole code.
Thank you
Amit Jain
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Since Lists in Java are zero based, this isn't possible. You would need to retrieve these three values with 0, 1, 2.

If each user has an ID and you're trying to retrieve a user by its ID, don't use an ArrayList at all. A Map allows you to retrieve values by their key, and that might be better suited to this task.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Fatching data problem from html:selection
 
Similar Threads
html:select problem
I can't get the struts working
Struts2 with Display tag issue
iterating ArrayList in forEach
exception while running code