|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.markup.html.panel.GenericPanel<T>
org.ujorm.wicket.component.form.fields.Field<T>
org.ujorm.wicket.component.form.fields.ComboField<T>
public class ComboField<T extends Ujo>
CheckBox field with a Label including a feedback message.
| Field Summary |
|---|
| Fields inherited from class org.ujorm.wicket.component.form.fields.Field |
|---|
behaviors, CSS_REQUIRED, cssClass, DEFAULT_DELAY, feedback, key, PROPERTY_PREFIX, validators |
| 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 | |
|---|---|
ComboField(Key<U,T> key,
List<T> items,
Key<T,?> selectId,
Key<T,?> display)
|
|
ComboField(String componentId,
Key<U,T> key,
List<T> items,
Key<T,?> selectId,
Key<T,?> display,
String cssClass)
|
|
| Method Summary | ||
|---|---|---|
protected org.apache.wicket.ajax.AjaxEventBehavior |
createChangeBehaviour(String action,
String jsEvent)
Create new AjaxFormComponentUpdatingBehavior with delay 300 ms. |
|
protected org.apache.wicket.markup.html.form.FormComponent |
createInput(String componentId,
org.apache.wicket.model.IModel<T> model)
Create Form inputComponent |
|
protected Object |
getComboDisplayValue(T object)
Get the value for displaying to an end user. |
|
protected String |
getComboIdValue(T object,
int index)
This method is called to get the id value of an object (used as the value attribute of a choice element) The id can be extracted from the object like a primary key, or if the list is stable you could just return a toString of the index. |
|
List<T> |
getItems()
Get component items |
|
Key<T,?> |
getKeyDisplay()
Get a key to display |
|
Key<T,?> |
getKeyId()
Get the indentifier key |
|
static
|
of(Key<?,T> key,
org.ujorm.criterion.Criterion<T> items,
Key<T,?> display)
Create new ComboField using database request |
|
static
|
of(Key<?,T> key,
Query<T> query,
Key<T,?> display)
Create new ComboField using database request |
|
void |
onChange(String action)
Create an Updating Behavior with "keyup" event |
|
| Methods inherited from class org.ujorm.wicket.component.form.fields.Field |
|---|
addBehaviour, addBehaviourOnBlur, addMaxLength, addValidator, addValidator, createLabel, createLabelModel, getCssClass, getInput, getKey, getModelValue, getResourceLabelKey, getValidators, getVisibleModel, isRequired, onConfigure, onInitialize, onSuperInitialize, requestFocus, setFeedbackMessage, setModelValue, setVisibleModel, toString |
| Methods inherited from class org.apache.wicket.markup.html.panel.GenericPanel |
|---|
getModel, getModelObject, setModel, setModelObject |
| Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
newMarkupSourcingStrategy |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getWebPage, getWebRequest, getWebResponse, getWebSession |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, visitChildren, visitChildren, visitChildren, visitChildren |
| Methods inherited from class org.apache.wicket.Component |
|---|
add, addStateChange, afterRender, beforeRender, 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, 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, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onDetach, onEvent, 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, visitParents, visitParents, warn, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ComboField(Key<U,T> key,
List<T> items,
Key<T,?> selectId,
Key<T,?> display)
public ComboField(String componentId,
Key<U,T> key,
List<T> items,
Key<T,?> selectId,
Key<T,?> display,
String cssClass)
| Method Detail |
|---|
protected org.apache.wicket.markup.html.form.FormComponent createInput(String componentId,
org.apache.wicket.model.IModel<T> model)
createInput in class Field<T extends Ujo>protected Object getComboDisplayValue(T object)
object - the actual object
protected String getComboIdValue(T object,
int index)
Note that the given index can be -1 if the object in question is not contained in the
available choices.
object - The object for which the id should be generatedindex - The index of the object in the choices list.
public List<T> getItems()
public final Key<T,?> getKeyId()
public final Key<T,?> getKeyDisplay()
public void onChange(String action)
onChange in class Field<T extends Ujo>field - Field is not used by default, however it can be a switch for different results for example.
protected org.apache.wicket.ajax.AjaxEventBehavior createChangeBehaviour(String action,
String jsEvent)
createChangeBehaviour in class Field<T extends Ujo>
public static <T extends OrmUjo> ComboField<T> of(Key<?,T> key,
org.ujorm.criterion.Criterion<T> items,
Key<T,?> display)
public static <T extends OrmUjo> ComboField<T> of(Key<?,T> key,
Query<T> query,
Key<T,?> display)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||