public abstract class FilesSelectedBehavior extends OnChangeAjaxBehavior
OnChangeAjaxBehavior
that streams back to server properties
of the selected file(s) (at client side), before uploading it (them).EVENT_CHANGE, EVENT_NAME
INDICATOR
Constructor and Description |
---|
FilesSelectedBehavior() |
Modifier and Type | Method and Description |
---|---|
protected void |
onBind()
Subclasses should call super.onBind()
|
protected abstract void |
onSelected(AjaxRequestTarget target,
List<FileDescription> fileDescriptions)
Called when a file, at client side is selected.
|
static FilesSelectedBehavior |
onSelected(org.danekja.java.util.function.serializable.SerializableBiConsumer<AjaxRequestTarget,List<FileDescription>> select)
Creates an
FilesSelectedBehavior based on lambda expressions |
protected void |
onUpdate(AjaxRequestTarget target)
Listener invoked on the ajax request.
|
void |
renderHead(Component component,
IHeaderResponse response)
Render to the web response whatever the component wants to contribute to the head section.
|
protected void |
updateAjaxAttributes(AjaxRequestAttributes attributes)
Gives a chance to the specializations to modify the attributes.
|
onChange
checkComponent, disableFocusOnBlur, getFormComponent, getUpdateModel, onError, onEvent, onUpdate
getEvent, onEvent, respond
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onMethodMismatch, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
rendersPage
protected void onBind()
AbstractDefaultAjaxBehavior
onBind
in class AjaxFormComponentUpdatingBehavior
AbstractAjaxBehavior.onBind()
protected void onUpdate(AjaxRequestTarget target)
AjaxFormComponentUpdatingBehavior
Note: AjaxFormComponentUpdatingBehavior.onError(AjaxRequestTarget, RuntimeException)
is called instead when processing
of the FormComponent
failed with conversion or validation errors!
onUpdate
in class AjaxFormComponentUpdatingBehavior
target
- the current request handlerprotected abstract void onSelected(AjaxRequestTarget target, List<FileDescription> fileDescriptions)
target
- The AjaxRequestTarget
fileDescriptions
- A list of FileDescriptionprotected void updateAjaxAttributes(AjaxRequestAttributes attributes)
AbstractDefaultAjaxBehavior
updateAjaxAttributes
in class OnChangeAjaxBehavior
public void renderHead(Component component, IHeaderResponse response)
Behavior
renderHead
in interface IComponentAwareHeaderContributor
renderHead
in class AjaxEventBehavior
component
- component which is contributing to the response. This parameter is here to give
the component as the context for component-awares implementing this interfaceresponse
- Response objectBehavior.renderHead(Component,
org.apache.wicket.markup.head.IHeaderResponse)
public static FilesSelectedBehavior onSelected(org.danekja.java.util.function.serializable.SerializableBiConsumer<AjaxRequestTarget,List<FileDescription>> select)
FilesSelectedBehavior
based on lambda expressionsselect
- SerializableBiConsumer
FilesSelectedBehavior
behaviorCopyright © 2006–2022 Apache Software Foundation. All rights reserved.