Package org.apache.wicket.markup.html.form.persistence

Examples of org.apache.wicket.markup.html.form.persistence.IValuePersister


        // Note: if that is true, values may remain persisted longer
        // than really necessary
        if (formComponent.isPersistent() && formComponent.isVisibleInHierarchy())
        {
          // The persister
          final IValuePersister persister = getValuePersister();

          // Retrieve persisted value
          persister.load(formComponent);
        }
      }
    });
  }
View Full Code Here


   */
  public void removePersistentFormComponentValues(final boolean disablePersistence)
  {
    // The persistence manager responsible to persist and retrieve
    // FormComponent data
    final IValuePersister persister = getValuePersister();

    // Search for FormComponents like TextField etc.
    visitFormComponentsPostOrder(new FormComponent.AbstractVisitor()
    {
      @Override
      public void onFormComponent(final FormComponent<?> formComponent)
      {
        if (formComponent.isVisibleInHierarchy())
        {
          // remove the FormComponent's persisted data
          persister.clear(formComponent);

          // Disable persistence if requested. Leave unchanged
          // otherwise.
          if (formComponent.isPersistent() && disablePersistence)
          {
View Full Code Here

    // We could conceivably be HTML over some other protocol!
    if (getRequestCycle() instanceof WebRequestCycle)
    {
      // The persistence manager responsible to persist and retrieve
      // FormComponent data
      final IValuePersister persister = getValuePersister();

      // Search for FormComponent children. Ignore all other
      visitFormComponentsPostOrder(new FormComponent.AbstractVisitor()
      {
        @Override
        public void onFormComponent(final FormComponent<?> formComponent)
        {
          if (formComponent.isVisibleInHierarchy())
          {
            // If persistence is switched on for that FormComponent
            // ...
            if (formComponent.isPersistent())
            {
              // Save component's data (e.g. in a cookie)
              persister.save(formComponent);
            }
            else
            {
              // Remove component's data (e.g. cookie)
              persister.clear(formComponent);
            }
          }
        }
      });
    }
View Full Code Here

        // Note: if that is true, values may remain persisted longer
        // than really necessary
        if (formComponent.isPersistent() && formComponent.isVisibleInHierarchy())
        {
          // The persister
          final IValuePersister persister = getValuePersister();

          // Retrieve persisted value
          persister.load(formComponent);
        }
      }
    });
  }
View Full Code Here

   */
  public void removePersistentFormComponentValues(final boolean disablePersistence)
  {
    // The persistence manager responsible to persist and retrieve
    // FormComponent data
    final IValuePersister persister = getValuePersister();

    // Search for FormComponents like TextField etc.
    visitFormComponentsPostOrder(new FormComponent.AbstractVisitor()
    {
      @Override
      public void onFormComponent(final FormComponent<?> formComponent)
      {
        if (formComponent.isVisibleInHierarchy())
        {
          // remove the FormComponent's persisted data
          persister.clear(formComponent);

          // Disable persistence if requested. Leave unchanged
          // otherwise.
          if (formComponent.isPersistent() && disablePersistence)
          {
View Full Code Here

    // We could conceivably be HTML over some other protocol!
    if (getRequestCycle() instanceof WebRequestCycle)
    {
      // The persistence manager responsible to persist and retrieve
      // FormComponent data
      final IValuePersister persister = getValuePersister();

      // Search for FormComponent children. Ignore all other
      visitFormComponentsPostOrder(new FormComponent.AbstractVisitor()
      {
        @Override
        public void onFormComponent(final FormComponent<?> formComponent)
        {
          if (formComponent.isVisibleInHierarchy())
          {
            // If persistence is switched on for that FormComponent
            // ...
            if (formComponent.isPersistent())
            {
              // Save component's data (e.g. in a cookie)
              persister.save(formComponent);
            }
            else
            {
              // Remove component's data (e.g. cookie)
              persister.clear(formComponent);
            }
          }
        }
      });
    }
View Full Code Here

        // Note: if that is true, values may remain persisted longer
        // than really necessary
        if (formComponent.isPersistent() && formComponent.isVisibleInHierarchy())
        {
          // The persister
          final IValuePersister persister = getValuePersister();

          // Retrieve persisted value
          persister.load(formComponent);
        }
      }
    });
  }
View Full Code Here

   */
  public void removePersistentFormComponentValues(final boolean disablePersistence)
  {
    // The persistence manager responsible to persist and retrieve
    // FormComponent data
    final IValuePersister persister = getValuePersister();

    // Search for FormComponents like TextField etc.
    visitFormComponentsPostOrder(new FormComponent.AbstractVisitor()
    {
      @Override
      public void onFormComponent(final FormComponent<?> formComponent)
      {
        if (formComponent.isVisibleInHierarchy())
        {
          // remove the FormComponent's persisted data
          persister.clear(formComponent);

          // Disable persistence if requested. Leave unchanged
          // otherwise.
          if (formComponent.isPersistent() && disablePersistence)
          {
View Full Code Here

    // We could conceivably be HTML over some other protocol!
    if (getRequestCycle() instanceof WebRequestCycle)
    {
      // The persistence manager responsible to persist and retrieve
      // FormComponent data
      final IValuePersister persister = getValuePersister();

      // Search for FormComponent children. Ignore all other
      visitFormComponentsPostOrder(new FormComponent.AbstractVisitor()
      {
        @Override
        public void onFormComponent(final FormComponent<?> formComponent)
        {
          if (formComponent.isVisibleInHierarchy())
          {
            // If persistence is switched on for that FormComponent
            // ...
            if (formComponent.isPersistent())
            {
              // Save component's data (e.g. in a cookie)
              persister.save(formComponent);
            }
            else
            {
              // Remove component's data (e.g. cookie)
              persister.clear(formComponent);
            }
          }
        }
      });
    }
View Full Code Here

        // Note: if that is true, values may remain persisted longer
        // than really necessary
        if (formComponent.isVisibleInHierarchy() && formComponent.isPersistent())
        {
          // The persister
          final IValuePersister persister = getValuePersister();

          // Retrieve persisted value
          persister.load(formComponent);
        }
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.persistence.IValuePersister

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.