| wicket.markup.html.link.Link wicket.markup.html.link.PageLink
PageLink | public class PageLink extends Link (Code) | | Links to a given page via an object implementing the IPageLink delayed
linking interface. PageLinks can be constructed directly with an IPageLink
interface or with a Page Class object. In the latter case, an IPageLink
implementation is provided which constructs a Page of the given class when
the link is clicked. A default no-args constructor must be available in this
case or a WicketRuntimeException will be thrown when Wicket fails to
instantiate the class.
See Also: IPageLink author: Jonathan Locke |
Constructor Summary | |
public | PageLink(String id, Class c) Constructs a link that instantiates the given Page class when the link is
clicked. | public | PageLink(String id, Page page) This constructor is ideal if a Page object was passed in from a previous
Page. | public | PageLink(String id, IPageLink pageLink) This constructor is ideal for constructing pages lazily.
Constructs a link which invokes the getPage() method of the IPageLink
interface when the link is clicked. |
Method Summary | |
public boolean | linksTo(Page page) Returns true if the given page is of the same class as the (delayed)
destination of this page link. | public void | onClick() Handles a link click by asking for a concrete Page instance through the
IPageLink.getPage() delayed linking interface. |
PageLink | public PageLink(String id, Class c)(Code) | | Constructs a link that instantiates the given Page class when the link is
clicked. The instantiated Page is used to render a response to the user.
Parameters: id - See Component Parameters: c - Page class |
PageLink | public PageLink(String id, Page page)(Code) | | This constructor is ideal if a Page object was passed in from a previous
Page. Construct a link to the Page.
Parameters: id - See component Parameters: page - The page |
PageLink | public PageLink(String id, IPageLink pageLink)(Code) | | This constructor is ideal for constructing pages lazily.
Constructs a link which invokes the getPage() method of the IPageLink
interface when the link is clicked. Whatever Page objects is returned by
this method will be rendered back to the user.
Parameters: id - See Component Parameters: pageLink - An implementation of IPageLink which will create the pagelinked to if and when this hyperlink is clicked at a latertime. |
onClick | public void onClick()(Code) | | Handles a link click by asking for a concrete Page instance through the
IPageLink.getPage() delayed linking interface. This call will normally
cause the destination page to be created.
See Also: wicket.markup.html.link.Link.onClick |
|
|