Struct and Form validation

T

tlo

Hi,

I'm having a basic problem using struct.

All I want to get to is to show a collection in a select box and if the form is
incorrectly filled out after a submit the same collection is shown and the
selection that the user made is still selected.

I have a collection which from an struct action gets added to the request
object via setAttribute("types",collection). When the action then forwards onto
the jsp the jsp then uses the collection in a select tag, like this as part of
a form
<html:select property="userType">
<html:eek:ptions collection="types" property="typeid" labelProperty="typename"/>
</html:select>
this works fine when the jsp is first called.

When the form is submitted and the validate is called on the Form object and an
non empty erroraction is returned the jsp fails, due to the fact that the
collection isn't any longer in the request object.

Can anybody guide me in the right direction.

Thanks
TLO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top