You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Hugo Palma <hp...@digitalis.pt> on 2005/02/18 19:03:31 UTC

Page specification inheritance

Hi.
I have, as usual, a base class for all my pages. I'd like to define 
properties(persistent and none persistent) in the base page so that all 
pages in my application have them. The perfect way to do this would be 
to implement the abstract accessor methods in the base page and define 
the properties in a base.page file from which all other pages would 
inherit these properties from.

Does anyone have any idea on how to do this ?
Is it possible to extend tapestry to allow this behaviour ?


Thanks

Hugo

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


Re: Page specification inheritance

Posted by Mind Bridge <mi...@yahoo.com>.
Please have a look at Tapestry.fireObservedChange(). It is how the
persistent properties are implemented and may be what you need.

----- Original Message ----- 
From: "Hugo Palma" <hp...@digitalis.pt>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, February 18, 2005 8:03 PM
Subject: Page specification inheritance


> Hi.
> I have, as usual, a base class for all my pages. I'd like to define
> properties(persistent and none persistent) in the base page so that all
> pages in my application have them. The perfect way to do this would be
> to implement the abstract accessor methods in the base page and define
> the properties in a base.page file from which all other pages would
> inherit these properties from.
>
> Does anyone have any idea on how to do this ?
> Is it possible to extend tapestry to allow this behaviour ?
>
>
> Thanks
>
> Hugo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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


Re: Page specification inheritance

Posted by Kent Tong <ke...@cpttm.org.mo>.
Hugo Palma <hpalma <at> digitalis.pt> writes:

> 
> What about persistent properties ?

Can you put the persistent properties into a component and then
include such a component in each page?


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


Re: Page specification inheritance

Posted by Jamie Orchard-Hays <ja...@dang.com>.
If I need a property to be persistent through the whole session, I use the 
Visit object.

I don't know what you mean by "strange behaviors"--unless you mean if you 
don't initialize a standard bean property. Tapestry has the initialize() 
method for this:

private String property;
public String getProperty(){return property;}
public void setProperty(String property){this.property = property;}

protected void initialize(){
    setProperty(null);
    super.initialize();
}

This is the equivalent to using the page properties and abstract 
set/getters. (Note that components *do not* have initialize().)

Jamie
----- Original Message ----- 
From: "Hugo Palma" <hp...@digitalis.pt>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, February 18, 2005 1:31 PM
Subject: Re: Page specification inheritance


> What about persistent properties ?
> What about all the strange behaviours that occur when we use normal bean 
> properties instead of tapestry properties ?
>
>
> Jamie Orchard-Hays wrote:
>
>> In this case, you should just make standard properties and initialize 
>> them in the base page in initialize().
>>
>>
>> ----- Original Message ----- From: "Hugo Palma" <hp...@digitalis.pt>
>> To: "Tapestry users" <ta...@jakarta.apache.org>
>> Sent: Friday, February 18, 2005 1:03 PM
>> Subject: Page specification inheritance
>>
>>
>>> Hi.
>>> I have, as usual, a base class for all my pages. I'd like to define 
>>> properties(persistent and none persistent) in the base page so that all 
>>> pages in my application have them. The perfect way to do this would be 
>>> to implement the abstract accessor methods in the base page and define 
>>> the properties in a base.page file from which all other pages would 
>>> inherit these properties from.
>>>
>>> Does anyone have any idea on how to do this ?
>>> Is it possible to extend tapestry to allow this behaviour ?
>>>
>>>
>>> Thanks
>>>
>>> Hugo
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


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


Re: Page specification inheritance

Posted by Hugo Palma <hp...@digitalis.pt>.
What about persistent properties ?
What about all the strange behaviours that occur when we use normal bean 
properties instead of tapestry properties ?


Jamie Orchard-Hays wrote:

> In this case, you should just make standard properties and initialize 
> them in the base page in initialize().
>
>
> ----- Original Message ----- From: "Hugo Palma" <hp...@digitalis.pt>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Friday, February 18, 2005 1:03 PM
> Subject: Page specification inheritance
>
>
>> Hi.
>> I have, as usual, a base class for all my pages. I'd like to define 
>> properties(persistent and none persistent) in the base page so that 
>> all pages in my application have them. The perfect way to do this 
>> would be to implement the abstract accessor methods in the base page 
>> and define the properties in a base.page file from which all other 
>> pages would inherit these properties from.
>>
>> Does anyone have any idea on how to do this ?
>> Is it possible to extend tapestry to allow this behaviour ?
>>
>>
>> Thanks
>>
>> Hugo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

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


Re: Page specification inheritance

Posted by Jamie Orchard-Hays <ja...@dang.com>.
In this case, you should just make standard properties and initialize them 
in the base page in initialize().


----- Original Message ----- 
From: "Hugo Palma" <hp...@digitalis.pt>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, February 18, 2005 1:03 PM
Subject: Page specification inheritance


> Hi.
> I have, as usual, a base class for all my pages. I'd like to define 
> properties(persistent and none persistent) in the base page so that all 
> pages in my application have them. The perfect way to do this would be to 
> implement the abstract accessor methods in the base page and define the 
> properties in a base.page file from which all other pages would inherit 
> these properties from.
>
> Does anyone have any idea on how to do this ?
> Is it possible to extend tapestry to allow this behaviour ?
>
>
> Thanks
>
> Hugo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


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