Hollaway, Shedrick CIV (TRFKB C600) wrote:

This is what I wanted to do without using any javascript.
<html:form>
<%-- first form stuff -- using formA --%>
<html:text name="formA" property="firstName" readonly="true" />
<html:text name="formA" property="lastName" readonly="true" />
<html:text name="formA" property="homePhone" readonly="false" />
<table>
<%-- second form stuff -- using formB -- displayed%>
<th nowrap="nowrap">First Contact:</th>
<td><html-el:text property="fullName"
value="${contact[0].fullName}"
readonly="false"/></td>
</table>
<table>
<%-- third form stuff -- using formB --%>
<th nowrap="nowrap">First Contact:</th>
<td><html-el:text property="fullName"
value="${contact[1].fullName}"
readonly="false"/></td>
</table>
</html:form>
<html:submit/>



I don't understand how to capture both forms in the Action class.

Wy would you want to? Why don't you just make an ActionForm with the properties:


firstName
lastName
homePhone
contact1
contact2

Maybe I'm missing something:) Also you do know that <html:form> will not work defined like you have it?

Also of course you need your submit button inside the form. Lastly you have two form fields named the same (fullName) which will end up submitting a String[] which is probably not what you want. Make one form and name them contact1 and contact2 and set them before you get to the form so you don't have to declare the value like you are doing. (You 'usually' want to avoid having to declare the value - it should be set in the form. There are exceptions - nested forms using JSTL, sometimes radio or checkboxes - but 99.9& of the time you shouldn't need to define the value using an html:text tag).


-- Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to