net.sourceforge.jstags.tags.effects
Class MultipleTab

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by net.sourceforge.jstags.tags.JSTagsTagSupport
          extended by net.sourceforge.jstags.tags.effects.MultipleTab
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class MultipleTab
extends JSTagsTagSupport

It configures a set of elements to act as a kind of accordion. There are some elements that behave as tabs and, some others that act as tabs content. Every tab element has a tab content element so that, when one of the tabs is clicked, the corresponding tab content is displayed and any other becomes hidden. This effect depends on the javascript library Mochikit

Since:
1.1
Author:
sschz@users.sourceforge.net
See Also:
Serialized Form

Field Summary
private  java.lang.String duration
           
private  java.lang.String effect
           
private  java.lang.String selectedTabClass
           
private  java.lang.String selectedTabId
           
private static long serialVersionUID
           
private  java.lang.String tabsContentIds
           
private  java.lang.String tabsIds
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
MultipleTab()
           
 
Method Summary
 java.lang.String getDuration()
           
 java.lang.String getEffect()
           
 java.lang.String getSelectedTabClass()
           
 java.lang.String getSelectedTabId()
           
 java.lang.String getTabsContentIds()
           
 java.lang.String getTabsIds()
           
protected  java.lang.String getTemplateName()
           
protected  java.util.Map<java.lang.String,java.lang.String> getTemplateNameValuePairs()
           
 void setDuration(java.lang.String duration)
           
 void setEffect(java.lang.String effect)
           
 void setSelectedTabClass(java.lang.String selectedTabClass)
           
 void setSelectedTabId(java.lang.String selectedTabId)
           
 void setTabsContentIds(java.lang.String tabsContentIds)
           
 void setTabsIds(java.lang.String tabsIds)
           
 
Methods inherited from class net.sourceforge.jstags.tags.JSTagsTagSupport
doStartTag, getOutput
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

selectedTabClass

private java.lang.String selectedTabClass

selectedTabId

private java.lang.String selectedTabId

tabsIds

private java.lang.String tabsIds

tabsContentIds

private java.lang.String tabsContentIds

effect

private java.lang.String effect

duration

private java.lang.String duration
Constructor Detail

MultipleTab

public MultipleTab()
Method Detail

getTemplateName

protected java.lang.String getTemplateName()
                                    throws javax.servlet.jsp.JspException
Specified by:
getTemplateName in class JSTagsTagSupport
Returns:
name of the .js template used to create the JavaScript code used by this tag
Throws:
javax.servlet.jsp.JspException

getTemplateNameValuePairs

protected java.util.Map<java.lang.String,java.lang.String> getTemplateNameValuePairs()
Specified by:
getTemplateNameValuePairs in class JSTagsTagSupport
Returns:
Map of [name, value] pairs representing all the name-value pair used to create the JavaScript code. Such pairs will be used to replace data inside the .js template in order to get the code of a certain effect.

getSelectedTabId

public java.lang.String getSelectedTabId()
Returns:
Identifier of the tab that will be selected initially. The tab content related to it, will be displayed when the page is loaded. If not set, no tab content will be displayed.

setSelectedTabId

public void setSelectedTabId(java.lang.String selectedTabId)

getTabsIds

public java.lang.String getTabsIds()
Returns:
Identifiers of the tabs. The ones that will be visible always and, depending on the one clicked by the user, will show a different tab content element.

setTabsIds

public void setTabsIds(java.lang.String tabsIds)

getTabsContentIds

public java.lang.String getTabsContentIds()
Returns:
Identifiers of the tabs content. Only one tab content is shown at one time. Such an element will depend on the clicked shooterId element

setTabsContentIds

public void setTabsContentIds(java.lang.String tabsContentIds)

getSelectedTabClass

public java.lang.String getSelectedTabClass()
Returns:
CSS class of the tab that is selected currently

setSelectedTabClass

public void setSelectedTabClass(java.lang.String selectedTabClass)

getEffect

public java.lang.String getEffect()
Returns:
The kind of effect being fired on the tab content to display it when a tab is clicked.

setEffect

public void setEffect(java.lang.String effect)

getDuration

public java.lang.String getDuration()
Returns:
Duration of the effect being performed whenever a tab is clicked and its content shown. It's the effect that will be fired on the tab content. It's a float representing the number of seconds.

setDuration

public void setDuration(java.lang.String duration)


Copyright © 2007. All Rights Reserved.