Class CrudifierForm<T>
java.lang.Object
org.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.form.Form<T>
com.premiumminds.wicket.crudifier.form.CrudifierForm<T>
- All Implemented Interfaces:
ICrudifierForm<T>,Serializable,Iterable<org.apache.wicket.Component>,org.apache.wicket.event.IEventSink,org.apache.wicket.event.IEventSource,org.apache.wicket.feedback.IFeedbackContributor,org.apache.wicket.IConverterLocator,org.apache.wicket.IGenericComponent<T,org.apache.wicket.markup.html.form.Form<T>>,org.apache.wicket.IRequestListener,org.apache.wicket.markup.html.IHeaderContributor,org.apache.wicket.request.component.IRequestableComponent,org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>,org.apache.wicket.util.io.IClusterable
public class CrudifierForm<T> extends org.apache.wicket.markup.html.form.Form<T> implements ICrudifierForm<T>
- Author:
- acamilo
- See Also:
- Serialized Form
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CrudifierForm(String id, org.apache.wicket.model.IModel<T> model)CrudifierForm(String id, org.apache.wicket.model.IModel<T> model, CrudifierEntitySettings entitySettings, CrudifierFormSettings formSettings, Map<Class<?>,IObjectRenderer<?>> renderers) -
Method Summary
Modifier and Type Method Description List<org.apache.wicket.Component>getButtons()Get the list of custom buttons for the form.Map<Class<?>,ControlGroupProvider<? extends AbstractControlGroup<?>>>getControlGroupProviders()get the providers used in this form.Map<Class<?>,Class<? extends AbstractControlGroup>>getControlGroupsTypesMap()protected EntityProvider<?>getEntityProvider(String name)CrudifierEntitySettingsgetEntitySettings()org.apache.wicket.markup.html.form.FormComponent<?>getFormComponent(String propertyName)CrudifierFormSettingsgetFormSettings()Map<Class<?>,IObjectRenderer<?>>getRenderers()protected org.apache.wicket.markup.html.panel.IMarkupSourcingStrategynewMarkupSourcingStrategy()protected voidonError(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form)protected voidonInitialize()protected voidonSubmit(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form)Methods inherited from class org.apache.wicket.markup.html.form.Form
add, appendDefaultButtonField, beforeUpdateFormComponentModels, callOnError, clearInput, delegateSubmit, encodeUrlInHiddenFields, error, findForm, findSubmittingButton, getActionUrl, getDefaultButton, getFileMaxSize, getFormValidators, getInputNamePrefix, getJsForInterfaceUrl, getJsForListenerUrl, getJsForSubmitter, getMaxSize, getMethod, getRootForm, getRootFormRelativeId, getStatelessHint, getValidatorKeyPrefix, handleMultiPart, hasError, internalOnModelChanged, isMultiPart, isRootForm, isSubmitted, markFormComponentsInvalid, markFormComponentsValid, onBeforeRender, onComponentTag, onComponentTagBody, onDetach, onError, onEvent, onFileUploadException, onFormSubmitted, onMethodMismatch, onRequest, onSubmit, onValidate, onValidateModelObjects, process, remove, renderPlaceholderTag, setDefaultButton, setFileMaxSize, setMaxSize, setMultiPart, setVersioned, updateFormComponentModels, validate, validateComponents, validateFormValidator, validateFormValidators, visitFormComponents, visitFormComponentsPostOrder, wantSubmitOnNestedFormSubmit, wantSubmitOnParentFormSubmit, writeHiddenFields, writeParamsAsHiddenFieldsMethods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSessionMethods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildrenMethods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, 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, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onConfigure, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
CrudifierForm
public CrudifierForm(String id, org.apache.wicket.model.IModel<T> model, CrudifierEntitySettings entitySettings, CrudifierFormSettings formSettings, Map<Class<?>,IObjectRenderer<?>> renderers) -
CrudifierForm
-
-
Method Details
-
onInitialize
protected void onInitialize()- Overrides:
onInitializein classorg.apache.wicket.MarkupContainer
-
newMarkupSourcingStrategy
protected org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy newMarkupSourcingStrategy()- Overrides:
newMarkupSourcingStrategyin classorg.apache.wicket.Component
-
getFormComponent
- Specified by:
getFormComponentin interfaceICrudifierForm<T>
-
onSubmit
protected void onSubmit(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) -
onError
protected void onError(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) -
getEntityProvider
-
getFormSettings
- Specified by:
getFormSettingsin interfaceICrudifierForm<T>
-
getEntitySettings
- Specified by:
getEntitySettingsin interfaceICrudifierForm<T>
-
getRenderers
- Specified by:
getRenderersin interfaceICrudifierForm<T>
-
getControlGroupsTypesMap
- Specified by:
getControlGroupsTypesMapin interfaceICrudifierForm<T>
-
getControlGroupProviders
public Map<Class<?>,ControlGroupProvider<? extends AbstractControlGroup<?>>> getControlGroupProviders()get the providers used in this form. To add new providers, simply make a put() to map returned by this method- Specified by:
getControlGroupProvidersin interfaceICrudifierForm<T>
-
getButtons
Description copied from interface:ICrudifierFormGet the list of custom buttons for the form. This buttons will appear next to submit button. All buttons must have their wicket:id="button" and must have a label inside them with wicket:id="label"Usage:
form.getButtons().add(new AjaxLink<Void>("button") { public void onClick(AjaxRequestTarget target) { // do something } }.add(new Label("label", "Cancel")));- Specified by:
getButtonsin interfaceICrudifierForm<T>- Returns:
- the custom buttons list
-