org.apache.wicket.extensions.ajax.markup.html
Class AjaxEditableChoiceLabel<T>

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.panel.Panel
                  extended by org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel<T>
                      extended by org.apache.wicket.extensions.ajax.markup.html.AjaxEditableChoiceLabel<T>
Type Parameters:
T -
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<Component>, IEventSink, IEventSource, IClusterable, IConverterLocator, IHeaderContributor, IRequestableComponent, IHierarchical<Component>

public class AjaxEditableChoiceLabel<T>
extends AjaxEditableLabel<T>

An inplace editor much like AjaxEditableLabel, but instead of a TextField a DropDownChoice is displayed.

Author:
Eelco Hillenius
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel
AjaxEditableLabel.EditorAjaxBehavior, AjaxEditableLabel.LabelAjaxBehavior
 
Field Summary
 
Fields inherited from class org.apache.wicket.markup.html.panel.Panel
PANEL
 
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
AjaxEditableChoiceLabel(java.lang.String id)
          Construct.
AjaxEditableChoiceLabel(java.lang.String id, IModel<T> model)
          Construct.
AjaxEditableChoiceLabel(java.lang.String id, IModel<T> model, IModel<? extends java.util.List<? extends T>> choices)
          Construct.
AjaxEditableChoiceLabel(java.lang.String id, IModel<T> model, IModel<? extends java.util.List<? extends T>> choices, IChoiceRenderer<T> renderer)
          Construct.
AjaxEditableChoiceLabel(java.lang.String id, IModel<T> model, java.util.List<? extends T> choices)
          Construct.
AjaxEditableChoiceLabel(java.lang.String id, IModel<T> model, java.util.List<? extends T> choices, IChoiceRenderer<T> renderer)
          Construct.
AjaxEditableChoiceLabel(java.lang.String id, java.util.List<? extends T> choices)
          Construct.
 
Method Summary
protected  FormComponent<T> newEditor(MarkupContainer parent, java.lang.String componentId, IModel<T> model)
          Create a new form component instance to serve as editor.
protected  WebComponent newLabel(MarkupContainer parent, java.lang.String componentId, IModel<T> model)
          Create a new form component instance to serve as label.
protected  void onDetach()
          Called to allow a component to detach resources after use.
protected  void onModelChanged()
          Dummy override to fix WICKET-1239
protected  void onModelChanging()
          Dummy override to fix WICKET-1239
 
Methods inherited from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel
add, defaultNullLabel, getConverter, getEditor, getLabel, getLabelAjaxEvent, onBeforeRender, onCancel, onEdit, onError, onSubmit, setDefaultModel, setLabel, setRequired, setType
 
Methods inherited from class org.apache.wicket.markup.html.panel.Panel
newMarkupSourcingStrategy
 
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, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, 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, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markRendering, modelChanged, modelChanging, onAfterRender, onComponentTag, onConfigure, onEvent, onInitialize, 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, visitParents, warn, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AjaxEditableChoiceLabel

public AjaxEditableChoiceLabel(java.lang.String id)
Construct.

Parameters:
id - The component id

AjaxEditableChoiceLabel

public AjaxEditableChoiceLabel(java.lang.String id,
                               IModel<T> model)
Construct.

Parameters:
id - The component id
model - The model

AjaxEditableChoiceLabel

public AjaxEditableChoiceLabel(java.lang.String id,
                               java.util.List<? extends T> choices)
Construct.

Parameters:
id - The component id
choices - The collection of choices in the dropdown

AjaxEditableChoiceLabel

public AjaxEditableChoiceLabel(java.lang.String id,
                               IModel<T> model,
                               IModel<? extends java.util.List<? extends T>> choices)
Construct.

Parameters:
id - The component id
model - The model
choices - The collection of choices in the dropdown

AjaxEditableChoiceLabel

public AjaxEditableChoiceLabel(java.lang.String id,
                               IModel<T> model,
                               IModel<? extends java.util.List<? extends T>> choices,
                               IChoiceRenderer<T> renderer)
Construct.

Parameters:
id - The component id
model - The model
choices - The collection of choices in the dropdown
renderer - The rendering engine

AjaxEditableChoiceLabel

public AjaxEditableChoiceLabel(java.lang.String id,
                               IModel<T> model,
                               java.util.List<? extends T> choices)
Construct.

Parameters:
id - The component id
model - The model
choices - The collection of choices in the dropdown

AjaxEditableChoiceLabel

public AjaxEditableChoiceLabel(java.lang.String id,
                               IModel<T> model,
                               java.util.List<? extends T> choices,
                               IChoiceRenderer<T> renderer)
Construct.

Parameters:
id - The component id
model - The model
choices - The collection of choices in the dropdown
renderer - The rendering engine
Method Detail

newEditor

protected FormComponent<T> newEditor(MarkupContainer parent,
                                     java.lang.String componentId,
                                     IModel<T> model)
Create a new form component instance to serve as editor.

Overrides:
newEditor in class AjaxEditableLabel<T>
Parameters:
parent - The parent component
componentId - Id that should be used by the component
model - The model
Returns:
The editor

newLabel

protected WebComponent newLabel(MarkupContainer parent,
                                java.lang.String componentId,
                                IModel<T> model)
Create a new form component instance to serve as label.

Overrides:
newLabel in class AjaxEditableLabel<T>
Parameters:
parent - The parent component
componentId - Id that should be used by the component
model - The model
Returns:
The editor

onModelChanged

protected void onModelChanged()
Dummy override to fix WICKET-1239

Overrides:
onModelChanged in class AjaxEditableLabel<T>

onModelChanging

protected void onModelChanging()
Dummy override to fix WICKET-1239

Overrides:
onModelChanging in class AjaxEditableLabel<T>

onDetach

protected void onDetach()
Called to allow a component to detach resources after use. Overrides of this method MUST call the super implementation, the most logical place to do this is the last line of the override method.

Overrides:
onDetach in class Component


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.