Class HiddenField<T>

Type Parameters:
T - the model object's type
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IGenericComponent<T,FormComponent<T>>, IMetadataContext<Serializable,Component>, IFormModelUpdateListener, IFormVisitorParticipant, ILabelProvider<String>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable
Direct Known Subclasses:
Recorder

public class HiddenField<T> extends TextField<T>
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
  • add a AttributeModified to set the id attribute, then use document.getElementById(id)
  • lookup the field name=getPath() within the form
Author:
Cameron Braid
See Also:
  • Constructor Details

    • HiddenField

      public HiddenField(String id)
      Construct.
      Parameters:
      id - component id
    • HiddenField

      public HiddenField(String id, Class<T> type)
      Construct.
      Parameters:
      id - component id
      type - the type to use when updating the model for this text field
    • HiddenField

      public HiddenField(String id, IModel<T> model)
      Construct.
      Parameters:
      id - see Component
      model - the model
    • HiddenField

      public HiddenField(String id, IModel<T> model, Class<T> type)
      Parameters:
      id - component id
      model - the model
      type - the type to use when updating the model for this text field
      See Also:
  • Method Details