[ http://issues.apache.org/jira/browse/TOMAHAWK-826?page=comments#action_12460073 ] Alex Savitsky commented on TOMAHAWK-826: ----------------------------------------
Is this a sandbox component? I only looked at the released components, so must have missed that one. Still, it's not so clear with the "if" component, either - what kind of condition would I put there? It would be something on the lines of "#{empty facesContext.messages[targetControlId] ? 'normalStyle' : 'errorStyle'}", but where would I get the targetControlId (the Id of control being labeled, that is) from, without resorting to "forceId"? > Improve outputLabel component to have a different CSS class in case of an > error > ------------------------------------------------------------------------------- > > Key: TOMAHAWK-826 > URL: http://issues.apache.org/jira/browse/TOMAHAWK-826 > Project: MyFaces Tomahawk > Issue Type: Improvement > Reporter: Alex Savitsky > Priority: Minor > Attachments: HtmlFlaggableLabelRenderer.java > > > Currently, the only visual cue for validation errors is to display validation > messages using <t:messages />. However, quite often there's a different > requirement for error flagging, namely to identify the field labels (e.g., > make them red) if the field has an error. This behavior cannot be achieved > using available controls, and therefore I propose to enhance an existing > Label control with this functionality. All it would have to do is to set a > specified CSS class (and/or CSS style) on a label component, if the field > referenced with the "for" attribute has an error. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira