Author: Alex.Kolonitsky
Date: 2010-10-04 03:15:55 -0400 (Mon, 04 Oct 2010)
New Revision: 19420
Modified:
trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java
Log:
RF-9401 Tab panel: classes for tab are not set
Modified: trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml 2010-10-01 21:44:47
UTC (rev 19419)
+++ trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml 2010-10-04 07:15:55
UTC (rev 19420)
@@ -15,8 +15,8 @@
<p>Page</p>
<h:form id="f">
- <pn:tabPanel id="panel" switchType="ajax">
- <pn:tab header="tab1 header">
+ <pn:tabPanel id="panel" switchType="ajax"
tabHeaderClassActive="myClass_01">
+ <pn:tab header="tab1 header"
headerClassActive="myClass_02">
Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here.
</pn:tab>
<pn:tab header="tab2 header">
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java 2010-10-01
21:44:47 UTC (rev 19419)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlTab.java 2010-10-04
07:15:55 UTC (rev 19420)
@@ -23,8 +23,8 @@
package org.richfaces.component.html;
import org.richfaces.component.UITogglePanelTitledItem;
+
import javax.faces.component.behavior.ClientBehaviorHolder;
-
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
@@ -94,8 +94,12 @@
return COMPONENT_FAMILY;
}
+ public HtmlTabPanel getTabPanel() {
+ return (HtmlTabPanel) this.getParent();
+ }
+
public String getHeaderClassActive() {
- return (String) getStateHelper().eval(PropertyKeys.headerClassActive);
+ return (String) getStateHelper().eval(PropertyKeys.headerClassActive,
getTabPanel().getTabHeaderClassActive());
}
public void setHeaderClassActive(String headerClassActive) {
@@ -103,7 +107,7 @@
}
public String getHeaderClassDisabled() {
- return (String) getStateHelper().eval(PropertyKeys.headerClassDisabled);
+ return (String) getStateHelper().eval(PropertyKeys.headerClassDisabled,
getTabPanel().getTabHeaderClassDisabled());
}
public void setHeaderClassDisabled(String headerClassDisabled) {
@@ -111,7 +115,7 @@
}
public String getHeaderClassInactive() {
- return (String) getStateHelper().eval(PropertyKeys.headerClassInactive);
+ return (String) getStateHelper().eval(PropertyKeys.headerClassInactive,
getTabPanel().getTabHeaderClassInactive());
}
public void setHeaderClassInactive(String headerClassInactive) {
@@ -119,7 +123,7 @@
}
public String getHeaderClass() {
- return (String) getStateHelper().eval(PropertyKeys.headerClass);
+ return (String) getStateHelper().eval(PropertyKeys.headerClass,
getTabPanel().getTabHeaderClass());
}
public void setHeaderClass(String headerClass) {
@@ -135,7 +139,7 @@
}
public String getContentClass() {
- return (String) getStateHelper().eval(PropertyKeys.contentClass);
+ return (String) getStateHelper().eval(PropertyKeys.contentClass,
getTabPanel().getTabContentClass());
}
public void setContentClass(String contentClass) {
Show replies by date