Thanks Elmer. And ugh ... sorry for the previous typo "@Elmo",

(Cool Beans was @Jonathan for his Bean example - but got out of order in
this thread).

-Luther



On Mon, Mar 9, 2009 at 1:02 PM, Luther Baker <lutherba...@gmail.com> wrote:

> Cool beans. Literally :)
>
>
>
> On Mon, Mar 9, 2009 at 12:49 PM, Jonathan Barker <
> jonathan.theit...@gmail.com> wrote:
>
>> My experience was with 4.0.
>>
>> You want to look at the ValidationDelegate.
>>
>> @Bean
>> public abstract ValidationDelegate getDelegate();
>>
>> // set up as listener for form
>> public void onSubmit(IRequestCycle cycle){
>>   ValidationDelegate = getDelegate();
>>   (if (delegate.getHasErrors())
>>       return;
>>   if (StringUtils.isBlank(fieldA) &&
>> (StringUtils.isBlank(fieldB)||StringUtils.isBlank(fieldC))){
>>      delegate.setFormComponent(null);
>>      delegate.record("Cross form vaildation failed");
>>      return;
>>   } else {
>>      cycle.activate("SomeOtherPage");
>>   }
>>
>> )
>>
>>
>>
>>
>>
>>
>> On Mon, Mar 9, 2009 at 7:29 AM, Ivano Luberti <lube...@archicoop.it>
>> wrote:
>> >
>> > Sorry to ask for this again, but I have seen no answer.
>> > I will get no answer again I will stop asking for this, of course.
>> >
>> > TIA
>> >
>> > ----------------
>> > Hello, we are using T4.1
>> > We have to validate a form and we don't want to do it client side.
>> > Let say we have three text fields.
>> > The validation should implement the following rule:
>> > if (fielda="") && (fieldb="" || fieldc="")
>> >  then throw new Exception("");
>> >
>> > The problem is that we cannot link the validation to neither field
>> > because they can be empty and the custom validator we are trying to
>> > implement is nevere called if the field is empty.
>> > We tried to  follow the Identity validator but it is also not called
>> > when the field to which is associated is empty.
>> >
>> > Is there another way to accomplish cross field validation ?
>> >
>> > It seems to us that in T4.1  lacks a validator attribute for the form
>> > component.
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> > For additional commands, e-mail: users-h...@tapestry.apache.org
>> >
>>
>>
>>
>> --
>> Jonathan Barker
>> ITStrategic
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

Reply via email to