struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Sherman <a...@tritus.ca>
Subject Form Field Unset Condition
Date Sat, 29 Mar 2003 16:45:27 GMT
I asked a similar question last week and am still having trouble with this 
simple idea.

I have a form:

<form-bean	name="senderEditForm"
		type="org.apache.struts.validator.DynaValidatorForm">
	<form-property	name="id"
			type="java.lang.String" />
</form-bean>

With validation:

<form	name="senderEditForm">
	<field property="id" depends="integer" />
</form>

This Action code:

DynaValidatorForm  dynaForm  = (DynaValidatorForm) form;
if ( CONDITION ) {
	// Do Work If "id" is set
}

Two questions:

1. Am I correct is using String as the form-property type?

2. What should be used as CONDITION so that CONDITION is true if the 
parameter "id" has been set? (I assume that my validation should make sure 
"id" is an integer if it is set.)

Thank you very much for your assistance,

A.

--
Adam Sherman
Tritus CG Inc.
http://www.tritus.ca/
+1 (613) 797-6819

---------------------------------------------------------------------
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