struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Young, Wayne" <>
Subject dropdown values gone after validation error
Date Thu, 29 Mar 2001 18:55:17 GMT
I have the following struts/JSP fragment that creates a dropdown with values
from the networkTypes attribute. 

<html:select styleClass="Field" property="networkType" size="1">
  <html:options property="networkTypes"/>

The networkTypes attribute is created in the "getNetworkTypes" action that
displays this page. The page displays correctly initially. But if I have a
validation error & the page reloads, the networkTypes variable is empty & I
end up with an empty dropdown.

Any ideas on how to keep from losing the values in my dropdown after a
validation error? Is there any way to re-invoke the "getNetworkTypes" action
from the Validate() method on my ActionForm descendant? (Maybe forward to
the "getNetworkTypes" action & return null in Validate?)

Any help would be appreciated.



View raw message