I seems like you'd want to use the 'disabled' parameter as Robert
mentioned, which many components have. Perhaps your dynamic behavior
could be solved by storing a flag in a page property and then using
something like:

<input t:type="textfield" disabled="disabled" value="username"/>

Where disabled would be a boolean page property.

Toby Hobson wrote:
> Thanks Chris,
>
> Does this mean that there is no easy way to disable a textfield at runtime 
> for instance? Would a mixin work for this?
>
> Toby
>
> ----- Original Message ----
> From: Chris Lewis <[EMAIL PROTECTED]>
> To: Tapestry users <users@tapestry.apache.org>
> Sent: Tuesday, 13 May, 2008 7:10:16 PM
> Subject: Re: Changing a components property at runtime
>
> Toby,
>
> Components are just POJOs - as far as your application code they have no
> common type; no common interface for such actions. There is a common
> interface but it is fitted onto component classes at runtime. If you
> need to set properties/call methods, you must provide such interfaces.
>
> chris
>
> Toby Hobson wrote:
>   
>> This may sound like a simple question but I can't work out how to change a 
>> property programatically. Basically I'd like to disable a component from an 
>> event handler. I know I can pass params in via TML or using annotations but 
>> I can't find any setX() methods on the components
>>
>> Thanks 
>>
>> Toby
>>
>>
>>   
>>     
>
>   

-- 
http://thegodcode.net

Reply via email to