public abstract class TabsBehavior extends JQueryBehavior implements IJQueryAjaxAware
Modifier and Type | Class and Description |
---|---|
protected static class |
TabsBehavior.ActivateEvent
Provides an event object that will be broadcasted by the
JQueryAjaxBehavior 'activate' callback |
protected static class |
TabsBehavior.ActivatingEvent |
Constructor and Description |
---|
TabsBehavior(String selector)
Constructor
|
TabsBehavior(String selector,
Options options)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
activate(int index,
org.apache.wicket.ajax.AjaxRequestTarget target)
Activates the selected tab, identified by the index
|
void |
bind(org.apache.wicket.Component component) |
protected abstract List<org.apache.wicket.extensions.markup.html.tabs.ITab> |
getTabs()
Gets the reference
List of ITab s.Usually the model object of the component on which this TabsBehavior is bound to. |
protected List<org.apache.wicket.extensions.markup.html.tabs.ITab> |
getVisibleTabs()
Gets a read-only
ITab List having its visible flag set to true. |
boolean |
isOnActivatingEventEnabled()
Indicates whether the 'beforeActivate' event is enabled.
If true, the onActivating(AjaxRequestTarget, int, ITab) event will be triggered. |
protected JQueryAjaxBehavior |
newActivateEventBehavior()
Gets a new
JQueryAjaxBehavior that acts as the 'activate' javascript callback |
protected JQueryAjaxBehavior |
newActivatingEventBehavior()
Gets a new
JQueryAjaxBehavior that acts as the 'beforeActivate' javascript callback |
void |
onActivate(org.apache.wicket.ajax.AjaxRequestTarget target,
int index,
org.apache.wicket.extensions.markup.html.tabs.ITab tab)
Triggered when a tab has been activated ('activate' event).
|
void |
onActivating(org.apache.wicket.ajax.AjaxRequestTarget target,
int index,
org.apache.wicket.extensions.markup.html.tabs.ITab tab)
Triggered when a tab is being activated ('beforeActivate' event).
|
void |
onAjax(org.apache.wicket.ajax.AjaxRequestTarget target,
JQueryEvent event) |
void |
onConfigure(org.apache.wicket.Component component) |
$, $, $, beforeRender, getMethod, getOption, getOptions, getSelector, on, on, renderHead, setOption, setOptions, setSelector
add, getJQueryLibrarySettings, renderScript, toString
public TabsBehavior(String selector)
selector
- the html selector (ie: "#myId")protected abstract List<org.apache.wicket.extensions.markup.html.tabs.ITab> getTabs()
List
of ITab
s.TabsBehavior
is bound to.List
protected List<org.apache.wicket.extensions.markup.html.tabs.ITab> getVisibleTabs()
ITab
List
having its visible flag set to true.List
of ITab
spublic void bind(org.apache.wicket.Component component)
bind
in class org.apache.wicket.behavior.Behavior
public void activate(int index, org.apache.wicket.ajax.AjaxRequestTarget target)
target
- the AjaxRequestTarget
index
- the tab's indexpublic void onConfigure(org.apache.wicket.Component component)
onConfigure
in class JQueryBehavior
public void onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, JQueryEvent event)
onAjax
in interface IJQueryAjaxAware
protected JQueryAjaxBehavior newActivateEventBehavior()
JQueryAjaxBehavior
that acts as the 'activate' javascript callbackJQueryAjaxBehavior
protected JQueryAjaxBehavior newActivatingEventBehavior()
JQueryAjaxBehavior
that acts as the 'beforeActivate' javascript callbackJQueryAjaxBehavior
public boolean isOnActivatingEventEnabled()
onActivating(AjaxRequestTarget, int, ITab)
event will be triggered.public void onActivating(org.apache.wicket.ajax.AjaxRequestTarget target, int index, org.apache.wicket.extensions.markup.html.tabs.ITab tab)
target
- the AjaxRequestTarget
index
- the previously selected tab indextab
- the ITab
that corresponds to the indexpublic void onActivate(org.apache.wicket.ajax.AjaxRequestTarget target, int index, org.apache.wicket.extensions.markup.html.tabs.ITab tab)
target
- the AjaxRequestTarget
index
- the tab index that triggered this eventtab
- the ITab
that corresponds to the indexCopyright © 2013 7thWeb. All Rights Reserved.