org.efaps.ui.wicket.components
Class FormContainer

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.form.Form<Object>
                  extended by org.efaps.ui.wicket.components.FormContainer
All Implemented Interfaces:
Serializable, org.apache.wicket.IClusterable, org.apache.wicket.IConverterLocator, org.apache.wicket.IRequestListener, org.apache.wicket.markup.html.form.IFormSubmitListener, org.apache.wicket.markup.html.IHeaderContributor

public class FormContainer
extends org.apache.wicket.markup.html.form.Form<Object>

Class for a form. Needed for file upload.

Version:
$Id: FormContainer.java 5813 2010-11-06 19:44:06Z jan.moxter $
Author:
The eFaps Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.markup.html.form.Form
org.apache.wicket.markup.html.form.Form.ValidationVisitor
 
Nested classes/interfaces inherited from class org.apache.wicket.Component
org.apache.wicket.Component.ComponentModelChange, org.apache.wicket.Component.EnabledChange, org.apache.wicket.Component.IVisitor<T extends org.apache.wicket.Component>, org.apache.wicket.Component.VisibilityChange
 
Field Summary
 
Fields inherited from class org.apache.wicket.markup.html.form.Form
METHOD_GET, METHOD_POST
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER
 
Fields inherited from interface org.apache.wicket.markup.html.form.IFormSubmitListener
INTERFACE
 
Constructor Summary
FormContainer(String _wicketId)
          Constructor setting the wicket id of this component.
 
Method Summary
protected  void appendDefaultButtonField(org.apache.wicket.markup.MarkupStream _markupStream, org.apache.wicket.markup.ComponentTag _openTag)
          If a default IFormSubmittingComponent was set on this form, this method will be called to render an extra field with an invisible style so that pressing enter in one of the textfields will do a form submit using this component.
 String getActionUrl()
          This is the getter method for the instance variable actionUrl.
protected  boolean handleMultiPart()
          Overwritten due to the reason that the mulitpart is handelt using the Context.
 boolean isFileUpload()
          This is the getter method for the instance variable fileUpload.
protected  void onComponentTag(org.apache.wicket.markup.ComponentTag _tag)
          On component tag.
protected  void onSubmit()
          On submit it is checked if it is a file upload from and in case that it is the listeners executed.
 void setFileUpload(boolean _fileUpload)
          This is the setter method for the instance variable fileUpload.
 
Methods inherited from class org.apache.wicket.markup.html.form.Form
add, beforeUpdateFormComponentModels, clearInput, delegateSubmit, encodeUrlInHiddenFields, error, findForm, findSubmittingButton, getDefaultButton, getFormValidators, getHiddenFieldId, getInputNamePrefix, getJavascriptId, getJsForInterfaceUrl, getMaxSize, getMethod, getModel, getModelObject, getRootForm, getRootFormRelativeId, getStatelessHint, getValidatorKeyPrefix, getValuePersister, hasError, internalOnModelChanged, isRootForm, isSubmitted, isVersioned, loadPersistentFormComponentValues, markFormComponentsInvalid, markFormComponentsValid, onBeforeRender, onComponentTagBody, onDetach, onError, onFileUploadException, onFormSubmitted, onValidate, process, process, registerJavascriptNamespaces, remove, removePersistentFormComponentValues, renderHead, renderPlaceholderTag, setDefaultButton, setMaxSize, setModel, setModelObject, setMultiPart, setVersioned, updateFormComponentModels, validate, validateComponents, validateFormValidator, validateFormValidators, visitFormComponents, visitFormComponentsPostOrder, writeParamsAsHiddenFields
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getMarkupType, getWebPage, getWebRequest
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeginRequest, onConfigure, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVisibilityAllowed, setVisible, urlFor, 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

FormContainer

public FormContainer(String _wicketId)
Constructor setting the wicket id of this component.

Parameters:
_wicketId - wicket id of this component
Method Detail

onComponentTag

protected void onComponentTag(org.apache.wicket.markup.ComponentTag _tag)
On component tag.

Overrides:
onComponentTag in class org.apache.wicket.markup.html.form.Form<Object>
Parameters:
_tag - the tag
See Also:
#onComponentTag(org.apache.wicket.markup.ComponentTag)

getActionUrl

public String getActionUrl()
This is the getter method for the instance variable actionUrl.

Returns:
value of instance variable actionUrl

onSubmit

protected void onSubmit()
On submit it is checked if it is a file upload from and in case that it is the listeners executed.

Overrides:
onSubmit in class org.apache.wicket.markup.html.form.Form<Object>
See Also:
Form.onSubmit()

isFileUpload

public boolean isFileUpload()
This is the getter method for the instance variable fileUpload.

Returns:
value of instance variable fileUpload

setFileUpload

public void setFileUpload(boolean _fileUpload)
This is the setter method for the instance variable fileUpload.

Parameters:
_fileUpload - the fileUpload to set

handleMultiPart

protected boolean handleMultiPart()
Overwritten due to the reason that the mulitpart is handelt using the Context.

Overrides:
handleMultiPart in class org.apache.wicket.markup.html.form.Form<Object>
Returns:
true
See Also:
Form.handleMultiPart()

appendDefaultButtonField

protected void appendDefaultButtonField(org.apache.wicket.markup.MarkupStream _markupStream,
                                        org.apache.wicket.markup.ComponentTag _openTag)
If a default IFormSubmittingComponent was set on this form, this method will be called to render an extra field with an invisible style so that pressing enter in one of the textfields will do a form submit using this component. The method is overwritten to correct some script problems with the default behavior from Firefox, that actually sends and reloads the form.

Overrides:
appendDefaultButtonField in class org.apache.wicket.markup.html.form.Form<Object>
Parameters:
_markupStream - The markup stream
_openTag - The open tag for the body


Copyright © 2003-2011 The eFaps Team. All Rights Reserved.