Author: nbelaevski
Date: 2011-02-02 08:35:04 -0500 (Wed, 02 Feb 2011)
New Revision: 21387
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss
trunk/ui/iteration/ui/src/main/templates/toggle-control.template.xml
Log:
https://issues.jboss.org/browse/RF-10207
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java 2011-02-02
13:05:01 UTC (rev 21386)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java 2011-02-02
13:35:04 UTC (rev 21387)
@@ -70,6 +70,10 @@
private static final String COLLAPSED_STATE = "collapsed";
+ private static final String EXPANDED_CONTROL_CLASS = "rf-csttg-exp";
+
+ private static final String COLLAPSED_CONTROL_CLASS = "rf-csttg-colps";
+
@Override
protected void doDecode(FacesContext context, UIComponent component) {
//TODO - review
@@ -116,7 +120,8 @@
}
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, control.getClientId(context) +
":" + state, null);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE,
concatClasses(getIconClass(expanded), styleClass), null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, concatClasses(styleClass,
+ expanded ? EXPANDED_CONTROL_CLASS : COLLAPSED_CONTROL_CLASS), null);
writer.writeAttribute(HtmlConstants.STYLE_ATTRIBUTE, style, null);
UIComponent controlFacet = control.getFacet(state);
@@ -207,15 +212,4 @@
return expanded ? EXPANDED_STATE : COLLAPSED_STATE;
}
- protected String getIconClass(boolean expanded) {
- return expanded ? getExpandedIconClass() : getCollapsedIconClass();
- }
-
- public String getExpandedIconClass() {
- return "rf-csttg-exp";
- }
-
- public String getCollapsedIconClass() {
- return "rf-csttg-colps";
- }
}
\ No newline at end of file
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss 2011-02-02
13:05:01 UTC (rev 21386)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable-toggler.ecss 2011-02-02
13:35:04 UTC (rev 21387)
@@ -1,7 +1,3 @@
-.rf-csttg-exp {
- cursor:pointer;
-}
-
-.rf-csttg-colps {
- cursor:pointer;
+.rf-csttg {
+ cursor: pointer;
}
\ No newline at end of file
Modified: trunk/ui/iteration/ui/src/main/templates/toggle-control.template.xml
===================================================================
--- trunk/ui/iteration/ui/src/main/templates/toggle-control.template.xml 2011-02-02
13:05:01 UTC (rev 21386)
+++ trunk/ui/iteration/ui/src/main/templates/toggle-control.template.xml 2011-02-02
13:35:04 UTC (rev 21387)
@@ -13,7 +13,7 @@
</cc:interface>
<cc:implementation>
- <span id="#{clientId}"
class="#{component.attributes['styleClass']}">
+ <span id="#{clientId}"
class="#{concatClasses(component.attributes['styleClass'],
'rf-csttg')}">
<cdk:call expression="encodeControl(facesContext, component);" />
</span>
</cc:implementation>