tags:

views:

48

answers:

1

I'm using Stripes and I am validating the values of a drop down box to ensure the user selects an option. On initial load all data is present, but once the validation kicks in the form loses the data that was set up in the action bean on load. This includes the original list I am validating against.

I'm simply using in the jsp, and annotating the field in the action bean as @Validate(required=true).

Am I missing something simple?

Cheers

+2  A: 

Fixed it.

I should use @Before methods to pre-populate domain objects, as per the Stripes best practice.

RTFM

Davoink
If you end up doing a lot of this, you might look into Stripersist to auto-hydrate your domain objects.
lucas