You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jonathan O'Connor <ni...@eircom.net> on 2009/01/13 13:30:29 UTC

T5: Pages can't have getErrorMessage() method

Hi,
I have a page class that had a String getErrorMessage() method. Sadly, 
this is not allowed by Tap5, and I get a lovely exception page telling 
exactly what is going on.

Is this documented anywhere? I did a google for Tap5 and 
getErrorMessage, but didn't see anything relevant. My work around is to 
rename my method of course, but is this behavior correct?

1. If this is correct, then how do I set the error message that comes 
back from getErrorMessage?
2. Can I only invoke it from my tml file? e.g. ${errorMessage}
3. Is there a list of other methods that should not be specified in a 
page class, as they are added by the Tapestry class loader?

thanks,
Jonathan

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


Re: T5: Pages can't have getErrorMessage() method

Posted by Jonathan O'Connor <ni...@eircom.net>.
Woops,
I didn't look very far :-( I had an attribute _errorMessage defined as a 
@Property.

The documentation for the @Property annotation states it throws an 
exception if the getter or setter is already defined.

Still it was very interesting seeing all the methods added by Tap to the 
page class (shown in the exception page).

On 13/01/2009 12:30, Jonathan O'Connor wrote:
> Hi,
> I have a page class that had a String getErrorMessage() method. Sadly, 
> this is not allowed by Tap5, and I get a lovely exception page telling 
> exactly what is going on.
>
> Is this documented anywhere? I did a google for Tap5 and 
> getErrorMessage, but didn't see anything relevant. My work around is 
> to rename my method of course, but is this behavior correct?
>
> 1. If this is correct, then how do I set the error message that comes 
> back from getErrorMessage?
> 2. Can I only invoke it from my tml file? e.g. ${errorMessage}
> 3. Is there a list of other methods that should not be specified in a 
> page class, as they are added by the Tapestry class loader?
>
> thanks,
> Jonathan
>
> ---------------------------------------------------------------------
> 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