[
https://issues.apache.org/struts/browse/WW-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42433
]
Gunnar Hillert commented on WW-771:
-----------------------------------
I have added a patch providing the following additional tag attributes:
cssErrorStyle and cssErrorClass
Furthermore, I have changed the 'simple' template to set the error style and/or
error class in case a field error occurs.
This is the behavior:
If a field error occurs and a cssErrorClass is set it will not override the
potentially set cssClass but rather add the cssErrorClass (As described by Matt
in ticket WW-771)
However, for a cssErrorStyle it will override the cssStyle in case a field
error occurs.
I hope this will cover the requested functionality.
> Add an "errorStyleClass"-like attribute to form element tags
> ------------------------------------------------------------
>
> Key: WW-771
> URL: https://issues.apache.org/struts/browse/WW-771
> Project: Struts 2
> Issue Type: New Feature
> Components: Views
> Reporter: Xavier Defrang
> Assignee: James Holmes
> Priority: Minor
> Fix For: Future
>
> Attachments: css_error_style.zip, css_error_style_patch.txt
>
>
> From Struts HTML taglib documentation about the errorStyleClass attribute:
> <snip>
> CSS stylesheet class to be applied to this HTML element if an error exists
> for it (renders a "class" attribute).
> N.B. If present, this overrides the styleClass attribute in the event of an
> error.
> </snip>
> Translated into WebWork's vocabulary: replace the style class of the element
> if there's a fieldError associated with its name.
> Such a feature makes it very easy to highlight the fields having an error
> using plain CSS and without any presentation logic involved.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.