You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Denis Souza <ds...@sti.com.br> on 2005/07/05 20:17:11 UTC

Properties in Tapestry 4

Hi,

 

            I just recently started playing around with Tapestry 4 and to
get to know it better I've ported one of my smaller applications. So I spent
a good amount of time trying to figure out what had happened to the things
that got broken with the upgrade and now I have two questions to ask.

 

1. The first one is about visibility for a page's (or component's)
properties. In Tapestry 3.x I used to declare all my abstract getter/setter
methods for the properties as "protected" except for some special cases. It
used to work fine. However, in Tapestry 4, the enhanced class does not
provide an implementation for the protected abstract methods, so I get an
exception saying that the class has unimplemented methods. I have to declare
them as public for it to work. Is this the way it should really work? I
couldn't find anything about this in the docs, so I'm guessing it's a bug.

 

2. What do I do when I want to use Tapestry Annotations to create a
non-persistent property? Since there is no @Property annotation, I'd have to
use @Persist to create a property, but I'm assuming that it necessarily
creates a persistent property.

 

Thanks in advance.

Denis Souza

 


Re: Properties in Tapestry 4

Posted by Kevin Menard <ni...@negativetwenty.net>.
On Jul 5, 2005, at 2:17 PM, Denis Souza wrote:

> 2. What do I do when I want to use Tapestry Annotations to create a
> non-persistent property? Since there is no @Property annotation,  
> I'd have to
> use @Persist to create a property, but I'm assuming that it  
> necessarily
> creates a persistent property.

The docs have it hidden away under the "Managing Server-Side State"  
section of the user guide.  It appears all you need is the abstract  
accessor and based upon that, the property name and type is inferred  
from Tapestry automatically, which is pretty cool.

-- 
Kevin