List of usage examples for org.apache.wicket.session DefaultPageFactory DefaultPageFactory
DefaultPageFactory
From source file:org.ops4j.pax.wicket.internal.PaxWicketPageFactory.java
License:Apache License
/** * Creates a new page using a page class. * * @param pageClass The page class to instantiate * * @return The page// ww w .ja v a 2 s. c o m * * @throws org.apache.wicket.WicketRuntimeException Thrown if the page cannot be constructed */ public final <C extends IRequestablePage> C newPage(final Class<C> pageClass) { PageFactory<? extends IRequestablePage> content; synchronized (this) { content = contents.get(pageClass); } if (content != null) { return (C) content.createPage(new PageParameters()); } return new DefaultPageFactory().newPage(pageClass); }
From source file:org.ops4j.pax.wicket.internal.PaxWicketPageFactory.java
License:Apache License
/** * Creates a new Page, passing PageParameters to the Page constructor if such a constructor exists. If no such * constructor exists and the parameters argument is null or empty, then any available default constructor will be * used.// w w w . ja v a2s .c o m * * @param pageClass The class of Page to create * @param parameters Any parameters to pass to the Page's constructor * * @return The new page * * @throws org.apache.wicket.WicketRuntimeException Thrown if the page cannot be constructed */ public final <C extends IRequestablePage> C newPage(final Class<C> pageClass, final PageParameters parameters) { PageFactory<? extends IRequestablePage> content; synchronized (this) { content = contents.get(pageClass); } if (content != null) { return (C) content.createPage(parameters); } return new DefaultPageFactory().newPage(pageClass, parameters); }
From source file:org.ops4j.pax.wicket.internal.PaxWicketPageFactory.java
License:Apache License
public <C extends IRequestablePage> boolean isBookmarkable(Class<C> pageClass) { return new DefaultPageFactory().isBookmarkable(pageClass); }