aspose file tools*
The moose likes JSP and the fly likes How to retrieve the values of dynamically created text boxes in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to retrieve the values of dynamically created text boxes in jsp" Watch "How to retrieve the values of dynamically created text boxes in jsp" New topic
Author

How to retrieve the values of dynamically created text boxes in jsp

sourav koner
Greenhorn

Joined: Sep 05, 2007
Posts: 1
HI, ALL

I am dynamically genearting text boxes on jsp. How do I access selected values in my action class when user clicks submit?

Following is my jsp.

<tr>
<th>Buyer</th>
<th>Transaction ID</th>
<th>Transaction Status</th>
<th>Name</th>
<th>Title</th>
<th>Unit Price</th>
<th>Enter Price</th>


</tr>

<c:forEach var="item" items="${plistname}"><tr>
<td> <c ut value="${item.productInterest.buyer}"/></td>
<td> <c ut value="${item.productInterest.transactionid}"/></td>
<td> <cut value="${item.productInterest.transactionstatus}"/></td>
<td> <cut value="${item.contactInfo.name}"/></td>
<td> <cut value="${item.product.name}"/></td>
<td> <cut value="${item.product.unitprice}"/></td>
<td> <input type="text" id="price" /></td>


Kindly help me.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

You have not given your text boxes names. Without names, the values will not be submitted as part of the request.

Once the controls have names, you would fetch their values using the usual mechanisms. The fact they were "dynamically created" as part of the original JSP is moot.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: How to retrieve the values of dynamically created text boxes in jsp
 
Similar Threads
Problem Passing Parameter values to action
dynamic text box value into database
need help :: multiple rows update without primary key
HTML table
Problem in hiding the row of data