You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <P....@albourne.com> on 2009/04/07 09:55:27 UTC
Inherited properties
Hi,
If PageClass B extends BaseClass A, and BaseClass A contains a property displayMessage, how do I reference the displayMessage property from PageClass B's .tml file? I would prefer to do this directly in the tml if possible.
Thanks,
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Inherited properties
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, Apr 7, 2009 at 9:17 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> Oh and @Persist proper doesn't make a difference either.
That's really strange. Tapestry CRUD has some classes that are meant
to be subclassed, have a generic field and it works. Something like:
abstract class BaseEditPage<T,. ID> {
private T object;
public T getObject() { return object; }
public void setObject(T object) { this.object = object; }
}
Maybe you're hit a Tapestry bug. Could you post more code here?
--
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Inherited properties
Posted by Peter Stavrinides <P....@albourne.com>.
Oh and @Persist proper doesn't make a difference either.
Peter
--
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail.
----- Original Message -----
From: "Peter Stavrinides" <P....@albourne.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 7 April, 2009 15:12:10 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Inherited properties
this is what I am doing... nothing weird:
/** The String message to display in a page*/
@Persist(PersistenceConstants.FLASH)
private String _displayMessage;
/**
* @return the displayMessage
*/
public String getDisplayMessage() {
return _displayMessage;
}
/**
* @param displayMessage the displayMessage to set
*/
public void setDisplayMessage(String displayMessage) {
_displayMessage = displayMessage;
}
----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 7 April, 2009 14:17:55 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Inherited properties
On Tue, Apr 7, 2009 at 7:24 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> Well thats what I thought, but thats not working for me... not sure if I am doing something stupid or what.
Is that property public? Is it annotated with @Property? Or has it a
getter and a setter?
--
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Inherited properties
Posted by Peter Stavrinides <P....@albourne.com>.
this is what I am doing... nothing weird:
/** The String message to display in a page*/
@Persist(PersistenceConstants.FLASH)
private String _displayMessage;
/**
* @return the displayMessage
*/
public String getDisplayMessage() {
return _displayMessage;
}
/**
* @param displayMessage the displayMessage to set
*/
public void setDisplayMessage(String displayMessage) {
_displayMessage = displayMessage;
}
----- Original Message -----
From: "Thiago H. de Paula Figueiredo" <th...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 7 April, 2009 14:17:55 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Inherited properties
On Tue, Apr 7, 2009 at 7:24 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> Well thats what I thought, but thats not working for me... not sure if I am doing something stupid or what.
Is that property public? Is it annotated with @Property? Or has it a
getter and a setter?
--
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Inherited properties
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, Apr 7, 2009 at 7:24 AM, Peter Stavrinides
<P....@albourne.com> wrote:
> Well thats what I thought, but thats not working for me... not sure if I am doing something stupid or what.
Is that property public? Is it annotated with @Property? Or has it a
getter and a setter?
--
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Inherited properties
Posted by Peter Stavrinides <P....@albourne.com>.
Well thats what I thought, but thats not working for me... not sure if I am doing something stupid or what.
----- Original Message -----
From: "DH" <ni...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Tuesday, 7 April, 2009 12:53:45 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Inherited properties
It is possible, just think displayMessage is a property of B like in java world, and can use ${displayMessage} and others to reference it.
Thanks,
DH
----- Original Message -----
From: "Peter Stavrinides"
To: "Tapestry Mailing List" <us...@tapestry.apache.org>
Sent: Tuesday, April 07, 2009 3:55 PM
Subject: Inherited properties
> Hi,
>
> If PageClass B extends BaseClass A, and BaseClass A contains a property displayMessage, how do I reference the displayMessage property from PageClass B's .tml file? I would prefer to do this directly in the tml if possible.
>
> Thanks,
> Peter
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Inherited properties
Posted by DH <ni...@gmail.com>.
It is possible, just think displayMessage is a property of B like in java world, and can use ${displayMessage} and others to reference it.
Thanks,
DH
----- Original Message -----
From: "Peter Stavrinides"
To: "Tapestry Mailing List" <us...@tapestry.apache.org>
Sent: Tuesday, April 07, 2009 3:55 PM
Subject: Inherited properties
> Hi,
>
> If PageClass B extends BaseClass A, and BaseClass A contains a property displayMessage, how do I reference the displayMessage property from PageClass B's .tml file? I would prefer to do this directly in the tml if possible.
>
> Thanks,
> Peter
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>