struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Ince <stephenpi...@gmail.com>
Subject Struts Users Mailing List <user@struts.apache.org>
Date Thu, 20 May 2010 14:52:53 GMT
Hi,
  I would like to do nested struts2 validation. I have two questions.

1) How do I specify the validation for the following field. Can some
point me to some documenation for the expression validation.


<input type="text" name="searchResults[${i}].resource.name" ..
validation.xml

<validator type="expression">
<param name="expression">
searchResults.{#this.resource.name.length() &gt; 0}.{? #this == false
}.size() &lt;= 0
</param>
<message key="resource.name.required" />
</validator>

2) Can specify a particular method for an action class.

e.g.

SearchAction-search!update-validation.xml
where
search -- is the action alias and
update -- is the method to execute in SearchAction

Steve

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


Mime
View raw message