Class TabsBehavior
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
-
- com.googlecode.wicket.jquery.core.JQueryBehavior
-
- com.googlecode.wicket.jquery.ui.JQueryUIBehavior
-
- com.googlecode.wicket.jquery.ui.widget.tabs.TabsBehavior
-
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware,JQueryDestroyListener.IDestroyable,Serializable,org.apache.wicket.IComponentAwareEventSink,org.apache.wicket.markup.html.IComponentAwareHeaderContributor,org.apache.wicket.util.io.IClusterable
public abstract class TabsBehavior extends JQueryUIBehavior implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
Provides a jQuery tabs behavior.
Note, this class has almost the same code as AccordionBehavior- Since:
- 1.2.1
- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classTabsBehavior.ActivateEventProvides an event object that will be broadcasted by theTabsBehavior.OnActivateAjaxBehaviorcallbackprotected static classTabsBehavior.ActivatingEventProvides an event object that will be broadcasted by theTabsBehavior.OnActivatingAjaxBehaviorcallbackprotected static classTabsBehavior.OnActivateAjaxBehaviorProvides aJQueryAjaxBehaviorthat aims to be wired to the 'activate' eventprotected static classTabsBehavior.OnActivatingAjaxBehaviorProvides aJQueryAjaxBehaviorthat aims to be wired to the 'beforeActivate' event
-
Constructor Summary
Constructors Constructor Description TabsBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, ITabsListener listener)ConstructorTabsBehavior(String selector, ITabsListener listener)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidactivate(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)Activates the selected tab, identified by the indexvoidbind(org.apache.wicket.Component component)voiddisable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)Disables a tab, identified by its index.voiddisable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)Disables all tabsvoidenable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)Enables a tab, identified by its indexvoidenable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)Enables all tabsprotected abstract List<org.apache.wicket.extensions.markup.html.tabs.ITab>getTabs()Gets the referenceListofITabs.
Usually the model object of the component on which thisTabsBehavioris bound to.protected List<org.apache.wicket.extensions.markup.html.tabs.ITab>getVisibleTabs()Gets a read-onlyITabListhaving its visible flag set to true.protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehaviornewOnActivateAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)Gets a newJQueryAjaxBehaviorthat will be wired to the 'activate' eventprotected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehaviornewOnActivatingAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)Gets a newJQueryAjaxBehaviorthat will be wired to the 'beforeActivate' eventvoidonAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)voidonConfigure(org.apache.wicket.Component component)-
Methods inherited from class com.googlecode.wicket.jquery.ui.JQueryUIBehavior
destroy, onDestroy, widget, widget, widget, widget
-
Methods inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior
$, $, $, $, beforeRender, detach, getMethod, getOption, getOptions, getSelector, off, on, on, register, remove, renderHead, setOption, setOption, setOption, setOptions, setSelector
-
Methods inherited from class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
add, getJQueryLibrarySettings, renderOnDomReadyScript, renderPriorityHeaderItem, toString
-
-
-
-
Field Detail
-
METHOD
public static final String METHOD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TabsBehavior
public TabsBehavior(String selector, ITabsListener listener)
Constructor- Parameters:
selector- the html selector (ie: "#myId")listener- theITabsListener
-
TabsBehavior
public TabsBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, ITabsListener listener)
Constructor- Parameters:
selector- the html selector (ie: "#myId")options- theOptionslistener- theITabsListener
-
-
Method Detail
-
getTabs
protected abstract List<org.apache.wicket.extensions.markup.html.tabs.ITab> getTabs()
Gets the referenceListofITabs.
Usually the model object of the component on which thisTabsBehavioris bound to.- Returns:
- a non-null
List
-
getVisibleTabs
protected List<org.apache.wicket.extensions.markup.html.tabs.ITab> getVisibleTabs()
Gets a read-onlyITabListhaving its visible flag set to true.- Returns:
- a
ListofITabs
-
bind
public void bind(org.apache.wicket.Component component)
- Overrides:
bindin classorg.apache.wicket.behavior.Behavior
-
activate
public void activate(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)Activates the selected tab, identified by the index- Parameters:
index- the tab's indexhandler- theIPartialPageRequestHandler
-
enable
public void enable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Enables all tabs- Parameters:
handler- theIPartialPageRequestHandler
-
enable
public void enable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)Enables a tab, identified by its index- Parameters:
index- the tab's indexhandler- theIPartialPageRequestHandler
-
disable
public void disable(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Disables all tabs- Parameters:
handler- theIPartialPageRequestHandler
-
disable
public void disable(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)Disables a tab, identified by its index. The selected tab cannot be disabled.- Parameters:
index- the tab's indexhandler- theIPartialPageRequestHandler
-
onConfigure
public void onConfigure(org.apache.wicket.Component component)
- Overrides:
onConfigurein classJQueryUIBehavior
-
onAjax
public void onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)- Specified by:
onAjaxin interfacecom.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
-
newOnActivateAjaxBehavior
protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnActivateAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
Gets a newJQueryAjaxBehaviorthat will be wired to the 'activate' event- Parameters:
source- theIJQueryAjaxAware- Returns:
- a new
OnActivateAjaxBehaviorby default
-
newOnActivatingAjaxBehavior
protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnActivatingAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
Gets a newJQueryAjaxBehaviorthat will be wired to the 'beforeActivate' event- Parameters:
source- theIJQueryAjaxAware- Returns:
- a new
OnActivateAjaxBehaviorby default
-
-