Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to process multiple selects from a search result to update the backend db?

    I am trying to modify a web page. Currently, a user can search and the results are displayed with 3 columns and multiple rows.

    Ex: Search Results:
    Column1(Name) -- Column2(Age) -- Column3(SchoolName)

    Lara Smith -- 25 -- Stanford
    Joe Smith -- 24 -- Clemson
    Brian Smith -- 30 -- MIT
    Monika Smith -- 19 -- Clemson

    I need to modify this to provide a functionality that helps an admin to select multiple search results and click on a button to set some status in the backend database for the selected items. We are using HTML/JavaScript/Velocity/Java (Struts)/EJB...

    Any guidance in how to implement this functionality is appreciated.

    Thanks.
    Sonika

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would suspect that a row ID exists of some sort to uniquely identify a record in the database. I wonder if you can setup a checkbox on each row, and those rows which are checked can be processed however you want.

    Keep in mind that you do have to be careful with checkboxes as only the ones that are checked get submitted..

    Sadiq.

  • #3
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Search results are obtained from different objects. For ex, Name and Age are from a Student object and SchoolName is from School object. So, you want me to create a temporary object that holds the row values with a key and use that key along with the check box?

    Thanks.

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I guess so.. I just noticed you are using Velocity, so you're using Java for the server-side. I'm not really sure how that works, and I've never played with it, so I can't give you much advice from a developer's perspective.

    But regardless, that sounds about right. Whatever information you need to carry-out your updates needs to be associated with the checkbox for that row. Then when the form is submitted, you can perform whatever is necessary on the checked rows.

    Sadiq.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •