You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by membersound <me...@web.de> on 2012/10/14 23:34:32 UTC

Change property names on class level without renaming the var?

Hi,

I know I can rename a backend property by creating a *.properties file for a
page and use property-label=new name.

But if let's say I have a product class with timestamp variable, and want it
to be shown everywhere on every page as "creation date". Then I have to
create a properties file for *every* page that uses the product class. And
if I later intend to change the visual name again, I have to edit all of
them.

So I'm looking for a way to just annotate the timestamp property with eg
@Named("Creation Date") or likewise.
What could I do? Or is is not possible with T5?

Thanks



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Change-property-names-on-class-level-without-renaming-the-var-tp5716891.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Change property names on class level without renaming the var?

Posted by Bob Harner <bo...@gmail.com>.
I'm not sure I understand your question, but you can have a global
"app.properties" file in your WEB-INF directory. It's a good place to
put properties that are needed by more than one page.

On Sun, Oct 14, 2012 at 5:34 PM, membersound <me...@web.de> wrote:
> Hi,
>
> I know I can rename a backend property by creating a *.properties file for a
> page and use property-label=new name.
>
> But if let's say I have a product class with timestamp variable, and want it
> to be shown everywhere on every page as "creation date". Then I have to
> create a properties file for *every* page that uses the product class. And
> if I later intend to change the visual name again, I have to edit all of
> them.
>
> So I'm looking for a way to just annotate the timestamp property with eg
> @Named("Creation Date") or likewise.
> What could I do? Or is is not possible with T5?
>
> Thanks
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Change-property-names-on-class-level-without-renaming-the-var-tp5716891.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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