You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Anjali Abraham <an...@aztec.soft.net> on 2005/08/30 11:59:30 UTC

RE: How to display only one error ignoring other valid field errors in a page

I have used IValidationDelegate. And as I mentioned I have some 5 valid
field validation happening in .page file, but when one field which has a
button next to it doing a server side validation which is not a .page
validation, and if that condition fails then I need to display only that
error hiding all other valid field validation messages thrown by the .page
file.
So what to do in my java file.... to display only one error... and not
displaying any .page errors...

Regards,
Anjali

-----Original Message-----
From: Tomáš Drencák [mailto:tomas.drencak@gmail.com] 
Sent: Tuesday, August 30, 2005 12:57 PM
To: Tapestry users
Subject: Re: How to display only one error ignoring other valid field errors
in a page

Did you use ValidationDelegate? If yes, you can display first error
through Delegate component with validation binding on
validationDelegate.firstError

tomas

2005/8/29, Anjali Abraham <an...@aztec.soft.net>:
> Hi All,
>            I have a scenario where in I have 5 text fields in a page and
> all are valid field which is being mentioned in its .page files. Among the
5
> fields, one of the field whose value if entered and next to that there is
a
> button and if that field value exist in the Database, then I need to throw
> only that error ignoring all other valid field errors.
> I had done with all that except throwing that particular message. I am
> getting that error message along with the other valid field errors.
> How can I hide all other valid field errors and just display only one
error
> when clicked on that button.
> Somebody can help me out in solving this prolem.
> 
> Regards,
> Anjali
> 
> 
>

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

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


Re: How to display only one error ignoring other valid field errors in a page

Posted by Tomáš Drenčák <to...@gmail.com>.
You should use setFormComponent(IFormComponent) and record(String,
ValidationConstraint) for this.
Just set wrong field with setFormComponent or pass null if it's
another type error, call record with message and null as type:

delegate.setFormComponent(null);
delegate.record(getMessages().getMessage("message"), null);

It's also possible to clear previously stored errors with clear method
in ValidationDelegate

2005/8/30, Anjali Abraham <an...@aztec.soft.net>:
> I have used IValidationDelegate. And as I mentioned I have some 5 valid
> field validation happening in .page file, but when one field which has a
> button next to it doing a server side validation which is not a .page
> validation, and if that condition fails then I need to display only that
> error hiding all other valid field validation messages thrown by the .page
> file.
> So what to do in my java file.... to display only one error... and not
> displaying any .page errors...
> 
> Regards,
> Anjali
> 
> -----Original Message-----
> From: Tomáš Drencák [mailto:tomas.drencak@gmail.com]
> Sent: Tuesday, August 30, 2005 12:57 PM
> To: Tapestry users
> Subject: Re: How to display only one error ignoring other valid field errors
> in a page
> 
> Did you use ValidationDelegate? If yes, you can display first error
> through Delegate component with validation binding on
> validationDelegate.firstError
> 
> tomas
> 
> 2005/8/29, Anjali Abraham <an...@aztec.soft.net>:
> > Hi All,
> >            I have a scenario where in I have 5 text fields in a page and
> > all are valid field which is being mentioned in its .page files. Among the
> 5
> > fields, one of the field whose value if entered and next to that there is
> a
> > button and if that field value exist in the Database, then I need to throw
> > only that error ignoring all other valid field errors.
> > I had done with all that except throwing that particular message. I am
> > getting that error message along with the other valid field errors.
> > How can I hide all other valid field errors and just display only one
> error
> > when clicked on that button.
> > Somebody can help me out in solving this prolem.
> >
> > Regards,
> > Anjali
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>