Announcement Announcement Module
Collapse
No announcement yet.
Losing reference data Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      OK, it's just works fine ! :wink:
      Thanks !

      Comment

      Working...
      X