Author: sergeyhalipov
Date: 2007-06-07 10:51:18 -0400 (Thu, 07 Jun 2007)
New Revision: 1080
Modified:
trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-234
Modified:
trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
===================================================================
---
trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-06-07
14:17:39 UTC (rev 1079)
+++
trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-06-07
14:51:18 UTC (rev 1080)
@@ -25,6 +25,7 @@
import org.ajax4jsf.framework.renderer.ComponentVariables;
import org.ajax4jsf.framework.renderer.ComponentsVariableResolver;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.framework.util.HtmlDimensions;
import org.ajax4jsf.framework.util.javascript.JSReference;
import org.ajax4jsf.framework.util.javascript.ScriptUtils;
import org.richfaces.component.UISwitchablePanel;
@@ -307,4 +308,15 @@
protected TabInfoCollector getTabInfoCollector() {
return collector;
}
+
+ public String encodeHeaderSpacing(FacesContext context, UITabPanel pane) throws
IOException {
+ String headerSpacing = pane.getHeaderSpacing();
+ Double decoded = HtmlDimensions.decode(headerSpacing);
+ if (decoded.doubleValue() != 0) {
+ return "width: " + HtmlUtil.qualifySize(headerSpacing);
+ } else {
+ return "";
+ }
+ }
+
}
Modified: trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx
===================================================================
--- trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx 2007-06-07 14:17:39 UTC (rev
1079)
+++ trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx 2007-06-07 14:51:18 UTC (rev
1080)
@@ -38,11 +38,11 @@
<table border="0" cellpadding="0"
cellspacing="0">
<tr>
- <td><img src="#{spacer}" width="2"
height="1" alt=""
- border="0" /></td>
+ <td>
+ <img src="#{spacer}" height="1" alt=""
+ border="0" style="#{this:encodeHeaderSpacing(context,
component)}" />
+ </td>
<f:call name="encodeTabs" />
- <td><img src="#{spacer}" width="1"
height="1" alt=""
- border="0" /></td>
</tr>
</table>
<c:if test="#{clientSide}">