Examples of IValuePersister


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

    // 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
TOP
Copyright © 2018 www.massapi.com. 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.