mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-1688 Add "templateCssPath" attribute to tabbedPanel
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508570 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -66,6 +66,7 @@ public class TabbedPanel extends ClosingUIBean {
|
||||
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 @@ public class TabbedPanel extends ClosingUIBean {
|
||||
addParameter("labelPosition", null);
|
||||
addParameter("labelPosition", labelPosition);
|
||||
}
|
||||
if(templateCssPath != null)
|
||||
addParameter("templateCssPath", findString(templateCssPath));
|
||||
}
|
||||
|
||||
public String getDefaultOpenTemplate() {
|
||||
@@ -124,4 +127,9 @@ public class TabbedPanel extends ClosingUIBean {
|
||||
public void setDoLayout(String doLayout) {
|
||||
this.doLayout = doLayout;
|
||||
}
|
||||
|
||||
@StrutsTagAttribute(description="Template css path")
|
||||
public void setTemplateCssPath(String templateCssPath) {
|
||||
this.templateCssPath = templateCssPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ public class TabbedPanelTag extends AbstractClosingTag {
|
||||
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 @@ public class TabbedPanelTag extends AbstractClosingTag {
|
||||
tabbedPanel.setCloseButton(closeButton);
|
||||
tabbedPanel.setDoLayout(doLayout);
|
||||
tabbedPanel.setLabelposition(labelPosition);
|
||||
tabbedPanel.setTemplateCssPath(templateCssPath);
|
||||
}
|
||||
|
||||
public void setSelectedTab(String selectedTab) {
|
||||
@@ -63,4 +65,8 @@ public class TabbedPanelTag extends AbstractClosingTag {
|
||||
public void setDoLayout(String doLayout) {
|
||||
this.doLayout = doLayout;
|
||||
}
|
||||
|
||||
public void setTemplateCssPath(String templateCssPath) {
|
||||
this.templateCssPath = templateCssPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
>
|
||||
|
||||
@@ -275,6 +275,14 @@ Please do not edit it directly.
|
||||
<td align="left" valign="top">String</td>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user