You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mu...@apache.org on 2007/02/16 21:46:50 UTC
svn commit: r508575 - in /struts/struts2/trunk/core/src:
main/java/org/apache/struts2/components/
main/java/org/apache/struts2/views/jsp/ui/ main/resources/META-INF/
main/resources/template/simple/ site/resources/tags/
Author: musachy
Date: Fri Feb 16 12:46:49 2007
New Revision: 508575
URL: http://svn.apache.org/viewvc?view=rev&rev=508575
Log:
WW-1688 Add "templateCssPath" attribute to tabbedPanel
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TabbedPanel.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java
struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld
struts/struts2/trunk/core/src/main/resources/template/simple/tabbedpanel.ftl
struts/struts2/trunk/core/src/site/resources/tags/tabbedPanel.html
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TabbedPanel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TabbedPanel.java?view=diff&rev=508575&r1=508574&r2=508575
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TabbedPanel.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TabbedPanel.java Fri Feb 16 12:46:49 2007
@@ -66,6 +66,7 @@
protected String selectedTab;
protected String closeButton;
protected String doLayout ;
+ protected String templateCssPath;
public TabbedPanel(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
@@ -89,6 +90,8 @@
addParameter("labelPosition", null);
addParameter("labelPosition", labelPosition);
}
+ if(templateCssPath != null)
+ addParameter("templateCssPath", findString(templateCssPath));
}
public String getDefaultOpenTemplate() {
@@ -123,5 +126,10 @@
@StrutsTagAttribute(description="If doLayout is false, the tab container's height equals the height of the currently selected tab", type="Boolean", defaultValue="false")
public void setDoLayout(String doLayout) {
this.doLayout = doLayout;
+ }
+
+ @StrutsTagAttribute(description="Template css path")
+ public void setTemplateCssPath(String templateCssPath) {
+ this.templateCssPath = templateCssPath;
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java?view=diff&rev=508575&r1=508574&r2=508575
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TabbedPanelTag.java Fri Feb 16 12:46:49 2007
@@ -38,6 +38,7 @@
private String selectedTab;
private String closeButton;
private String doLayout;
+ private String templateCssPath;
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
return new TabbedPanel(stack, req, res);
@@ -50,6 +51,7 @@
tabbedPanel.setCloseButton(closeButton);
tabbedPanel.setDoLayout(doLayout);
tabbedPanel.setLabelposition(labelPosition);
+ tabbedPanel.setTemplateCssPath(templateCssPath);
}
public void setSelectedTab(String selectedTab) {
@@ -62,5 +64,9 @@
public void setDoLayout(String doLayout) {
this.doLayout = doLayout;
+ }
+
+ public void setTemplateCssPath(String templateCssPath) {
+ this.templateCssPath = templateCssPath;
}
}
Modified: struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld?view=diff&rev=508575&r1=508574&r2=508575
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld (original)
+++ struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld Fri Feb 16 12:46:49 2007
@@ -7223,6 +7223,12 @@
<description><![CDATA[The template (other than default) to use for rendering the element]]></description>
</attribute>
<attribute>
+ <name>templateCssPath</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <description><![CDATA[Template css path]]></description>
+ </attribute>
+ <attribute>
<name>templateDir</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
Modified: struts/struts2/trunk/core/src/main/resources/template/simple/tabbedpanel.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/tabbedpanel.ftl?view=diff&rev=508575&r1=508574&r2=508575
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/tabbedpanel.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/tabbedpanel.ftl Fri Feb 16 12:46:49 2007
@@ -26,4 +26,7 @@
<#if parameters.doLayout?exists>
doLayout="${parameters.doLayout?string?html}"<#rt/>
</#if>
+ <#if parameters.templateCssPath?exists>
+ templateCssPath="<@s.url value='${parameters.templateCssPath}' encode="false" includeParams='none'/>"
+ </#if>
>
Modified: struts/struts2/trunk/core/src/site/resources/tags/tabbedPanel.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/tabbedPanel.html?view=diff&rev=508575&r1=508574&r2=508575
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/tabbedPanel.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/tabbedPanel.html Fri Feb 16 12:46:49 2007
@@ -276,6 +276,14 @@
<td align="left" valign="top">The template (other than default) to use for rendering the element</td>
</tr>
<tr>
+ <td align="left" valign="top">templateCssPath</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Template css path</td>
+ </tr>
+ <tr>
<td align="left" valign="top">templateDir</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>