You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by st...@b2win.it on 2003/07/18 12:25:47 UTC
Workbench example, why Border class is abstract
Can someone help me to understand why in workbench example the Border class
is an abstract class and no other class extends Border?
thanx,
ST
RE: Workbench example, why Border class is abstract
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
(Sorry for the trouble getting this far).
Tapestry has the ability to take your classes and extend them at runtime. It will add new
properties to your existing classes.
Actually, it uses bytecode enhancement to create a subclass at runtime with the additional
properties.
You can use the <property-specification> element in your page or component specification to cause
this.
Additionally, component parameters may become additional properties.
If you need to access these synthesized properties, you make your class abstract, and add abstract
accessor methods.
This pattern is very similar to entity beans in EJB CMP 2.0.
I've added an entry to the FAQ about this.
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
> -----Original Message-----
> From: stefano.trovalusci@b2win.it
> [mailto:stefano.trovalusci@b2win.it]
> Sent: Friday, July 18, 2003 6:26 AM
> To: tapestry-user@jakarta.apache.org
> Subject: Workbench example, why Border class is abstract
>
>
>
> Can someone help me to understand why in workbench example
> the Border class is an abstract class and no other class
> extends Border?
>
> thanx,
>
> ST
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
RE: Workbench example, why Border class is abstract
Posted by John Meredith <ps...@t-online.de>.
On Fri, 2003-07-18 at 12:43, Hugh Leather wrote:
> Not by any means a guru :-)
>
> I think what happens is that if a component is abstract then at runtime
> the component class is extended (see ComponentClassFactory in the
> enhance package).
>
> Any abstract properties that can be found from the component
> specification are filled in in the concrete class. This means you don't
> need to write a setter or create your own field.
Unless of course you want to use the setter/getter for the property in
the page class itself - something which confused the heck out of me (as
Java newbie) at the time :-)
- John
--
John Meredith <ps...@t-online.de>
RE: Workbench example, why Border class is abstract
Posted by Hugh Leather <hu...@hotmail.com>.
Not by any means a guru :-)
I think what happens is that if a component is abstract then at runtime
the component class is extended (see ComponentClassFactory in the
enhance package).
Any abstract properties that can be found from the component
specification are filled in in the concrete class. This means you don't
need to write a setter or create your own field.
Hope that helps.
Hugh.
-----Original Message-----
From: stefano.trovalusci@b2win.it [mailto:stefano.trovalusci@b2win.it]
Sent: 18 July 2003 12:26
To: tapestry-user@jakarta.apache.org
Subject: Workbench example, why Border class is abstract
Can someone help me to understand why in workbench example the Border
class
is an abstract class and no other class extends Border?
thanx,
ST
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org