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
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: 61413
    
  67

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to retrieve the values of dynamically created text boxes in jsp