Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.1, 4.1.1, 4.1.2, 4.1.3, 4.1.5, 4.1.6
-
None
-
None
Description
The IFormComponent interface specifies a isDisabled method which each implementation handles a bit different. But in all cases, if the attribute does not evaluate to true, the attribute is not written to the HTML element. This is due to the nature of the attribute, if it exists on the HTML element, regardless of the value, the element becomes disabled. Also, on those components which are input to the form, if the component is disabled, it ignores any input gathered from the form during rewind.
It would be beneficial to add an isReadOnly method and same logic base for the components. This request is basically the same request as TAPESTRY-39 (http://issues.apache.org/jira/browse/TAPESTRY-39). In that issue's comments it was stated to use the @Any component or informal parameters. Neither of these solutions work. The @Any component doesn't support validators (in the case of a TextField input) and with informal parameters, even if the attribute's value is set to false, either explicitly or through an expression evaluation, the attribute is still rendered on the screen: thus making the component read-only.
By adding similar logic to that which is used for disabling the components, the usage for the components more closely resembles the HTML elements which they represent.