|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.odlabs.wiquery.core.behavior.WiQueryAbstractAjaxBehavior
org.odlabs.wiquery.ui.selectable.SelectableAjaxBehavior
public abstract class SelectableAjaxBehavior
$Id: SelectableAjaxBehavior
Sets the attached component selectable behavior. When the user finished to select some
childs components,onSelection(Component[], AjaxRequestTarget)
is called via
Ajax.
This behavior contains a SelectableBehavior
which is used to control the
options of the selectable, including all the options and event of the behavior.
Example:
SelectableAjaxBehavior selectable = new SelectableAjaxBehavior() { public void onSelection(Component[] components, AjaxRequestTarget ajaxRequestTarget) { ... } } SelectableBehavior sb = selectable.getSelectableBehavior(); sb.setTolerance(ToleranceEnum.FIT); add(selectable);
Field Summary |
---|
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
INDICATOR |
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener |
---|
INTERFACE |
Constructor Summary | |
---|---|
SelectableAjaxBehavior()
Default constructor |
Method Summary | |
---|---|
JsStatement |
destroy()
Method to destroy This will return the element back to its pre-init state. |
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy within the ajax request |
JsStatement |
disable()
Method to disable |
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable within the ajax request |
JsStatement |
enable()
Method to enable |
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable within the ajax request |
protected CharSequence |
getCallbackScript()
We override super method to add the selected array to the URL. |
String |
getCancel()
|
int |
getDelay()
|
int |
getDistance()
|
String |
getFilter()
|
SelectableBehavior |
getSelectableBehavior()
|
SelectableBehavior.ToleranceEnum |
getTolerance()
|
boolean |
isAutoRefresh()
|
boolean |
isDisabled()
|
protected void |
onBind()
|
void |
onSelection(org.apache.wicket.ajax.AjaxRequestTarget target)
For framework internal use only. |
abstract void |
onSelection(org.apache.wicket.Component[] components,
org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
onSelection is triggered at the end of a selection operation. |
JsStatement |
refresh()
Method to refresh |
void |
refresh(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to refresh within the ajax request |
protected void |
respond(org.apache.wicket.ajax.AjaxRequestTarget target)
|
SelectableAjaxBehavior |
setAutoRefresh(boolean autoRefresh)
This determines whether to refresh (recalculate) the position and size of each selected at the beginning of each select operation. |
SelectableAjaxBehavior |
setCancel(String cancel)
Set's the prevent selecting if you start on elements matching the selector |
SelectableAjaxBehavior |
setDelay(int delay)
Set's the delay (in milliseconds) to define when the selecting should start |
SelectableAjaxBehavior |
setDisabled(boolean disabled)
Disables (true) or enables (false) the selectable. |
SelectableAjaxBehavior |
setDistance(int distance)
Set's the tolerance in pixels |
SelectableAjaxBehavior |
setFilter(String filter)
Set's the matching child to be selectable |
SelectableAjaxBehavior |
setTolerance(SelectableBehavior.ToleranceEnum tolerance)
Set's the tolerance fit: draggable overlaps the droppable entirely touch: draggable overlaps the droppable any amount |
JsStatement |
statement()
Returns the main JsStatement used to create the plugin. |
JsStatement |
widget()
Method to returns the .ui-selectable element |
void |
widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to returns the .ui-selectable element within the ajax request |
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
---|
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getChannel, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, renderHead, throttleScript |
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
---|
afterRender, bind, getCallbackUrl, getComponent, getStatelessHint, onComponentRendered, onComponentTag, onComponentTag |
Methods inherited from class org.apache.wicket.behavior.Behavior |
---|
beforeRender, canCallListenerInterface, canCallListenerInterface, detach, isEnabled, isTemporary, onConfigure, onEvent, onException, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectableAjaxBehavior()
Method Detail |
---|
protected CharSequence getCallbackScript()
getCallbackScript
in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
AbstractAjaxBehavior.getCallbackUrl()
public SelectableBehavior getSelectableBehavior()
protected void onBind()
onBind
in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
public final void onSelection(org.apache.wicket.ajax.AjaxRequestTarget target)
public abstract void onSelection(org.apache.wicket.Component[] components, org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
components
- List of components selectedajaxRequestTarget
- the Ajax targetprotected void respond(org.apache.wicket.ajax.AjaxRequestTarget target)
respond
in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
public JsStatement statement()
IWiQueryPlugin
JsStatement
used to create the plugin.
statement
in interface IWiQueryPlugin
statement
in class WiQueryAbstractAjaxBehavior
JsStatement
corresponding to this component.public String getCancel()
public int getDelay()
public int getDistance()
public String getFilter()
public SelectableBehavior.ToleranceEnum getTolerance()
public boolean isAutoRefresh()
public SelectableAjaxBehavior setAutoRefresh(boolean autoRefresh)
autoRefresh
-
public SelectableAjaxBehavior setDisabled(boolean disabled)
disabled
-
public boolean isDisabled()
public SelectableAjaxBehavior setCancel(String cancel)
cancel
- Selector (default : ':input,option')
public SelectableAjaxBehavior setDelay(int delay)
delay
-
public SelectableAjaxBehavior setDistance(int distance)
distance
-
public SelectableAjaxBehavior setFilter(String filter)
filter
- Selector (default : '*')
public SelectableAjaxBehavior setTolerance(SelectableBehavior.ToleranceEnum tolerance)
tolerance
-
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 refresh()
public void refresh(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- public JsStatement widget()
public void widget(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |