public class ProgressButton
extends org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton
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
.FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, VALUE_SEPARATOR
ENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING
Constructor and Description |
---|
ProgressButton(String id,
org.apache.wicket.markup.html.form.Form<?> form,
org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel,
org.apache.wicket.util.time.Duration duration) |
ProgressButton(String id,
org.apache.wicket.markup.html.form.Form<?> form,
org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel,
IRunnableFactory runnableFactory,
org.apache.wicket.util.time.Duration duration) |
ProgressButton(String id,
org.apache.wicket.model.IModel<String> model,
org.apache.wicket.markup.html.form.Form<?> form,
org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel,
org.apache.wicket.util.time.Duration duration) |
ProgressButton(String id,
org.apache.wicket.model.IModel<String> model,
org.apache.wicket.markup.html.form.Form<?> form,
org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel,
IRunnableFactory runnableFactory,
org.apache.wicket.util.time.Duration duration) |
Modifier and Type | Method and Description |
---|---|
void |
addRefreshDependant(org.apache.wicket.Component refreshDependant)
Allows to add a component which is rerendered every time the button is rerendered.
|
protected AbstractTaskContainer |
getTaskContainer() |
org.apache.wicket.model.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(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.markup.html.form.Form<?> form) |
protected void |
onTaskCancel(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Override to trigger a custom action whenever a task was canceled and halted.
|
protected void |
onTaskError(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Override to trigger a custom action whenever an error is occurred.
|
protected void |
onTaskStart(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Override to trigger a custom action whenever a task is started.
|
protected void |
onTaskSuccess(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Override to trigger a custom action whenever a task succeeded.
|
protected void |
refresh(org.apache.wicket.ajax.AjaxRequestTarget target)
Overriding allows a custom refresh behavior.
|
void |
registerCssClassModel(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.Component refreshDependant)
Allows to remove a component which was rerendered every time the button was rerendered.
|
void |
setTaskContainerModel(org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel) |
getForm, isButtonEnabled, onAfterSubmit, onAfterSubmit, onComponentTag, onError, onError, onSubmit, updateAjaxAttributes
getDefaultFormProcessing, getOnClickScript, initModel, setDefaultFormProcessing, updateModel
add, add, checkRequired, clearInput, convertInput, convertValue, error, getConvertedInput, getDefaultLabel, getDefaultLabel, getInput, getInputAsArray, getInputName, getModel, getModelObject, getModelValue, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputChanged, internalOnModelChanged, invalid, isInputNullable, isMultiPart, isRequired, isValid, newValidatable, newValidationError, onDetach, onDisabled, onInvalid, onRequired, onValid, processChildren, processInput, remove, reportRequiredError, setConvertedInput, setLabel, setModel, setModelObject, setModelValue, setRequired, setType, shouldTrimInput, trim, updateAutoLabels, updateCollectionModel, valid, validate, validateRequired, validateValidators, visitComponentsPostOrder, visitFormComponentsPostOrder
getWebPage, getWebRequest, getWebResponse, getWebSession
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
public ProgressButton(String id, org.apache.wicket.markup.html.form.Form<?> form, org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel, org.apache.wicket.util.time.Duration duration)
public ProgressButton(String id, org.apache.wicket.model.IModel<String> model, org.apache.wicket.markup.html.form.Form<?> form, org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel, org.apache.wicket.util.time.Duration duration)
public ProgressButton(String id, org.apache.wicket.markup.html.form.Form<?> form, org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel, IRunnableFactory runnableFactory, org.apache.wicket.util.time.Duration duration)
public ProgressButton(String id, org.apache.wicket.model.IModel<String> model, org.apache.wicket.markup.html.form.Form<?> form, org.apache.wicket.model.IModel<? extends AbstractTaskContainer> taskContainerModel, IRunnableFactory runnableFactory, org.apache.wicket.util.time.Duration duration)
public org.apache.wicket.model.IModel<? extends AbstractTaskContainer> getTaskContainerModel()
public void setTaskContainerModel(org.apache.wicket.model.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(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form)
onSubmit
in class org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton
protected void refresh(org.apache.wicket.ajax.AjaxRequestTarget target)
target
- The Ajax request target.public boolean isEnabled()
isEnabled
in class org.apache.wicket.Component
public void registerMessageModel(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.model.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(org.apache.wicket.Component refreshDependant)
refreshDependant
- The dependant component.public void removeRefreshDependant(org.apache.wicket.Component refreshDependant)
refreshDependant
- The dependant component.protected void onTaskStart(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- The Ajax request target. Might be null
.protected void onTaskSuccess(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- The Ajax request target.protected void onTaskCancel(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- The Ajax request target. Might be null
.protected void onTaskError(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget
- The Ajax request target.Copyright © 2015. All rights reserved.