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 <[EMAIL PROTECTED]>:
> 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:[EMAIL PROTECTED]
> 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 <[EMAIL PROTECTED]>:
> > 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to