Results 1 to 3 of 3

Thread: Dropdown disappears after validation error

  1. #1
    Join Date
    Aug 2009
    Posts
    2

    Default Dropdown disappears after validation error

    Hi! I'm puzzled by a feature of the petclinic sample application. In experimenting, I noticed that the dropdown control containing pet names disappears when the owner form contains validation errors. I see that the "createForm" method in the auto-generated file OwnerController_Roo_Controller.aj maps "pets" to the result set from a call to ~.domain.Pet.findAllPets(); but this mapping does not occur in the "create" method prior to returning with the String "owner/create." Perhaps it couldn't.

    The only way to get the pets dropdown to reappear using the application's own controls is to (1) invoke the owner form anew, re-entering content and correcting previous validation errors, or (2) correct validation errors, save the form, then find the owner and enter update mode to select a pet.

    What is the fix or workaround for the disappearing dropdown?

    This feature seems to be a constraint on usability. I have not seen this matter addressed elsewhere. Any help, guidance or insight would be greatly appreciated. Thanks so much.

    BTW, I'm completely new to Spring, Spring Roo, and AOP; and I'm finding them all well-considered and incredibly useful. Kudos, Spring Roo team!

    Cheers,
    tgrommet

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Yes, that is because there is a post-redirect-get pattern used which causes the loss of the model object.

    Please open a Jira ticket and assign to me. This should be addressed .

    -Stefan

  3. #3
    Join Date
    Aug 2009
    Posts
    2

    Default

    Jira ticket ROO-184 has been created for this issue; but I could not find a way to assign it to you. Thank you, Stefan! :-)

Posting Permissions

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