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 How to get value from dynamic textfield 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 "How to get value from dynamic textfield" Watch "How to get value from dynamic textfield" New topic
Author

How to get value from dynamic textfield

manish krishnan
Greenhorn

Joined: May 11, 2010
Posts: 26
Hi in my application i have to display text-fields dynamically. now my problem is how to retrieve data of the field in action.
please help me.. give me some idea.
lokesh pattajoshi
Ranch Hand

Joined: Jul 29, 2009
Posts: 130
Hi,

You can give text field name dynamically and retrieve the value using that dynamic name.

Regards,
Lokesh
manish krishnan
Greenhorn

Joined: May 11, 2010
Posts: 26
hi lokesh
can you explain with an example.. do you know any link for referring..
lokesh pattajoshi
Ranch Hand

Joined: Jul 29, 2009
Posts: 130
I think you will be creating dynamic text boxes in loop follow example below\



Hope it helps you.

Regards,
Lokesh

manish krishnan
Greenhorn

Joined: May 11, 2010
Posts: 26
Lokesh can we implement this in Struts.

Thanking You
Manish
lokesh pattajoshi
Ranch Hand

Joined: Jul 29, 2009
Posts: 130
Yes why not in action also you can get value from request parameter.
Jaimesh M Ponkia
Greenhorn

Joined: Nov 24, 2010
Posts: 21
If you are using a tag lib to display the text box, then have a list which would hold the property of the text box and iterate through the list to display the text box.
manish krishnan
Greenhorn

Joined: May 11, 2010
Posts: 26
is it possible to get name, value pair from Value Stack

Thanking You
Manish
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get value from dynamic textfield
 
Similar Threads
Is running a servlet from the startup script possible
IBatis - using user credentials
how to complie jsp
What is struts?
how to post my question