/** * @param pageMap * Sets this page into the page map with the given name. If the page map does not yet * exist, it is automatically created. */ final void setPageMap(final IPageMap pageMap) { // Save transient reference to pagemap this.pageMap = pageMap; // Save name for restoring transient pageMapName = pageMap.getName(); }
/** * @param pageMap * Sets this page into the page map with the given name. If the page map does not yet * exist, it is automatically created. */ final void setPageMap(final IPageMap pageMap) { // Save transient reference to pagemap this.pageMap = pageMap; // Save name for restoring transient pageMapName = pageMap.getName(); }
/** * Construct. * * @param pagemap * The pagemap where this popup must be in. Typically, you should put any popup in a * separate page map as Wicket holds references to a limited number of pages/ * versions only. If you don't put your popup in a separate page map, the user might * get page expired exceptions when getting back to the main window again. */ public PopupSettings(IPageMap pagemap) { pageMapName = pagemap.getName(); windowName = pageMapName; }
/** * Construct. * * @param pagemap * The pagemap where this popup must be in. Typically, you should put any popup in a * separate page map as Wicket holds references to a limited number of pages/ * versions only. If you don't put your popup in a separate page map, the user might * get page expired exceptions when getting back to the main window again. * @param displayFlags * Display flags */ public PopupSettings(IPageMap pagemap, final int displayFlags) { this.displayFlags = displayFlags; pageMapName = pagemap.getName(); windowName = pageMapName; }
/** * This constructor is ideal for constructing pages lazily. * * Constructs an inline frame which invokes the getPage() method of the IPageLink interface when * the content of the inline frame is requested. Whatever Page objects is returned by this * method will be rendered back to the user. * * @param id * See Component * @param pageMap * the pagemap where the page of the inline frame must be in * @param pageLink * An implementation of IPageLink which will create the page to be contained in the * inline frame if and when the content is requested */ public InternalFrame(final String id, final IPageMap pageMap, IPageLink pageLink) { super(id); this.pageMapName = pageMap.getName(); this.pageLink = pageLink; }
/** * This constructor is ideal for constructing pages lazily. * * Constructs an inline frame which invokes the getPage() method of the IPageLink interface when * the content of the inline frame is requested. Whatever Page objects is returned by this * method will be rendered back to the user. * * @param id * See Component * @param pageMap * the pagemap where the page of the inline frame must be in * @param pageLink * An implementation of IPageLink which will create the page to be contained in the * inline frame if and when the content is requested */ public InlineFrame(final String id, final IPageMap pageMap, IPageLink pageLink) { super(id); pageMapName = pageMap.getName(); this.pageLink = pageLink; }
/** * This constructor is ideal for constructing pages lazily. * * Constructs an inline frame which invokes the getPage() method of the IPageLink interface when * the content of the inline frame is requested. Whatever Page objects is returned by this * method will be rendered back to the user. * * @param id * See Component * @param pageMap * the pagemap where the page of the inline frame must be in * @param pageLink * An implementation of IPageLink which will create the page to be contained in the * inline frame if and when the content is requested */ public InternalFrame(final String id, final IPageMap pageMap, IPageLink pageLink) { super(id); pageMapName = pageMap.getName(); this.pageLink = pageLink; }
/** * @deprecated Use the {@link PopupSettings#PopupSettings(String, int)} */ @Deprecated public PopupSettings(IPageMap pageMapName, final int displayFlags) { this(pageMapName.getName(), displayFlags); }
/** * @param pagemap * the pagemap to add as used. * @return the boolean if it was added (didn't already contain the pagemap) */ public boolean add(IPageMap pagemap) { return pageMapNames.add(pagemap.getName()); } }
/** * @param pagemap * the pagemap to add as used. * @return the boolean if it was added (didn't already contain the pagemap) */ public boolean add(IPageMap pagemap) { return pageMapNames.add(pagemap.getName()); } }
/** * Construct. * * @param pagemap * The pagemap where this popup must be in. Typically, you should put any popup in a * separate page map as Wicket holds references to a limited number of pages/ * versions only. If you don't put your popup in a separate page map, the user might * get page expired exceptions when getting back to the main window again. * * @deprecated Use the {@link PopupSettings#PopupSettings(String)} */ @Deprecated public PopupSettings(IPageMap pagemap) { this(pagemap.getName(), 0); }
/** * Gets the page map name. Used to create URLs referencing the popup on the defined page map. * * @param callee * @return the page map name */ public String getPageMapName(Component callee) { if (pageMapName != null) { return pageMapName; } else { // TODO copy/past the relevant code from getPageMap if we remove it at some point return getPageMap(callee).getName(); } } }
/** * @param pageMap * The pagemap for this link's destination * @return This */ public final BookmarkablePageLink setPageMap(final IPageMap pageMap) { if (pageMap != null) { pageMapName = pageMap.getName(); add(new AttributeModifier("target", true, new Model(pageMapName))); } return this; }
/** * @param pageMap * The pagemap for this link's destination * @return This */ public final BookmarkablePageLink<T> setPageMap(final IPageMap pageMap) { if (pageMap != null) { pageMapName = pageMap.getName(); add(new AttributeModifier("target", true, new Model<String>(pageMapName))); } return this; }
/** * @param pageMap * Page map to remove */ public final void removePageMap(final IPageMap pageMap) { PageMapAccessMetaData pagemapMetaData = getMetaData(PAGEMAP_ACCESS_MDK); if (pagemapMetaData != null) { pagemapMetaData.pageMapNames.remove(pageMap.getName()); } synchronized (usedPageMapNames) { usedPageMapNames.remove(pageMap.getName()); } // the page map also needs to be removed from the dirty objects list or // the requestDetached method will end up adding it back into session getDirtyObjectsList().remove(pageMap); removeAttribute(attributeForPageMapName(pageMap.getName())); dirty(); }
/** * @param pageMap * Page map to remove */ public final void removePageMap(final IPageMap pageMap) { PageMapAccessMetaData pagemapMetaData = (PageMapAccessMetaData)getMetaData(PAGEMAP_ACCESS_MDK); if (pagemapMetaData != null) { pagemapMetaData.pageMapNames.remove(pageMap.getName()); } synchronized (usedPageMaps) { usedPageMaps.remove(pageMap); } removeAttribute(attributeForPageMapName(pageMap.getName())); dirty(); }
/** * Returns a bookmarkable URL that references a given page class using a given set of page * parameters. Since the URL which is returned contains all information necessary to instantiate * and render the page, it can be stored in a user's browser as a stable bookmark. * * @param pageMap * Pagemap to use. If null is passed the default page map will be used * @param pageClass * Class of page * @param parameters * Parameters to page * @return Bookmarkable URL to page */ public final CharSequence urlFor(final IPageMap pageMap, final Class pageClass, final PageParameters parameters) { final IRequestTarget target = new BookmarkablePageRequestTarget(pageMap == null ? PageMap.DEFAULT_NAME : pageMap.getName(), pageClass, parameters); return encodeUrlFor(target); }
/** * THIS METHOD IS NOT PART OF THE WICKET API. DO NOT ATTEMPT TO OVERRIDE OR CALL IT. * * Called when a link is clicked. The implementation of this method is currently to simply call * onClick(), but this may be augmented in the future. * * @see ILinkListener */ public final void onLinkClicked() { // if there are popupsettings and this link is clicked. // set the popup page map in the request parameters, so that pages that // are created in the onClick are made in the wanted pagemap if (popupSettings != null) { RequestCycle.get().getRequest().getRequestParameters().setPageMapName( popupSettings.getPageMap(this).getName()); } // Invoke subclass handler onClick(); }
@Override protected PageParameters getLinkPageParameters() { PageParameters params = new PageParameters(); params.put("pageMap", getPage().getPageMap().getName()); params.put("pageId", getPage().getId()); params.put("version", getPage().getVersions()-1); return params; }