In Struts2 there are no forms...
Yes, no forms.
I think there is an interceptor interface called ValidationAware and
there it can be the cue, but I´m not sure and I suppose there should
be another easier way of doing what I want...
Jorge Martín Cuervo escribió:
sorry, i have no experience with struts2.
I only use classic struts:
http://struts.apache.org/1.3.8/faqs/validator.html
Maybe you can create your own validwhen validator rule in struts2. I
integrated commons validator in my own project and i reused some struts
validwhen code.
Validwhen uses antlr for parsing the syntax. I had been thinking using
rhino (mozilla javascript engine) or beanshell, but validwhen was very
easy.
but ... why don't you override the validate method in your formbean? are
you using a dynactionform or a simple formbean class?
El mar, 11-09-2007 a las 17:28 +0200, Pablo Vázquez Blázquez escribió:
Hola Jorge,
I think there is not a "validwhen" validator, either...
Any idea? Thanks.
Jorge Martín Cuervo escribió:
try validwhen validation rule. It exists in struts, maybe exists too in
struts2.
El mar, 11-09-2007 a las 16:27 +0200, Pablo Vázquez Blázquez escribió:
Hi all!
I´m trying to validate two fields that depends on another field.
What I was doing in S1 is (for field "in"):
<field property="in" depends="requiredif">
<msg name="validwhen"
key="ErrorMessages.applicationIdRepresent.sameReference"/>
<arg position="0" key="ProcessorHTTPDetails.in"/>
<msg name="mask" key="ProcessorHTTPDetails.in.help"/>
<var>
<var-name>field[0]</var-name>
<var-value>editParams</var-value>
</var>
<var>
<var-name>fieldTest[0]</var-name>
<var-value>NOTNULL</var-value>
</var>
</field>
But now in S2, there is no "requiredif" validator :(
Any idea about how can I do to get the same validation effect?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]