Class AccordionBehavior
- 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.accordion.AccordionBehavior
-
- 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 AccordionBehavior extends JQueryUIBehavior implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
Provides a jQuery accordion behavior.
Note, this class has almost the same code as TabsBehavior- Since:
- 1.2.3, 6.0.1
- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AccordionBehavior.ActivateEvent
Provides an event object that will be broadcasted by theAccordionBehavior.OnActivateAjaxBehavior
callbackprotected static class
AccordionBehavior.OnActivateAjaxBehavior
Provides aJQueryAjaxBehavior
that aims to be wired to the 'activate' event
-
Constructor Summary
Constructors Constructor Description AccordionBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, IAccordionListener listener)
ConstructorAccordionBehavior(String selector, IAccordionListener listener)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
activate(int index, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Activates the selected tab, identified by the indexvoid
bind(org.apache.wicket.Component component)
protected abstract List<org.apache.wicket.extensions.markup.html.tabs.ITab>
getTabs()
Gets the referenceList
ofITab
s
.
Usually the model object of the component on which thisAccordionBehavior
is bound to.protected List<org.apache.wicket.extensions.markup.html.tabs.ITab>
getVisibleTabs()
Gets a read-onlyITab
List
having its visible flag set to true.protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior
newOnActivateAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
Gets a newJQueryAjaxBehavior
that will be wired to the 'activate' eventvoid
onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
void
onConfigure(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
-
AccordionBehavior
public AccordionBehavior(String selector, IAccordionListener listener)
Constructor- Parameters:
selector
- the html selector (ie: "#myId")listener
- theIAccordionListener
-
AccordionBehavior
public AccordionBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, IAccordionListener listener)
Constructor- Parameters:
selector
- the html selector (ie: "#myId")options
- theOptions
listener
- theIAccordionListener
-
-
Method Detail
-
getTabs
protected abstract List<org.apache.wicket.extensions.markup.html.tabs.ITab> getTabs()
Gets the referenceList
ofITab
s
.
Usually the model object of the component on which thisAccordionBehavior
is bound to.- Returns:
- a non-null
List
-
getVisibleTabs
protected List<org.apache.wicket.extensions.markup.html.tabs.ITab> getVisibleTabs()
Gets a read-onlyITab
List
having its visible flag set to true.- Returns:
- a
List
ofITab
s
-
bind
public void bind(org.apache.wicket.Component component)
- Overrides:
bind
in 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
-
onConfigure
public void onConfigure(org.apache.wicket.Component component)
- Overrides:
onConfigure
in classJQueryUIBehavior
-
onAjax
public void onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
- Specified by:
onAjax
in 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 newJQueryAjaxBehavior
that will be wired to the 'activate' event- Parameters:
source
- theIJQueryAjaxAware
- Returns:
- a new
OnActivateAjaxBehavior
by default
-
-