Am 22.02.2010 15:34, schrieb Thiago H. de Paula Figueiredo:
I am really wonderung why an abstract class cannot be used as
component (page) class.
Because it needs to be instantiated.
The reason why I am wondering:
Let's suppose I have a few pages with some shared functionality. I'd
like to create a base class:
public abstract class BasePage{
@Property
private Object someProp;
public abstract Object getSomeProp();
public void setSomeProp(Object someProp)
}
Put BasePage in the base package, not the components or pages one.
Abstract classes are allowed there.
By the way, you cannot use @Property in a property with getters and
setters.
Yeah, I understand the limitation. But how should I access a property
which is defined in my base class in one of the subclasses with these
limitations?
As far as I understand, I cannot make my base classes property
protected, nor can I generate a public getter/Setter pair.
Also abstract getter/setters won't work. (Although they used to work in
T4. T4 could instantiate page or component classes, even if they werde
abstract).
Kind regards,
Andy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org