Re: Extending existing component and .page file

2007-01-10 Thread karthik G

Thanks. Yes, I'm trying to customize Contrib's TablePages component. I just
need a different look and feel at the template level and I could get it to
work by copying the TablePages.jwc contents.
It will be nice to have this patch. It will be really nice if we could have
an extra parameter along the lines of inherit="" or something of that sort
in the .page that automatically takes care of this issue.

thanks,
Karthik

On 1/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


You'll
- either have to use annotations if you're on Java 5. They're inherited
correctly.
- on Tapestry 3 you could include the common .jwc XML fragments as
external entities starting with Tap4 this functionality is broken. A
patch exists, if you want it you can vote on
http://issues.apache.org/jira/browse/TAPESTRY-967

If your class X would be empty you are fine with Y.

> -Original Message-
> From: karthik G [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 09, 2007 3:15 PM
> To: Tapestry users
> Subject: Extending existing component and .page file
>
> class X extends Y{}
>
> If component X extends an existing component Y by providing a
> new template X.html and adding additional property in X.jwc,
> are we required to copy the contents of Y.jwc into X.jwc?
>
> If I dont include it, i run into errors.
>
> May be am missing some parameter here. How can i get a .page
> to extend from another base .page?
>
> Also , if Class X is empty do I need to create one in the
> first place ( am fine with Y)?
>
> I just need .page inheritance in addition to Java component
> inheritance.
>
> thanks,
> Karthik
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Extending existing component and .page file

2007-01-09 Thread Marcus.Schulte
You'll 
 - either have to use annotations if you're on Java 5. They're inherited
correctly.
 - on Tapestry 3 you could include the common .jwc XML fragments as
external entities starting with Tap4 this functionality is broken. A
patch exists, if you want it you can vote on 
http://issues.apache.org/jira/browse/TAPESTRY-967

If your class X would be empty you are fine with Y. 

> -Original Message-
> From: karthik G [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 09, 2007 3:15 PM
> To: Tapestry users
> Subject: Extending existing component and .page file
> 
> class X extends Y{}
> 
> If component X extends an existing component Y by providing a 
> new template X.html and adding additional property in X.jwc, 
> are we required to copy the contents of Y.jwc into X.jwc?
> 
> If I dont include it, i run into errors.
> 
> May be am missing some parameter here. How can i get a .page 
> to extend from another base .page?
> 
> Also , if Class X is empty do I need to create one in the 
> first place ( am fine with Y)?
> 
> I just need .page inheritance in addition to Java component 
> inheritance.
> 
> thanks,
> Karthik
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Extending existing component and .page file

2007-01-09 Thread James Carman

What are you looking to do?  What version of Tapestry are you using?
If you're looking to automatically inject a HiveMind service into all
of your pages/components, you can either use tapestry-autowire (tap
4.0) or upgrade to tap 4.1 which has tapestry-autowire built in.
Using tapestry-autowire, it's as simple as declaring an abstract
getter of the same type as one of your services in your HM registry
(provided there is exactly one service point which supports that
service interface):

public abstract MyService getMyService();

You can declare that in your MyAbstractPage class (or whatever you
want to call it) and all subclasses will inherit the property and
it'll be injected automatically.  Hope that helps.


On 1/9/07, karthik G <[EMAIL PROTECTED]> wrote:

class X extends Y{}

If component X extends an existing component Y by providing a new template
X.html and adding additional property in X.jwc, are we required to copy the
contents of Y.jwc into X.jwc?

If I dont include it, i run into errors.

May be am missing some parameter here. How can i get a .page to extend from
another base .page?

Also , if Class X is empty do I need to create one in the first place ( am
fine with Y)?

I just need .page inheritance in addition to Java component inheritance.

thanks,
Karthik




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Extending existing component and .page file

2007-01-09 Thread karthik G

class X extends Y{}

If component X extends an existing component Y by providing a new template
X.html and adding additional property in X.jwc, are we required to copy the
contents of Y.jwc into X.jwc?

If I dont include it, i run into errors.

May be am missing some parameter here. How can i get a .page to extend from
another base .page?

Also , if Class X is empty do I need to create one in the first place ( am
fine with Y)?

I just need .page inheritance in addition to Java component inheritance.

thanks,
Karthik