/** * This method is here as a means to fall back on normal link behavior when this link is not * nested in a form. Not intended to be called by clients directly. * * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked() */ public final void onLinkClicked() { onSubmit(); }
/** * This method is here as a means to fall back on normal link behavior when this link is not * nested in a form. Not intended to be called by clients directly. * * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked() */ public final void onLinkClicked() { onSubmit(); }
/** * This method is here as a means to fall back on normal link behavior when this link is not * nested in a form. Not intended to be called by clients directly. * * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked() */ public final void onLinkClicked() { onSubmit(); onAfterSubmit(); }
/** * This method is here as a means to fall back on normal link behavior when this link is not * nested in a form. Not intended to be called by clients directly. * * @see org.apache.wicket.markup.html.link.ILinkListener#onLinkClicked() */ public final void onLinkClicked() { onSubmit(); onAfterSubmit(); }
@Override public void onSubmit() { super.onSubmit(); if (this.getDefaultModelObject() != null) { SplitButton.this.onSubmit((IMenuItem) this.getDefaultModelObject()); } } };
@Override public void onSubmit() { super.onSubmit(); final File file = getConvertedFile(modelOfInstance.getObject()); if (file == null) { getLogger().info("Não foi possível converter o PDF"); new SingularToastrHelper(this). addToastrMessage(ToastrType.ERROR, "Não foi possível fazer o donwload do PDF"); return; } final IResourceStream resourceStream = new FileResourceStream(new org.apache.wicket.util.file.File(file)); getRequestCycle().scheduleRequestHandlerAfterCurrent( new ResourceStreamRequestHandler(resourceStream) { @Override public void respond(IRequestCycle requestCycle) { super.respond(requestCycle); Files.remove(file); } } .setFileName(file.getName()) .setCacheDuration(Duration.NONE) .setContentDisposition(ContentDisposition.ATTACHMENT)); }
@Override public void onSubmit() { super.onSubmit(); final File file = getConvertedFile(modelOfInstance.getObject()); if (file == null) { getLogger().info("Não foi possível converter o PDF"); new SingularToastrHelper(this). addToastrMessage(ToastrType.ERROR, "Não foi possível fazer o donwload do PDF"); return; } final IResourceStream resourceStream = new FileResourceStream(new org.apache.wicket.util.file.File(file)); getRequestCycle().scheduleRequestHandlerAfterCurrent( new ResourceStreamRequestHandler(resourceStream) { @Override public void respond(IRequestCycle requestCycle) { super.respond(requestCycle); Files.remove(file); } } .setFileName(file.getName()) .setCacheDuration(Duration.NONE) .setContentDisposition(ContentDisposition.ATTACHMENT)); }