T - type of choice objectpublic class Select2MultiChoice<T>
extends org.apache.wicket.markup.html.form.HiddenField<M>
<input type='hidden'/> element.FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, VALUE_SEPARATORENABLE, 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 |
|---|
Select2MultiChoice(String id) |
Select2MultiChoice(String id,
ChoiceProvider<T> provider) |
Select2MultiChoice(String id,
org.apache.wicket.model.IModel<Collection<T>> model) |
Select2MultiChoice(String id,
org.apache.wicket.model.IModel<Collection<T>> model,
ChoiceProvider<T> provider) |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<T> |
convertIdsToChoices(List<String> ids)
Convert IDS into choices.
|
void |
convertInput() |
protected Collection<T> |
convertValue(String[] value) |
protected M |
getCurrentValue() |
protected String |
getEscapedJsString(String key)
Escapes single quotes in localized strings to be used as JavaScript strings enclosed in
single quotes
|
String[] |
getInputAsArray() |
protected String |
getJquerySafeMarkupId()
Gets the markup id that is safe to use in jQuery by escaping dots in the default
Component.getMarkup() |
protected String |
getModelValue() |
ChoiceProvider<T> |
getProvider() |
Settings |
getSettings() |
protected boolean |
getStatelessHint() |
boolean |
isAjax() |
protected void |
onConfigure() |
protected void |
onDetach() |
void |
onEvent(org.apache.wicket.event.IEvent<?> event) |
protected void |
onInitialize() |
void |
onResourceRequested() |
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
protected void |
renderInitializationScript(org.apache.wicket.markup.head.IHeaderResponse response,
Collection<T> choices)
Renders script used to initialize the value of Select2 after it is created so it matches the
current model object.
|
void |
setProvider(ChoiceProvider<T> provider)
Sets the choice provider
|
void |
updateModel() |
getConvertEmptyInputStringToNull, isInputNullable, onBeforeRender, setConvertEmptyInputStringToNulladd, add, checkRequired, clearInput, error, getConvertedInput, getDefaultLabel, getDefaultLabel, getForm, getInput, getInputName, getModel, getModelObject, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputChanged, internalOnModelChanged, invalid, isMultiPart, isRequired, isValid, newValidatable, newValidationError, onDisabled, onInvalid, onRequired, onValid, processChildren, processInput, remove, reportRequiredError, setConvertedInput, setLabel, setModel, setModelObject, setModelValue, setRequired, setType, shouldTrimInput, trim, updateAutoLabels, updateCollectionModel, valid, validate, validateRequired, validateValidators, visitComponentsPostOrder, visitFormComponentsPostOrdergetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, 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, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, 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, wrappublic Select2MultiChoice(String id)
public Select2MultiChoice(String id, org.apache.wicket.model.IModel<Collection<T>> model)
public Select2MultiChoice(String id, org.apache.wicket.model.IModel<Collection<T>> model, ChoiceProvider<T> provider)
public Select2MultiChoice(String id, ChoiceProvider<T> provider)
public final String[] getInputAsArray()
getInputAsArray in class org.apache.wicket.markup.html.form.FormComponent<Collection<T>>public void updateModel()
updateModel in interface org.apache.wicket.markup.html.form.IFormModelUpdateListenerupdateModel in class org.apache.wicket.markup.html.form.FormComponent<Collection<T>>protected final Collection<T> convertValue(String[] value) throws org.apache.wicket.util.convert.ConversionException
convertValue in class org.apache.wicket.markup.html.form.FormComponent<Collection<T>>org.apache.wicket.util.convert.ConversionExceptionprotected void onInitialize()
protected String getModelValue()
getModelValue in class org.apache.wicket.markup.html.form.FormComponent<Collection<T>>protected void renderInitializationScript(org.apache.wicket.markup.head.IHeaderResponse response,
Collection<T> choices)
response - header responsechoices - value to displaypublic final Settings getSettings()
public final void setProvider(ChoiceProvider<T> provider)
provider - provider to setpublic final ChoiceProvider<T> getProvider()
public final void convertInput()
convertInput in class org.apache.wicket.markup.html.form.AbstractTextComponent<M>protected final Collection<T> convertIdsToChoices(List<String> ids)
ids - list of identitiesprotected String getJquerySafeMarkupId()
Component.getMarkup()protected String getEscapedJsString(String key)
key - resource key for localized messagepublic void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IHeaderContributorrenderHead in class org.apache.wicket.Componentprotected final M getCurrentValue()
protected void onConfigure()
onConfigure in class org.apache.wicket.Componentpublic void onEvent(org.apache.wicket.event.IEvent<?> event)
onEvent in interface org.apache.wicket.event.IEventSinkonEvent in class org.apache.wicket.Componentprotected boolean getStatelessHint()
getStatelessHint in class org.apache.wicket.Componentpublic boolean isAjax()
public void onResourceRequested()
onResourceRequested in interface org.apache.wicket.IResourceListenerprotected void onDetach()
onDetach in class org.apache.wicket.markup.html.form.FormComponent<M>Copyright © 2015. All rights reserved.