Announcement Announcement Module
No announcement yet.
Help Need with displaying Grid Data and using Java script Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help Need with displaying Grid Data and using Java script


    I need to diplay a list of objects in a table format . Each table has a button to submit data. I need to know which row (some User property like USerId or EmailID) user selected once the user clicked on the button next to each row.

    What is the best way to implement above functionality ?

    I also jave hard time invoking Java script functions. is there any special insturtion to use Java Script with Spring Forms. the java script function never gets called. any examples will be helpful

    Thanks In Advance.

  • #2
    There's a multitude of different ways to achieve this functionality; here are a few of them.
    1. Hidden field + JavaScript to set the value of the hidden field on submit
    2. Radio per row with a single submit button
    3. Forms per row each with their own submit button

    I prefer to avoid having core application functionality dependent on javascript; rather I like to use JavaScript to enhance usability, etc. As such, that rules out option 1. In addition, I prefer solutions which limit the number of things a user has to click. In that case, option 3 is viable and preferred to option 2 in my opinion.


    • #3
      Thanks for the quick response.

      Radio button is the simplet one. but i dont think req analyst will accept to that solution.
      i am using spring form tag.i am using a list to diaplay the table. do you think it is possible to use a form within another one ?



      • #4
        I'm facing the same issue, I need to use the selected record of a grid table and pass it to the next form when a link is clicked... I'm working with JSF - Spring kind of archytecture, .... just need some simpe idea i'll figure out the rest..