Given the following code in my jsp:

<logic:iterate id="element" name="dynamicFormList"
type="java.lang.String" >
<html:form  action="/login" name="<%=element%>"
type="com.oreilly.struts.storefront.security.LoginForm">

  User Name:
  <html:text property="userName" size="20" maxlength="50"/>
  Password:
  <html:text property="password" size="20" maxlength="50"/>
  <html:hidden property="identifier" value="<%= element %>" />
  <html:submit property="" value="OK" />

</html:form>
</logic:iterate>

element has the value "LoginForm_1" in the first iteratation,
"LoginForm_2" in the second iteration, and so on.

In struts-config:
<form-bean name="LoginForm"
  type="com.oreilly.struts.storefront.security.LoginForm">
</form-bean>

LoginForm extends ActionForm.

I understand that the attributes "name" and "type" have been deprecated
but I am trying to get the iteration to create and display a new
instance of the LoginForm, each with it's own name and properties. After
submit, the request processor seems to look for a formbean associated
with the action (in this case, a formbean called "LoginForm") and not a
formbean with name "LoginForm_1" and therefore in the action the form
property values are all null.

Anyone know how I can get it to look for the formBean with the unique
name that was specified by the variable element?

Thanks,
SB

--
NOTICE: If received in error, please destroy and notify sender.  Sender
does not waive confidentiality or privilege, and use is prohibited.

Reply via email to