public class ButtonBehavior extends WiQueryAbstractBehavior
Creates a jQuery UI button behavior to decorate a link or a button HTML markup.
The click event is not a part of the jQuery UI framework
| Constructor and Description |
|---|
ButtonBehavior()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(org.apache.wicket.Component component) |
void |
contribute(WiQueryResourceManager wiQueryResourceManager)
Declares resources (JavaScript and CSS files) to import.
|
JsStatement |
destroy()
Method to destroy the button
This will return the element back to its pre-init state.
|
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy the button within the ajax request
|
void |
detach(org.apache.wicket.Component component) |
JsStatement |
disable()
Method to disable the button
|
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable the button within the ajax request
|
JsStatement |
enable()
Method to enable the button
|
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable the button within the ajax request
|
ButtonIcon |
getIcons() |
String |
getLabel() |
protected Options |
getOptions()
Method retrieving the options of the component
|
Boolean |
isDisabled() |
boolean |
isText() |
void |
onComponentTag(org.apache.wicket.Component component,
org.apache.wicket.markup.ComponentTag tag) |
ButtonBehavior |
setDisabled(boolean disabled)
Disables (true) or enables (false) the button.
|
ButtonBehavior |
setIcons(ButtonIcon icons)
Icons to display, with or without text (see text option).
|
ButtonBehavior |
setIcons(UiIcon primary,
UiIcon secondary)
* Icons to display, with or without text (see text option).
|
ButtonBehavior |
setLabel(org.apache.wicket.model.IModel<String> label)
Text to show on the button.
|
ButtonBehavior |
setLabel(String label)
Text to show on the button.
|
ButtonBehavior |
setText(boolean text)
Whether to show any text - when set to false (display no text), icons
(see icons option) must be enabled, otherwise it'll be ignored.
|
JsStatement |
statement()
Returns the main
JsStatement used to create the plugin. |
JsStatement |
widget()
Method to returns the .ui-autocomplete element
|
void |
widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to returns the .ui-autocomplete element within the ajax request
|
getComponentpublic void bind(org.apache.wicket.Component component)
bind in interface org.apache.wicket.behavior.IBehaviorbind in class WiQueryAbstractBehaviorpublic void detach(org.apache.wicket.Component component)
detach in interface org.apache.wicket.behavior.IBehaviordetach in class org.apache.wicket.behavior.AbstractBehaviorpublic void contribute(WiQueryResourceManager wiQueryResourceManager)
contribute in interface IWiQueryPlugincontribute in class WiQueryAbstractBehaviorwiQueryResourceManager - The WiQueryResourceManager instance managing this
component resources.WiQueryAbstractBehavior.contribute(org.odlabs.wiquery.core.commons.WiQueryResourceManager)protected Options getOptions()
public void onComponentTag(org.apache.wicket.Component component,
org.apache.wicket.markup.ComponentTag tag)
onComponentTag in interface org.apache.wicket.behavior.IBehavioronComponentTag in class org.apache.wicket.behavior.AbstractBehaviorAbstractBehavior.onComponentTag(org.apache.wicket.Component, org.apache.wicket.markup.ComponentTag)public JsStatement statement()
JsStatement used to create the plugin.statement in interface IWiQueryPluginstatement in class WiQueryAbstractBehaviorJsStatement corresponding to this component.WiQueryAbstractBehavior.statement()public ButtonBehavior setDisabled(boolean disabled)
disabled - public Boolean isDisabled()
public ButtonBehavior setText(boolean text)
text - public boolean isText()
public ButtonBehavior setIcons(ButtonIcon icons)
icons - public ButtonBehavior setIcons(UiIcon primary, UiIcon secondary)
primary - The primary icon (should be non-null)secondary - The secondary icon (might be null).public ButtonIcon getIcons()
public ButtonBehavior setLabel(String label)
label - public ButtonBehavior setLabel(org.apache.wicket.model.IModel<String> label)
label - public String getLabel()
public JsStatement destroy()
public void destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement disable()
public void disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement enable()
public void enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement widget()
public void widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - Copyright © 2009-2012. All Rights Reserved.