|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.form.LabeledWebMarkupContainer
org.apache.wicket.markup.html.form.FormComponent<String>
org.apache.wicket.markup.html.form.Button
org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton
org.wicketstuff.async.components.ProgressButton
public class ProgressButton
A progress button which allows to control a Runnable. Each such button will refresh itself as given by
by the Duration with which it was constructed. It represents a runnable by a AbstractTaskContainer.
In order to create tasks, the button needs to be provided a IRunnableFactory.
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, VALUE_SEPARATOR |
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
| Constructor Summary | |
|---|---|
ProgressButton(String id,
Form<?> form,
IModel<? extends AbstractTaskContainer> taskContainerModel,
Duration duration)
|
|
ProgressButton(String id,
Form<?> form,
IModel<? extends AbstractTaskContainer> taskContainerModel,
IRunnableFactory runnableFactory,
Duration duration)
|
|
ProgressButton(String id,
IModel<String> model,
Form<?> form,
IModel<? extends AbstractTaskContainer> taskContainerModel,
Duration duration)
|
|
ProgressButton(String id,
IModel<String> model,
Form<?> form,
IModel<? extends AbstractTaskContainer> taskContainerModel,
IRunnableFactory runnableFactory,
Duration duration)
|
|
| Method Summary | |
|---|---|
void |
addRefreshDependant(Component refreshDependant)
Allows to add a component which is rerendered every time the button is rerendered. |
protected AbstractTaskContainer |
getTaskContainer()
|
IModel<? extends AbstractTaskContainer> |
getTaskContainerModel()
|
protected boolean |
isAllowInterrupt()
This method can be overridden to implement a custom behavior for interrupt tasks. |
protected boolean |
isAllowRestart()
This method can be overridden to implement a custom behavior for restarting tasks. |
protected boolean |
isAllowStart()
This method can be overridden to implement a custom behavior for starting tasks. |
boolean |
isEnabled()
|
protected void |
onSubmit(AjaxRequestTarget target,
Form<?> form)
|
protected void |
onTaskCancel(AjaxRequestTarget ajaxRequestTarget)
Override to trigger a custom action whenever a task was canceled and halted. |
protected void |
onTaskError(AjaxRequestTarget ajaxRequestTarget)
Override to trigger a custom action whenever an error is occurred. |
protected void |
onTaskStart(AjaxRequestTarget ajaxRequestTarget)
Override to trigger a custom action whenever a task is started. |
protected void |
onTaskSuccess(AjaxRequestTarget ajaxRequestTarget)
Override to trigger a custom action whenever a task succeeded. |
protected void |
refresh(AjaxRequestTarget target)
Overriding allows a custom refresh behavior. |
void |
registerCssClassModel(IModel<String> textModel,
InteractionState... interactionStates)
Adds a model for a css class which will be appended if any of the interactionStates apply, disregarding any
possible task state. |
void |
registerCssClassModel(IModel<String> textModel,
TaskState... taskStates)
Adds a model for a css class which will be appended if any of the taskStates apply, disregarding any
possible interaction state. |
void |
registerCssClassModel(IModel<String> textModel,
TaskState taskState,
InteractionState interactionState)
Adds a model for a css class which will be appended only if taskState and interactionState apply. |
void |
registerMessageModel(IModel<String> textModel,
InteractionState... interactionStates)
Adds a text model for the button which will be appended if any of the interactionStates apply, disregarding any
possible task state. |
void |
registerMessageModel(IModel<String> textModel,
TaskState... taskStates)
Adds a text model for the button which will be appended if any of the taskStates apply, disregarding any
possible interaction state. |
void |
registerMessageModel(IModel<String> textModel,
TaskState taskState,
InteractionState interactionState)
Adds a text model for the button which will be appended only if taskState and interactionState apply. |
void |
removeRefreshDependant(Component refreshDependant)
Allows to remove a component which was rerendered every time the button was rerendered. |
void |
setTaskContainerModel(IModel<? extends AbstractTaskContainer> taskContainerModel)
|
| Methods inherited from class org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton |
|---|
getChannel, getForm, isButtonEnabled, onAfterSubmit, onAfterSubmit, onComponentTag, onError, onSubmit, updateAjaxAttributes |
| Methods inherited from class org.apache.wicket.markup.html.form.Button |
|---|
getDefaultFormProcessing, getOnClickScript, initModel, onError, setDefaultFormProcessing, updateModel |
| Methods inherited from class org.apache.wicket.markup.html.form.LabeledWebMarkupContainer |
|---|
getLabel |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getWebPage, getWebRequest, getWebResponse, getWebSession |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.wicket.markup.html.form.IFormSubmittingComponent |
|---|
getInputName |
| Constructor Detail |
|---|
public ProgressButton(String id,
Form<?> form,
IModel<? extends AbstractTaskContainer> taskContainerModel,
Duration duration)
public ProgressButton(String id,
IModel<String> model,
Form<?> form,
IModel<? extends AbstractTaskContainer> taskContainerModel,
Duration duration)
public ProgressButton(String id,
Form<?> form,
IModel<? extends AbstractTaskContainer> taskContainerModel,
IRunnableFactory runnableFactory,
Duration duration)
public ProgressButton(String id,
IModel<String> model,
Form<?> form,
IModel<? extends AbstractTaskContainer> taskContainerModel,
IRunnableFactory runnableFactory,
Duration duration)
| Method Detail |
|---|
public IModel<? extends AbstractTaskContainer> getTaskContainerModel()
public void setTaskContainerModel(IModel<? extends AbstractTaskContainer> taskContainerModel)
protected AbstractTaskContainer getTaskContainer()
protected boolean isAllowStart()
true if the button is allowed to start a task.protected boolean isAllowRestart()
true if the button is allowed to restart a task.protected boolean isAllowInterrupt()
true if the button is allowed to interrupt a running task.
protected void onSubmit(AjaxRequestTarget target,
Form<?> form)
onSubmit in class AjaxFallbackButtonprotected void refresh(AjaxRequestTarget target)
target - The Ajax request target.public boolean isEnabled()
isEnabled in class Component
public void registerMessageModel(IModel<String> textModel,
TaskState taskState,
InteractionState interactionState)
taskState and interactionState apply.
textModel - The model to be appended.taskState - The relevant task state.interactionState - The relevant interaction state.
public void registerMessageModel(IModel<String> textModel,
TaskState... taskStates)
taskStates apply, disregarding any
possible interaction state.
textModel - The model to be appended.taskStates - All relevant task states.
public void registerMessageModel(IModel<String> textModel,
InteractionState... interactionStates)
interactionStates apply, disregarding any
possible task state.
textModel - The model to be appended.interactionStates - All relevant interaction states.
public void registerCssClassModel(IModel<String> textModel,
TaskState taskState,
InteractionState interactionState)
taskState and interactionState apply.
textModel - The model to be appended.taskState - The relevant task state.interactionState - The relevant interaction state.
public void registerCssClassModel(IModel<String> textModel,
TaskState... taskStates)
taskStates apply, disregarding any
possible interaction state.
textModel - The model to be appended.taskStates - All relevant task states.
public void registerCssClassModel(IModel<String> textModel,
InteractionState... interactionStates)
interactionStates apply, disregarding any
possible task state.
textModel - The model to be appended.interactionStates - All relevant interaction states.public void addRefreshDependant(Component refreshDependant)
refreshDependant - The dependant component.public void removeRefreshDependant(Component refreshDependant)
refreshDependant - The dependant component.protected void onTaskStart(AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - The Ajax request target. Might be null.protected void onTaskSuccess(AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - The Ajax request target.protected void onTaskCancel(AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - The Ajax request target. Might be null.protected void onTaskError(AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - The Ajax request target.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||