org.wicketstuff.datatable_autocomplete.button
Class DTAAjaxFallbackButton

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.markup.html.WebMarkupContainer
              extended by org.apache.wicket.markup.html.form.LabeledWebMarkupContainer
                  extended by org.apache.wicket.markup.html.form.FormComponent<String>
                      extended by org.apache.wicket.markup.html.form.Button
                          extended by org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton
                              extended by org.wicketstuff.datatable_autocomplete.button.DTAAjaxFallbackButton
All Implemented Interfaces:
Serializable, Iterable<Component>, IAjaxIndicatorAware, IEventSink, IEventSource, IClusterable, IConverterLocator, IAfterFormSubmitter, IFormModelUpdateListener, IFormSubmitter, IFormSubmittingComponent, IFormVisitorParticipant, ILabelProvider<String>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, DTAButtonProvider

public class DTAAjaxFallbackButton
extends AjaxFallbackButton
implements DTAButtonProvider, IAjaxIndicatorAware

Author:
mocleiri A special form submitting button. It will only render if the action is defined. It also allows for appending an onclick string. useful for poping an alert is state is missing on the client side. Will by default handle the refresh on the invoking form.
See Also:
Serialized Form

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
 
Fields inherited from interface org.wicketstuff.datatable_autocomplete.button.DTAButtonProvider
BUTTON_ID
 
Constructor Summary
DTAAjaxFallbackButton(String id, IModel<String> labelModel, Form<?> form)
           
DTAAjaxFallbackButton(String id, String label, Form<?> form)
           
DTAAjaxFallbackButton(String id, String label, Form<?> form, IFormOnSubmitAction submitAction)
           
DTAAjaxFallbackButton(String id, String label, Form<?> form, IModel<String> preAjaxScriptModel)
           
 
Method Summary
protected  IAjaxCallDecorator getAjaxCallDecorator()
           
 String getAjaxIndicatorMarkupId()
           
 DTAAjaxFallbackButton getButton()
          return a button with its id set as BUTTON_ID
 Form<?> getForm()
           
protected  void onBeforeRender()
           
protected  void onDetach()
           
protected  void onError(AjaxRequestTarget target, Form<?> form)
           
protected  void onSubmit(AjaxRequestTarget target, Form<?> form)
           
 void setActionDeterminesVisibility(boolean actionDeterminesVisibility)
           
 void setForm(Form<?> form)
           
 void setSubmitAction(IFormOnSubmitAction submitAction)
           
 
Methods inherited from class org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton
getChannel, isButtonEnabled, onAfterSubmit, onAfterSubmit, onComponentTag, onSubmit
 
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.FormComponent
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, onDisabled, onInvalid, onValid, processChildren, processInput, remove, reportRequiredError, setConvertedInput, setLabel, setModel, setModelObject, setModelValue, setRequired, setType, shouldTrimInput, trim, updateCollectionModel, valid, validate, validateRequired, validateValidators, visitComponentsPostOrder, visitFormComponentsPostOrder
 
Methods inherited from class org.apache.wicket.markup.html.form.LabeledWebMarkupContainer
getLabel, setLabelInternal
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebPage, getWebRequest
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onMarkupAttached, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterface, 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, getFeedbackMessage, 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, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onConfigure, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, 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, urlFor, urlFor, visitParents, warn, wrap
 
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

DTAAjaxFallbackButton

public DTAAjaxFallbackButton(String id,
                             String label,
                             Form<?> form,
                             IFormOnSubmitAction submitAction)
Parameters:
id -

DTAAjaxFallbackButton

public DTAAjaxFallbackButton(String id,
                             String label,
                             Form<?> form,
                             IModel<String> preAjaxScriptModel)

DTAAjaxFallbackButton

public DTAAjaxFallbackButton(String id,
                             IModel<String> labelModel,
                             Form<?> form)

DTAAjaxFallbackButton

public DTAAjaxFallbackButton(String id,
                             String label,
                             Form<?> form)
Method Detail

setActionDeterminesVisibility

public void setActionDeterminesVisibility(boolean actionDeterminesVisibility)
Parameters:
actionDeterminesVisibility - the actionDeterminesVisibility to set Normally the existance of an action is used to control the visiblilty of the button. setting this to true will have the default behaviour. Setting to false will allow visibilty to be controlled externally.

getForm

public Form<?> getForm()
Specified by:
getForm in interface IFormSubmitter
Overrides:
getForm in class AjaxFallbackButton

setForm

public void setForm(Form<?> form)
Parameters:
form - the form to set

onSubmit

protected final void onSubmit(AjaxRequestTarget target,
                              Form<?> form)
Overrides:
onSubmit in class AjaxFallbackButton

onError

protected void onError(AjaxRequestTarget target,
                       Form<?> form)
Overrides:
onError in class AjaxFallbackButton

getAjaxCallDecorator

protected IAjaxCallDecorator getAjaxCallDecorator()
Overrides:
getAjaxCallDecorator in class AjaxFallbackButton

onBeforeRender

protected void onBeforeRender()
Overrides:
onBeforeRender in class Component

setSubmitAction

public void setSubmitAction(IFormOnSubmitAction submitAction)
Parameters:
submitAction - the submitAction to set

getButton

public DTAAjaxFallbackButton getButton()
Description copied from interface: DTAButtonProvider
return a button with its id set as BUTTON_ID

Specified by:
getButton in interface DTAButtonProvider
Returns:
the instantiated button.

getAjaxIndicatorMarkupId

public String getAjaxIndicatorMarkupId()
Specified by:
getAjaxIndicatorMarkupId in interface IAjaxIndicatorAware

onDetach

protected void onDetach()
Overrides:
onDetach in class FormComponent<String>


Copyright © 2009-2013. All Rights Reserved.