Package org.wicketstuff.servlet3

Source Code of org.wicketstuff.servlet3.HomePage

package org.wicketstuff.servlet3;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.StatelessLink;
import org.apache.wicket.request.flow.RedirectToUrlException;
import org.apache.wicket.request.mapper.parameter.PageParameters;

/**
* Homepage
*/
public class HomePage extends WebPage
{

  private static final long serialVersionUID = 1L;

  // TODO Add any page properties or variables here

  /**
   * Constructor that is invoked when page is invoked without a session.
   *
   * @param parameters Page parameters
   */
  public HomePage(final PageParameters parameters)
  {

    // Add the simplest type of label
    add(new Label("message",
        "If you see this message wicket is properly configured and running"));
    add(new StatelessLink("secureExample")
    {

      @Override
      public void onClick()
      {
        throw new RedirectToUrlException("/cms/index.html");
      }

    });

  }
}
TOP

Related Classes of org.wicketstuff.servlet3.HomePage

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.