struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <jakartau...@yahoo.com>
Subject Re: small trouble with the validator
Date Mon, 02 Feb 2004 20:59:41 GMT
From
http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_action_form_classes
:

"And, of course, while the DynaActionForm may support various binary types,
properties used with the html:text tag should still be String properties."

Yes, use java.lang.String then try your form again.  Your depends="required"
should work as expected now.  Er, you might wanna try out
depends="required,float".

--- Nathan Maves <Nathan.Maves@Sun.COM> wrote:
> All of my other forms validate perfect.  This form will only validate 
> the name field and not the two breakpoint fields.
> 
> I have tried everything....  Any ideas?
> 
> <action path="/admin/UpdateMetric" 
> type="dashboard.presentation.actions.admin.UpdateMetricAction" 
> name="MetricForm" validate="true" input="/pages/admin/EditMetric.jsp" 
> scope="request" attribute="metricForm">
> <forward name="success" redirect="false" 
> path="/pages/admin/EditMetric.jsp" />
> <forward name="failure" redirect="false" 
> path="/pages/admin/EditMetric.jsp" />
> </action>
> 
> <form-bean name="MetricForm" 
> type="org.apache.struts.validator.DynaValidatorActionForm">
> <form-property name="id" type="java.lang.Integer" />
> <form-property name="name" type="java.lang.String" />
> <form-property name="archiveFlag" type="java.lang.Boolean" />
> <form-property name="rollable" type="java.lang.Boolean" />
> <form-property name="frequency" type="java.lang.Integer" />
> <form-property name="exculde" type="java.lang.Boolean" />
> <form-property name="entryLevel" type="java.lang.Integer" />
> <form-property name="complianceDirection" type="java.lang.Integer" />
> <form-property name="description" type="java.lang.String" />
> <form-property name="type" type="java.lang.Integer" />
> <form-property name="greenBreakpoint" type="java.lang.Float" />
> <form-property name="redBreakpoint" type="java.lang.Float" />
> </form-bean>
> 
> 
> <form name="/admin/UpdateMetric">
> <field property="name" depends="required,maxlength">
> <var><var-name>maxlength</var-name><var-value>150</var-value></var>
> <arg0 key="app.metric.name" />
> <arg1 name="maxlength" key="${var:maxlength}" resource="false" />
> </field>
> <field property="description" depends="maxlength">
> <var><var-name>maxlength</var-name><var-value>1300</var-value></var>
> <arg0 key="app.metric.description" />
> <arg1 name="maxlength" key="${var:maxlength}" resource="false" />
> </field>
> <field property="greenBreakpoint" depends="required">
> <arg0 key="app.metric.greenBreakpoint" />
> </field>
> <field property="redBreakpoint" depends="required"><arg0 
> key="app.metric.redBreakpoint" />
> </field>
> </form>
> 
> 

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

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


Mime
View raw message