Im populating customer data by iterating a customer list as following in the jsp.
Now in the action either edit or delete each record i want to track which customer needs to be edit/delete. So in servlet how can i access the customer object which is in var listItems. If its not possible do i need to have hidden input variables with values and access them using getParameter in servlet?
Yes, only form elements are submitted as part of a form.
Remember that once the response leaves the server that it's just an HTML page. So there's no way that a JSTL value (or any other server-side value) can be submitted with a form that only exists on the client.
Bear Bibeault wrote:Yes, only form elements are submitted as part of a form.
Yes but defining hidden input variable does not gives a solution for identify which customer detail like fname to either edit or delete that record. Because it will eventually have a list of hidden input variables with same name and different values.
How is the user choosing which of the displayed items is to be submitted?
Joined: Jun 11, 2007
Bear Bibeault wrote:How is the user choosing which of the displayed items is to be submitted?
Thank you for the answer. Its like a data grid where each customer records are displayed with edit/delete button next to it. So once the user click on delete for example that cutomer information should be delete. So for that need to send the fname for the servlet to process know. That's where i need to know how to track it.