Thank you Paul!!!
I'll try that immedeately!

Malin


On 6/16/06, Paul Ferraro <[EMAIL PROTECTED]> wrote:

This should work:

<bean name="minDate" class="org.apache.tapestry.form.validator.MinDate"
lifecycle="none">
    <!-- Use the property to which your Date1 value is bound -->
    <!-- The "none" lifecycle will ensure that the bean isn't created
until needed -->
    <set name="minDate" value="date1"/>
</bean>

<component id="Date1" type="TextField">
    <binding name="value" value="date1"/>
    <binding name="translator" value="translator:date"/>
</component>

<component id="Date2" type="TextField">
    <binding name="value" value="date2"/>
    <binding name="translator" value="translator:date"/>
    <binding name="validators" value="bean:minDate"/>
</component>

Paul

Malin Ljungh wrote:
> Hi all,
>
> I'm a newbie and just too tired think right now. Please help me :)
>
> I have a form with two TextFields where the user should enter somes
> dates. I
> use the date validator to check that correct dates are supplied.
> Though, I need to check that date2 < date1 - how can I do this? Can I
use
> the minDate and give the other date value as parameter? Hmm, I guess
> not? I
> suppose I need to write my own ValidationDelegeate... is this the
> right way
> to go?
>
> Regards,
> Malin
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to