You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by daniel joyce <da...@gmail.com> on 2009/04/09 23:12:25 UTC

Customized error pages, handling of bad values passed to OnActivate()

Lets say a user bookmarks a path like view/123

This is supposed to allow them to go a tapestry page that will display
info on Project 123.

ViewProject.java has a onActivate(Integer projectNum)

What happens if the user types in view/hshqwueh ?

I know Tapestry will balk on trying to convert that string to a Integer.

Does tapestry throw an exception? Can I trap it and redirect to an
error page? Has the suggestion of easily implmenting custom
505/404/etc pages in Tapestry been implemented?

-Daniel

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


Re: Customized error pages, handling of bad values passed to OnActivate()

Posted by Carl Crowder <ca...@taptu.com>.
When tapestry throws an excpetion it gets handled by the exception 
report page - http://wiki.apache.org/tapestry/Tapestry5ExceptionPage
You can override that.

For other generic errors such as 404, check out 
http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryForCustomErrorPages 


daniel joyce wrote:
> Lets say a user bookmarks a path like view/123
> 
> This is supposed to allow them to go a tapestry page that will display
> info on Project 123.
> 
> ViewProject.java has a onActivate(Integer projectNum)
> 
> What happens if the user types in view/hshqwueh ?
> 
> I know Tapestry will balk on trying to convert that string to a Integer.
> 
> Does tapestry throw an exception? Can I trap it and redirect to an
> error page? Has the suggestion of easily implmenting custom
> 505/404/etc pages in Tapestry been implemented?
> 
> -Daniel
> 
> ---------------------------------------------------------------------
> 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