You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/03/18 01:04:59 UTC

svn commit: r1082760 - in /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel: AbstractHtmlCollapsiblePanel.java HtmlCollapsiblePanelRenderer.java

Author: lu4242
Date: Fri Mar 18 00:04:58 2011
New Revision: 1082760

URL: http://svn.apache.org/viewvc?rev=1082760&view=rev
Log:
TOMAHAWK-1554 CollapsiblePanel CSS Question (fix css styling)

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/AbstractHtmlCollapsiblePanel.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/HtmlCollapsiblePanelRenderer.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/AbstractHtmlCollapsiblePanel.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/AbstractHtmlCollapsiblePanel.java?rev=1082760&r1=1082759&r2=1082760&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/AbstractHtmlCollapsiblePanel.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/AbstractHtmlCollapsiblePanel.java Fri Mar 18 00:04:58 2011
@@ -287,4 +287,43 @@ public abstract class AbstractHtmlCollap
         return super.isRequired();
     }
     
+    /**
+     * The CSS class for this element.  Corresponds to the HTML 'class' attribute for the generated indicator span.
+     * This attribute is ignored if a custom "header" facet is provided
+     * for the collapsible panel 
+     * 
+     * @JSFProperty
+     * @return
+     */
+    public abstract String getIndicatorStyleClass();
+    
+    /**
+     * HTML: CSS styling instructions for the generated indicator. 
+     * This attribute is ignored if a custom "header" facet is provided
+     * for the collapsible panel 
+     * 
+     * @JSFProperty
+     * @return
+     */
+    public abstract String getIndicatorStyle(); 
+    
+    /**
+     * The CSS class for this element.  Corresponds to the HTML 'class' attribute for the generated title.
+     * This attribute is ignored if a custom "header" facet is provided
+     * for the collapsible panel 
+     * 
+     * @JSFProperty
+     * @return
+     */
+    public abstract String getTitleStyleClass();
+    
+    /**
+     * HTML: CSS styling instructions for the generated title. 
+     * This attribute is ignored if a custom "header" facet is provided
+     * for the collapsible panel 
+     * 
+     * @JSFProperty
+     * @return
+     */
+    public abstract String getTitleStyle(); 
 }

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/HtmlCollapsiblePanelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/HtmlCollapsiblePanelRenderer.java?rev=1082760&r1=1082759&r2=1082760&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/HtmlCollapsiblePanelRenderer.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/collapsiblepanel/HtmlCollapsiblePanelRenderer.java Fri Mar 18 00:04:58 2011
@@ -199,8 +199,8 @@ public class HtmlCollapsiblePanelRendere
         uiText.setTransient(true);
         uiText.setValue(collapsiblePanel.isCollapsed() ? ">" : "ν");
         uiText.setEscape(false);
-        uiText.setStyleClass(collapsiblePanel.getStyleClass());
-        uiText.setStyle(collapsiblePanel.getStyle());
+        uiText.setStyleClass(collapsiblePanel.getIndicatorStyleClass());
+        uiText.setStyle(collapsiblePanel.getIndicatorStyle());
         children.add(uiText);
 
         // Create the optional label
@@ -209,8 +209,8 @@ public class HtmlCollapsiblePanelRendere
             uiText = (HtmlOutputText) application.createComponent(HtmlOutputText.COMPONENT_TYPE);
             uiText.setTransient(true);
             uiText.setValue(" " + label);
-            uiText.setStyleClass(collapsiblePanel.getStyleClass());
-            uiText.setStyle(collapsiblePanel.getStyle());
+            uiText.setStyleClass(collapsiblePanel.getTitleStyleClass());
+            uiText.setStyle(collapsiblePanel.getTitleStyle());
             children.add(uiText);
         }
         return link;