It appears you are trying to programatically change a component on the server.  
However, that seems to require you understand the api for the components.  Most 
components have a paramter:

This is from the component reference for Tapestry 3, for the TextField 
Component.
Parameters
Name    Type    Direction       Required        Default         Description
value   String  in-out  yes             The text inside the text field. The 
binding is only updated when the the component is not disabled. Corresponds to 
the "value" HTML attribute.
hidden  boolean         in      no      false   If true, then the text field is 
written as a <input type="password"> form element.
disabled        boolean         in      no      false   Controls whether the 
text field is active or not. If disabled, then any value that comes up when the 
form is submitted is ignored. Corresponds to the "disabled" HTML attribute.


For the same component in Tapestry 4 see:
http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/TextField.html

The components have a "disabled" parameter.  All you have to do is use ognl to 
disable it:

<span jwcid="@TextField" disabled="ognl:editMode == true" value="ognl:newItem"/>

I suppose you can iterate through the list of components and modify them, if 
they support "disableing" them programatically.  However, this seems easier.

HTH,

Mark



-----Original Message-----
From: zqzuk [mailto:[EMAIL PROTECTED]
Sent: Fri 8/4/2006 3:56 PM
To: users@tapestry.apache.org
Subject: RE: disable form component
 

hi, thnx. but i dont know how to do this... i suppose, i need to get the
component, for exmaple

IFormComponent comp = (FormComponent)getComponent("myCheckBox"));
if(condition satisfied){
    comp.setDisabled(true);
}

however i searched tapestry API, there isnt such a setDisabled() method or
something equivalent. only isDisabled() which returns a boolean value. so
how can i disable it in this way please?

thnk you.
-- 
View this message in context: 
http://www.nabble.com/disable-form-component-tf2050627.html#a5658357
Sent from the Tapestry - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to