How to apply style/styleclass by calling getStyle() or getstyleclass()
----------------------------------------------------------------------
Key: MYFACES-1772
URL: https://issues.apache.org/jira/browse/MYFACES-1772
Project: MyFaces Core
Issue Type: Bug
Components: Extension Feature
Affects Versions: 1.1.5
Reporter: Raghunandan Sapre
Hi The source code for many renderer classes say that style of button etc, can
be overriden by overriding getStyle method.
I wanted to know how to do that. I was thinking it should be setStyle method
and not get method?
Thanks
Raghu
/**
* Can be overwritten by derived classes to overrule the style to be used.
*/
protected String getStyle(FacesContext facesContext, UIComponent link) {
if (link instanceof HtmlCommandLink) {
return ((HtmlCommandLink) link).getStyle();
}
else {
return (String) link.getAttributes().get(HTML.STYLE_ATTR);
}
}
/**
* Can be overwritten by derived classes to overrule the style class to be used.
*/
protected String getStyleClass(FacesContext facesContext, UIComponent link) {
if (link instanceof HtmlCommandLink) {
return ((HtmlCommandLink) link).getStyleClass();
}
else {
return (String) link.getAttributes().get(HTML.STYLE_CLASS_ATTR);
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.