Click
Click Examples

Source Viewer : WEB-INF/classes/org/apache/click/examples/page/jsp/MultiPathDemo.java

package org.apache.click.examples.page.jsp;

import org.apache.click.control.ActionLink;
import org.apache.click.control.PageLink;
import org.apache.click.examples.page.BorderPage;

/**
 * Provides a multiple JSP page path example class.
 */
public class MultiPathDemo extends BorderPage {

    private static final long serialVersionUID = 1L;

    private ActionLink changePath = new ActionLink("changePath", this, "changePath");

    private PageLink defaultPath = new PageLink("defaultPath", MultiPathDemo.class);

    public MultiPathDemo() {
        addControl(changePath);
        addControl(defaultPath);
    }

    public boolean changePath() {
        setPath("/jsp/dummy.jsp");
        return true;
    }

    @Override
    public String getTemplate() {
        return "/border-template.jsp";
    }
}