[ http://issues.apache.org/struts/browse/STR-1606?page=all ] David Evans reopened STR-1606: ------------------------------
Assign To: (was: Struts Developer Mailing List) > Automatic readonly/disabled settings in struts-html > --------------------------------------------------- > > Key: STR-1606 > URL: http://issues.apache.org/struts/browse/STR-1606 > Project: Struts Action 1 > Type: Improvement > Components: Taglibs > Versions: 1.1 Final > Environment: Operating System: All > Platform: All > Reporter: Shai Berger > Priority: Minor > Fix For: 1.2 Family > > We are developing a web application with a number of complex pages and > dozens of controls. These controls' readonly status should be set, > individually, at runtime. With the current (1.1) struts-html, our pages > come out as a repetition of > <html:text property="someName" > readonly='<%=formBean.isReadonly("someName") %>' > styleClass='<%= > formBean.isReadonly("someName")?"ReadOnlyClass":"ReadWriteClass" > > > %>' /> > With "someName" being replaced each time with the relevant property, > of course. Since the application is big, but not huge, this is > borderline acceptable to us. > Now, of course, we could extend html:text -- and any other specific tag > we use -- to deal with it, but I think the correct place > for the fix is BaseHandlerTag.java. What I have in mind is an additional > attribute to html:form that would define a generic mechanism for setting > the control properties, something along the lines of > <html:form ... readonlyIndicator="isReadonly" /> > Which would then do the equivalent of planting the above code in all the > form controls (perhaps with an additional "styleReadonlyClass" property). > Note: With CSS2, setting a specific style class for readonly controls > should not be necessary, because the selectors can handle it, and in > general, I understand that setting styles automagically goes close to UI > issues which struts-html may not want to deal with. However, setting the > readonly attribute is pure semantics, and even if you don't want to > include the styleClass/styleReadonlyClass feature, I would like the automatic > readonly part to be considered. > And of course, "disabled", although we don't specifically need it, would > be a natural candidate for the same treatment. > <OT> > I thought this was better discussed on the list before I submitted it as a > bug, > but when I sent it to the list, no one replied... did I do something wrong? > </OT> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]