Hello List,
Using Tapestry 5, I'd like to dynamically set the disabled attribute
of a Field depending of its id. So, on the same form, I could say :
component1 has the disabled attribute set to true, component2 has the
disabled attribute set to false and so on.
I tried the following on the page containing the form :
method 1 :
@Inject
private ComponentResources _componentSources;
_componentSources
.getEmbdedComponent(myId).getComponentResources().set... nothing
because there is only the isDisabled method available.
So I tried
method 2 :
<t:textfield t:id="component1" disabled="prop:disabledMethod" />
where disabledMethod is :
if
(_componentSources
.getEmbdedComponent(myId).getComponentResources().isRendering())
return true;
return false;
It works well until I submit the form, at this point, the component is
not rendering, disabledMethod returns false (from what I have
understood) and my field is set to null.
Any hints would be highly appreciated.
Thanks and best regards,
Eric
--
Eric BIANCHI
http://www.rodanotech.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]