You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Borut Bolčina <bo...@gmail.com> on 2010/08/10 15:07:21 UTC

Dynamic Label name

Hi,

is it possible to programmatically (rather then from localized properties
file) set label string to display

<t:label for="email"/><br/>
<input t:type="TextField" t:id="email" ... size="30"/>

something like

    String getEmailLabel() {
        return "something from database";
    }


Thanks,
Borut

Re: Dynamic Label name

Posted by Chris Mylonas <ch...@mrvoip.com.au>.
It helps us noobs see easy examples too though!

So thank you!

On 10/08/2010, at 11:23 PM, Borut Bolčina wrote:

> Thanks, embarrassing easy.
> 
> 2010/8/10 Thiago H. de Paula Figueiredo <th...@gmail.com>
> 
>> On Tue, 10 Aug 2010 10:07:21 -0300, Borut Bolčina <bo...@gmail.com>
>> wrote:
>> 
>> Hi,
>>> 
>> 
>> Hi!
>> 
>> is it possible to programmatically (rather then from localized properties
>>> file) set label string to display
>>> 
>>> <t:label for="email"/><br/>
>>> <input t:type="TextField" t:id="email" ... size="30"/>
>>> 
>>> something like
>>> 
>>>   String getEmailLabel() {
>>>       return "something from database";
>>>   }
>>> 
>> 
>> It is:
>> 
>> <t:label for="email">${emailLabel}</label>
>> 
>> You can also use the label parameter of the form field components for that:
>> 
>> <input t:type="TextField" t:id="email" t:label="prop:emailLabel"
>> size="30"/>
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> ---------------------------------------------------------------------
>> 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: Dynamic Label name

Posted by Borut Bolčina <bo...@gmail.com>.
Thanks, embarrassing easy.

2010/8/10 Thiago H. de Paula Figueiredo <th...@gmail.com>

> On Tue, 10 Aug 2010 10:07:21 -0300, Borut Bolčina <bo...@gmail.com>
> wrote:
>
>  Hi,
>>
>
> Hi!
>
>  is it possible to programmatically (rather then from localized properties
>> file) set label string to display
>>
>> <t:label for="email"/><br/>
>> <input t:type="TextField" t:id="email" ... size="30"/>
>>
>> something like
>>
>>    String getEmailLabel() {
>>        return "something from database";
>>    }
>>
>
> It is:
>
> <t:label for="email">${emailLabel}</label>
>
> You can also use the label parameter of the form field components for that:
>
> <input t:type="TextField" t:id="email" t:label="prop:emailLabel"
> size="30"/>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Dynamic Label name

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 10 Aug 2010 10:07:21 -0300, Borut Bolčina  
<bo...@gmail.com> wrote:

> Hi,

Hi!

> is it possible to programmatically (rather then from localized properties
> file) set label string to display
>
> <t:label for="email"/><br/>
> <input t:type="TextField" t:id="email" ... size="30"/>
>
> something like
>
>     String getEmailLabel() {
>         return "something from database";
>     }

It is:

<t:label for="email">${emailLabel}</label>

You can also use the label parameter of the form field components for that:

<input t:type="TextField" t:id="email" t:label="prop:emailLabel"  
size="30"/>

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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