/** * Handles this frame's tag. * * @param tag * the component tag * @see org.apache.wicket.Component#onComponentTag(ComponentTag) */ @Override protected void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, "iframe"); // Set href to link to this frame's frameRequested method CharSequence url = getURL(); // generate the src attribute tag.put("src", url); super.onComponentTag(tag); }
@Override public final void onRequest() { setResponsePage(pageProvider.getPageInstance()); }
/** * Gets the url to use for this link. * * @return The URL that this link links to */ protected CharSequence getURL() { return urlFor(ILinkListener.INTERFACE); }
@Override protected void onInitialize() { super.onInitialize(); if (!Strings.isNullOrEmpty(externalPageUrl)) { String interpolatedUrl = MapVariableInterpolator.interpolate(externalPageUrl, new ODocumentMapWrapper(getModelObject())); RedirectPage page = new RedirectPage(interpolatedUrl); final InlineFrame frame = new InlineFrame("embeddedPage", page); frame.add(new AttributeModifier("style", style)); add(frame); } else { add(new EmptyPanel("embeddedPage")); } }
@Override protected void onBeforeRender() { super.onBeforeRender(); if (uploadIFrame == null) { // the iframe should be attached to a page to be able to get its pagemap, // that's why i'm adding it in onBeforeRender IPageLink iFrameLink = new IPageLink() { public Page getPage() { return new UploadIFrame(parentField.getFieldValueModel()) { protected String getOnUploadedCallback() { return "onUpload_" + UploadPanel.this.getMarkupId(); } protected LifeCycleListener getLifeCycleListener() { return (AbstractOntopolyPage)UploadPanel.this.getPage(); } }; } public Class<? extends Page> getPageIdentity() { return UploadIFrame.class; } }; uploadIFrame = new InlineFrame("upload", getPage().getPageMap(), iFrameLink); add(uploadIFrame); } }
/** * Gets the url to use for this link. * * @return The URL that this link links to */ protected CharSequence getURL() { return urlForListener(new PageParameters()); }
uploadIFrame = new InlineFrame("upload", getPage().getPageMap(), iFrameLink); add(uploadIFrame);
/** * Gets the url to use for this link. * * @return The URL that this link links to */ protected CharSequence getURL() { return urlForListener(new PageParameters()); }
/** * Handles this frame's tag. * * @param tag * the component tag * @see org.apache.wicket.Component#onComponentTag(ComponentTag) */ @Override protected void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, "iframe"); // Set href to link to this frame's frameRequested method CharSequence url = getURL(); // generate the src attribute tag.put("src", url); super.onComponentTag(tag); }
@Override public final void onRequest() { setResponsePage(pageProvider.getPageInstance()); }
/** * Gets the url to use for this link. * * @return The URL that this link links to */ protected CharSequence getURL() { return urlFor(ILinkListener.INTERFACE); }
/** * Handles this frame's tag. * * @param tag * the component tag * @see org.apache.wicket.Component#onComponentTag(ComponentTag) */ protected final void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, "iframe"); // Set href to link to this frame's frameRequested method CharSequence url = getURL(); // generate the src attribute tag.put("src", Strings.replaceAll(url, "&", "&")); super.onComponentTag(tag); }
/** * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked() */ public final void onLinkClicked() { RequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters(); String oldPageMapName = parameters.getPageMapName(); try { if (pageMapName != null) { RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName); } setResponsePage(pageLink.getPage()); } finally { RequestCycle.get().getRequest().getRequestParameters().setPageMapName(oldPageMapName); } }
/** * Handles this frame's tag. * * @param tag * the component tag * @see org.apache.wicket.Component#onComponentTag(ComponentTag) */ @Override protected final void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, "iframe"); // Set href to link to this frame's frameRequested method CharSequence url = getURL(); // generate the src attribute tag.put("src", Strings.replaceAll(url, "&", "&")); super.onComponentTag(tag); }
/** * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked() */ public final void onLinkClicked() { RequestParameters parameters = RequestCycle.get().getRequest().getRequestParameters(); String oldPageMapName = parameters.getPageMapName(); try { if (pageMapName != null) { RequestCycle.get().getRequest().getRequestParameters().setPageMapName(pageMapName); } setResponsePage(pageLink.getPage()); } finally { RequestCycle.get().getRequest().getRequestParameters().setPageMapName(oldPageMapName); } }