Class StatelessForm<T>

Type Parameters:
T - The type of the Form's model object
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IGenericComponent<T,Form<T>>, IMetadataContext<Serializable,Component>, IRequestListener, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable
Direct Known Subclasses:

public class StatelessForm<T> extends Form<T>
This StatelessForm is the same as a normal form but with the statelesshint default to true. The form can be newly constructed when the onSubmit of its form or its buttons is called. So you can't depend on state within the page. The only state you can depend on is what was submitted from the browser. So the model of the form or the formcomponents are updated with the submit values. Note: Use RepeatingView in the case when FormComponents need to be rendered inside a repeater. See the javadoc of AbstractRepeater for more information.
See Also:
  • Constructor Details

  • Method Details

    • getStatelessHint

      protected boolean getStatelessHint()
      Description copied from class: Component
      Returns whether the component can be stateless. Also the component behaviors must be stateless, otherwise the component will be treat as stateful. In order for page to be stateless (and not to be stored in session), all components (and component behaviors) must be stateless.
      getStatelessHint in class Form<T>
      whether the component can be stateless
      See Also:
    • onMethodMismatch

      Description copied from class: Form
      Called when a form has been submitted using a method differing from return value of Form.getMethod(). For example, someone can copy and paste the action url and invoke the form using a GET instead of the desired POST. This method allows the user to react to this situation.
      onMethodMismatch in class Form<T>
      response that can either abort or continue the processing of the form
    • getActionUrl

      Description copied from class: Form
      Generates the action url for the form
      getActionUrl in class Form<T>
      action url
    • process

      public void process(IFormSubmitter submittingComponent)
      Remove the page parameters for all form component otherwise they get appended to action URL Process the form. Though you can override this method to provide your own algorithm, it is not recommended to do so.

      See the class documentation for further details on the form processing

      process in class Form<T>
      submittingComponent - component responsible for submitting the form, or null if none (eg the form has been submitted via the enter key or javascript calling form.submit())
      See Also: