struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <sun...@collab.net>
Subject Re: what should I gave to the type attribute of a html:form
Date Sun, 11 Apr 2004 14:12:45 GMT
if you are using tomcat 4 or 5, its a problem specifying the form name in
attribute, coz tomcat uses referential integrity.

your struts-config.xml should have an entry for form

<form-bean name = "MyForm">
 <form-property = "formfieldname" type = "java.lang.String" />
</form-bean>

<action path = "/myactivity"
  name = "MyForm" >
  <forward name = "success" path = "/path/to/jsp or tile definition" />
</action>

---------------
your JSP
 <html:form action = "/myactivity.do" method = "get">
  .......
 </html:form>

---------------

your JS coding...
 document.forms[formIndex].formProperty

---------------
refer using form index in JS instead of name.

hope this if of some help.
Regards,
Sunny


> I have a html:form like this
>
> <html:form name="myform" type="org.apache.struts.taglib.html.FormTag",
> it  throw class cast excetion, what is the correct value of type?
>
> you know ,I need to use name to refer to this form in javascript ..
>
> Thanks&Regards
> Mike
>
> _________________________________________________________________
> ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger:
> http://messenger.msn.com/cn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message