You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Technocrat <ba...@hotmail.com> on 2007/01/03 12:42:12 UTC

Error Message Handling

Hi All,
I am new to Tapestry and now trying to learn it.I am using Tapestry 4.0.The
problem is regarding the displaying of messages(Error and Warning).If some
business error or some unexpected error occurs in the server, how will I
inform it to the user ? Currently what i am doing is, retrieving the error
information from the business exeption and recording it using the validation
delegate.Is this the right approach ?

The concern is that, can I use ValidationDelegate to record 'non-validation'
errors ? Is there any other way for doing this ? Please advice...

Thanks In Advance...
-- 
View this message in context: http://www.nabble.com/Error-Message-Handling-tf2912986.html#a8139258
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE: Error Message Handling

Posted by Balachandran <ba...@hotmail.com>.

Thanks Marcus.
This is what exactly i want.Now i am using the validation delegate to record
these kinds of exceptions,by setting the formComponent to null.
>From where can i find more details about the below specified approach?



Schulte Marcus wrote:
> 
>  the second is a Message-property of the page
> which is an adapter for "normal" messages and exceptions from the lower
> layers like "optimistic lock broken" or "Nothing matches your search
> criteria" which bear little logical relation to a particular field.
> 

-- 
View this message in context: http://www.nabble.com/Error-Message-Handling-tf2912986.html#a8157412
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE: Error Message Handling

Posted by Ma...@bmw.ch.
It's perfectly Ok, to record your own cross-field validation errors in
the delegate. At least as long as you can associate the error sensibly
with a particular (set of) field (s). 

I use an error display component in my @Border, which actually checks
two different sources for errors. The first is the validation delegate
for form-related stuff, the second is a Message-property of the page
which is an adapter for "normal" messages and exceptions from the lower
layers like "optimistic lock broken" or "Nothing matches your search
criteria" which bear little logical relation to a particular field.



> -----Original Message-----
> From: Balachandran [mailto:balachandranvs@hotmail.com] 
> Sent: Thursday, January 04, 2007 4:14 AM
> To: users@tapestry.apache.org
> Subject: Re: Error Message Handling
> 
> 
> 
> But what I am trying to acheive is a uniformity in displaying 
> all messages to the user.I am using a dojo dialog to display 
> validation error messages.I would like to use the same for 
> these kinds of exceptions also.
> 
> 
> Dennis Sinelnikov wrote:
> > 
> > For runtime/unexpected exceptions, you can specify an 
> Exception page 
> > via your .application spec to tell tapestry to use this page.
> > 
> > <page name="Exception" specification-path="Exception.page"/>
> > 
> > You can add more dynamic logic to this page, to display 
> user-friendly 
> > messages depending on the exception thrown.
> > 
> > hth,
> > dennis
> > 
> > 
> 
> --
> View this message in context: 
> http://www.nabble.com/Error-Message-Handling-tf2912986.html#a8153255
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

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


Re: Error Message Handling

Posted by Balachandran <ba...@hotmail.com>.

But what I am trying to acheive is a uniformity in displaying all messages
to the user.I am using a dojo dialog to display validation error messages.I
would like to use the same for these kinds of exceptions also.


Dennis Sinelnikov wrote:
> 
> For runtime/unexpected exceptions, you can specify an Exception page via 
> your .application spec to tell tapestry to use this page.
> 
> <page name="Exception" specification-path="Exception.page"/>
> 
> You can add more dynamic logic to this page, to display user-friendly 
> messages depending on the exception thrown.
> 
> hth,
> dennis
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-Message-Handling-tf2912986.html#a8153255
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Error Message Handling

Posted by Dennis Sinelnikov <de...@augustschell.com>.
For runtime/unexpected exceptions, you can specify an Exception page via 
your .application spec to tell tapestry to use this page.

<page name="Exception" specification-path="Exception.page"/>

You can add more dynamic logic to this page, to display user-friendly 
messages depending on the exception thrown.

hth,
dennis

Technocrat wrote:
> Hi All,
> I am new to Tapestry and now trying to learn it.I am using Tapestry 4.0.The
> problem is regarding the displaying of messages(Error and Warning).If some
> business error or some unexpected error occurs in the server, how will I
> inform it to the user ? Currently what i am doing is, retrieving the error
> information from the business exeption and recording it using the validation
> delegate.Is this the right approach ?
> 
> The concern is that, can I use ValidationDelegate to record 'non-validation'
> errors ? Is there any other way for doing this ? Please advice...
> 
> Thanks In Advance...


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