Class TabbedPanel

java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ClosingUIBean
com.jgeppert.struts2.jquery.components.AbstractTopicsBean
com.jgeppert.struts2.jquery.components.TabbedPanel

public class TabbedPanel extends AbstractTopicsBean

The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote content.

If the useSelectedTabCookie attribute is set to true, the id of the selected tab is saved in a cookie on activation. When coming back to this view, the cookie is read and the tab will be activated again, unless an actual value for the selectedTab attribute is specified.

Examples

 <sj:tabbedpanel id="mytabs" animate="true" collapsible="true" useSelectedTabCookie="true">
  <sj:tab id="tab1" target="tone" label="Tab One"/>
  <sj:tab id="tab2" target="ttwo" label="Tab Two"/>
  <sj:tab id="tab3" target="tthree" label="Tab Three"/>
  <div id="tone"> Test 1 </div>
  <div id="ttwo"> Test 2 </div>
  <div id="tthree"> Test 3 </div>
 </sj:tabbedpanel>
 
 <s:url id="remoteurl1" action="myremoteactionone"/>
 <s:url id="remoteurl2" action="myremoteactiontwo"/>
 <s:url id="remoteurl3" action="myremoteactionthree"/>
 <sj:tabbedpanel id="mytabs2" selectedTab="1">
  <sj:tab id="tab1" href="%{remoteurl1}" label="Tab One"/>
  <sj:tab id="tab2" href="%{remoteurl2}" label="Tab Two"/>
  <sj:tab id="tab3" href="%{remoteurl3}" label="Tab Three"/>
 </sj:tabbedpanel>
 
Author:
Johannes Geppert
  • Field Details

    • JQUERYACTION

      public static final String JQUERYACTION
      See Also:
    • TEMPLATE

      public static final String TEMPLATE
      See Also:
    • TEMPLATE_CLOSE

      public static final String TEMPLATE_CLOSE
      See Also:
    • selectedTab

      protected String selectedTab
    • useSelectedTabCookie

      protected String useSelectedTabCookie
    • openOnMouseover

      protected String openOnMouseover
    • collapsible

      protected String collapsible
    • show

      protected String show
    • hide

      protected String hide
    • cache

      protected String cache
    • disabledTabs

      protected String disabledTabs
    • sortable

      protected String sortable
    • onLoadTopics

      protected String onLoadTopics
    • onActivateTopics

      protected String onActivateTopics
    • onBeforeActivateTopics

      protected String onBeforeActivateTopics
    • heightStyle

      protected String heightStyle
  • Constructor Details

    • TabbedPanel

      public TabbedPanel(com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
  • Method Details

    • evaluateExtraParams

      public void evaluateExtraParams()
      Overrides:
      evaluateExtraParams in class AbstractTopicsBean
    • setTheme

      public void setTheme(String theme)
      Overrides:
      setTheme in class org.apache.struts2.components.UIBean
    • getTheme

      public String getTheme()
      Overrides:
      getTheme in class org.apache.struts2.components.UIBean
    • getDefaultOpenTemplate

      public String getDefaultOpenTemplate()
      Specified by:
      getDefaultOpenTemplate in class org.apache.struts2.components.ClosingUIBean
    • getDefaultTemplate

      protected String getDefaultTemplate()
      Specified by:
      getDefaultTemplate in class org.apache.struts2.components.UIBean
    • getComponentName

      public String getComponentName()
    • setId

      public void setId(String id)
      Overrides:
      setId in class org.apache.struts2.components.UIBean
    • setSelectedTab

      public void setSelectedTab(String selectedTab)
    • setOpenOnMouseover

      public void setOpenOnMouseover(String openOnMouseover)
    • setCollapsible

      public void setCollapsible(String collapsible)
    • setShow

      public void setShow(String show)
    • setHide

      public void setHide(String hide)
    • setUseSelectedTabCookie

      public void setUseSelectedTabCookie(String useSelectedTabCookie)
    • setCache

      public void setCache(String cache)
    • setDisabledTabs

      public void setDisabledTabs(String disabledTabs)
    • setOnLoadTopics

      public void setOnLoadTopics(String onLoadTopics)
    • setOnActivateTopics

      public void setOnActivateTopics(String onActivateTopics)
    • setOnBeforeActivateTopics

      public void setOnBeforeActivateTopics(String onBeforeActivateTopics)
    • setSortable

      public void setSortable(String sortable)
    • setHeightStyle

      public void setHeightStyle(String heightStyle)