• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Check box and Indexed properties

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am trying to implement an indexed properties page. Just like the link posted below:

webpage

I wanted to add checkbox to the code, (let's say like a shopping cart). I want to delete or save only the boxes that are checked. Please see below my code:

Struts-config.xml




Action Form:




OrderItem java bean:




DisplayOrderIndexedAction.java




order_indexed.jsp




SaveOrderIndexedAction.java



IndexedBusinessLayer.java


My question is how do I achieve the functionality, what should I code so that when I check the items only those items either needs to be deleted or saved. Please help me with the code.

Thanks,
Luke.
 
Luke Zechariah
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hey Found the solution:

On the jsp file, add indexed="true" for

so the final jsp looks as below:


And on the IndexedBusinessLayer.java add the following code in the method deleteOrderQty

so the IndexedBusinessLayer.java file with look as below:




These changes will provide the desired functionality.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic