Results 1 to 3 of 3

Thread: Losing reference data

  1. #1
    Join Date
    Oct 2004
    Location
    Lyon, France
    Posts
    7

    Default Losing reference data

    I have a JSP + SimpleFormController to find products from my database. In the form, I can chose a category of products in a dropdown list, that has been populated with items registered in the referenceData method. The results are displayed in the same JSP (containing the form), so as to be able to launch a new search. The first time the JSP is displayed, the dropdown list is well populated. When I submit a second time, I loose the reference data (categories). any idea about this ?

    Olivier.

  2. #2
    Join Date
    Aug 2004
    Location
    Toulouse, France
    Posts
    148

    Default

    The reference data is only added to the model in the form view part. When you submit it isn't added to the model. You can manually add the result of referenceData() to the model in the onSubmit method to have the wanted effect.
    Still, I faced the same issue and wouldn't mind a globalReferenceData() which would complete all the model returned by the controller.

    Olivier

  3. #3
    Join Date
    Oct 2004
    Location
    Lyon, France
    Posts
    7

    Default

    OK, it's just works fine ! :wink:
    Thanks !
    Olivier Hanny.
    http://www.icodem.fr

Similar Threads

  1. Context initialization failed
    By kanonmicke in forum Container
    Replies: 7
    Last Post: Sep 29th, 2005, 12:35 AM
  2. Replies: 1
    Last Post: Aug 31st, 2005, 04:18 AM
  3. Replies: 11
    Last Post: Jul 21st, 2005, 03:35 PM
  4. Multiple Data Sources + Hibernate + Spring
    By joeserel in forum Data
    Replies: 2
    Last Post: May 18th, 2005, 09:22 AM
  5. Replies: 5
    Last Post: Sep 8th, 2004, 08:21 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
  •