wicket.markup.html.form
Class HiddenField

java.lang.Object
  extended by wicket.Component
      extended by wicket.MarkupContainer
          extended by wicket.markup.html.WebMarkupContainer
              extended by wicket.markup.html.form.FormComponent
                  extended by wicket.markup.html.form.AbstractTextComponent
                      extended by wicket.markup.html.form.TextField
                          extended by wicket.markup.html.form.HiddenField
All Implemented Interfaces:
java.io.Serializable

public class HiddenField
extends TextField

TextField doesn't permit the html so this is a simple subclass to allow this A HiddenField is useful when you have a javascript based component that updates the form state. Either 1) add a AttributeModified to set the id attribute, then use document.getElementById(id), or 2) lookup the field name=getPath() within the form

Author:
Cameron Braid
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class wicket.markup.html.form.FormComponent
FormComponent.IVisitor
 
Nested classes/interfaces inherited from class wicket.Component
Component.ComponentModelChange, Component.EnabledChange, Component.VisibilityChange
 
Field Summary
 
Fields inherited from class wicket.markup.html.form.FormComponent
FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, VALUE_SEPARATOR
 
Fields inherited from class wicket.Component
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER
 
Constructor Summary
HiddenField(java.lang.String id)
          Construct.
HiddenField(java.lang.String id, java.lang.Class type)
          Construct.
HiddenField(java.lang.String id, IModel model)
          Construct.
HiddenField(java.lang.String id, IModel model, java.lang.Class type)
           
 
Method Summary
protected  java.lang.String getInputType()
          Subclass should override this method if this textfields mappes on a different input type as text.
 
Methods inherited from class wicket.markup.html.form.TextField
onComponentTag
 
Methods inherited from class wicket.markup.html.form.AbstractTextComponent
convertValue, getConvertEmptyInputStringToNull, isInputNullable, setConvertEmptyInputStringToNull, supportsPersistence
 
Methods inherited from class wicket.markup.html.form.FormComponent
add, checkRequired, clearInput, convert, error, getConvertedInput, getForm, getInput, getInputAsArray, getInputName, getLabel, getModelValue, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputAsStringArray, inputChanged, internalOnModelChanged, invalid, isMultiPart, isPersistent, isRequired, isValid, isValidated, onDetach, onDisabled, onInvalid, onValid, processInput, setLabel, setModelValue, setModelValue, setPersistent, setRequired, setType, updateModel, valid, validate, validateRequired, validateValidators
 
Methods inherited from class wicket.markup.html.WebMarkupContainer
getMarkupType, getWebPage
 
Methods inherited from class wicket.MarkupContainer
add, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, internalAdd, internalAttach, internalDetach, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren
 
Methods inherited from class wicket.Component
add, addStateChange, checkComponentTag, checkComponentTagAttribute, continueToOriginalDestination, debug, detachBehaviors, detachModel, detachModels, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getApplicationPages, getApplicationSettings, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMetaData, getModel, getModelComparator, getModelObject, getModelObjectAsString, getOutputMarkupId, getPage, getPageFactory, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnAttach, internalOnDetach, isActionAuthorized, isAncestorOf, isBehaviorAccepted, isEnableAllowed, isEnabled, isHeadRendered, isIgnoreAttributeModifier, isRenderAllowed, isVersioned, isVisible, isVisibleInHierarchy, modelChanged, modelChanging, newPage, newPage, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onEndRequest, onModelChanged, onModelChanging, onRender, redirectToInterceptPage, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderedBehaviors, renderHead, replaceComponentTagBody, replaceWith, resetHeadRendered, sameRootModel, sameRootModel, setAuto, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMetaData, setModelObject, setOutputMarkupId, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HiddenField

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

Parameters:
id - component id

HiddenField

public HiddenField(java.lang.String id,
                   java.lang.Class type)
Construct.

Parameters:
id - component id
type - the type to use when updating the model for this text field

HiddenField

public HiddenField(java.lang.String id,
                   IModel model,
                   java.lang.Class type)
Parameters:
id - component id
model - the model
type - the type to use when updating the model for this text field
See Also:
Component.Component(String, IModel)

HiddenField

public HiddenField(java.lang.String id,
                   IModel model)
Construct.

Parameters:
id - see Component
model - the model
Method Detail

getInputType

protected java.lang.String getInputType()
Description copied from class: TextField
Subclass should override this method if this textfields mappes on a different input type as text. Like PasswordField or HiddenField.

Overrides:
getInputType in class TextField
Returns:
The input type of this textfield, default is 'text'


Copyright © 2004-2007 Wicket developers. All Rights Reserved.