• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Updation of multiple rows in databse using checkbox in jsp

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

I have a code where in a user can update mutliple rows of the html combox (selected using checkbox ) in jsp and send to the servlet action class.

<logic:iterate id="srData" name="dataList" indexId="srNo" >
<%i=i+1;%>
<td ><html:text name="srData" property="aaa" readonly="true"/></td>
<td ><html:text name="srData" property="bbb" readonly="true"/></td>
<td ><html:select name="srData<%=i%>" property="status" styleClass="combobox_medium" styleId="dataComboFormat">
<option value="<bean:write name="srData" property="statusCode"/>"> <bean:write name="srData" property="status"/> </option>
<html:optionsCollection name="srData" property="updtStatusList" />
</html:select>
<td><input type="checkbox" name="updateStatus" />
the user should be able to select the status from the dropdown and update . How will the selected status get updated on runtime ? Can any one guide on this ?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That looks like a table where each rows has it's own set of text fields and select pull downs. Is that correct?

If so, what data structure are you mapping the form to use? An array or ArrayList of beans?
 
Mamata Roy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As of now I am trying to see the value selected by the user in the dropdown . On onclick of the check box i want to retrieve each value and store in an array then update the values in database.
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic