Le vendredi 11 janvier 2008 à 07:36 -0500, Ted Husted a écrit :
> Rather than use the validation framework, I'd probably go with a
> Validate method (by implementing Validatable).

Firstly, thank you very much for your answer :)

Ok then... That what I though... But my problem is that Validate() is
called every time no ?
I mean, I currently use action like that :

<action name="CycleManagement!*" class="...[a class]" method="{1}">
        <result name="A">View1.jsp</result>
        <result name="B">View2.jsp</result>
        <result name="C">View3.jsp</result>
</action>

and I have per-method validation...
Is it possible with Validate() ? How can I do ? (I think it's possible
with ActionContext.(... get current method...))

> Then, instead of using an OGNL expression, you can loop through the
> list using Java, and call addFieldError if there's a problem.
Of course yes :-). But I need a validate() per method.

> Alternatively, a custom type converter that turned the nulls into
> false booleans might work, or there might be another way to form the
> OGNL expression. But given the choice between OGNL and Java, I'll take
> Java. :)

So for me it seems the better choice would be type converter ? what do
you think ?

Thanks,

-- 
Martin Braure de Calignon

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée

Reply via email to