Results 1 to 2 of 2

Thread: Newbie Question - Using Lists and Forms with One Form Field

  1. #1
    Join Date
    Mar 2005
    Posts
    1

    Default Newbie Question - Using Lists and Forms with One Form Field

    I'm relatively new to the Spring world.

    I have a questions.. I'm populating a JSP Page with a list taken out of my Persistence Layer. In my jsp I'm displaying all the required fields. I'm also outputting a column for people to enter the quantity of items that need to be ordered.

    My question is.. when I hit submit how can I pass all of the selected values (quantity boxes ) to my Controller ? and how can I identify which quantity box belongs to which row in my List displayed in the jsp ? I'm using a SimpleFormController and I am binding the quantity text field to a field in my command object.


    I'm tryingto develop a shopping cart where a list of items is displayed with a quantity box field for each row and then just submitting my entered data to the controller so he can add the appropriate quantities with the correct items to the cart.

    If you need more details or if I need to explain myself better please let me know and I'll post more details.


    Thanks in advance for the help.

    Cheers.

    Ethan.

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    I never had personnaly to use this before, you can however take a look at this page on the wiki Using Checkboxes , also follow the link to the javaDoc.
    HTH
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

Similar Threads

  1. Forms and Lists.
    By sherihan in forum Web
    Replies: 4
    Last Post: Jan 24th, 2005, 06:09 AM
  2. Multiple forms
    By glazed in forum Web
    Replies: 6
    Last Post: Dec 19th, 2004, 03:26 PM
  3. Replies: 5
    Last Post: Dec 16th, 2004, 03:19 PM

Posting Permissions

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