Ah yes, I didn't even give flash persist a thought, I think I'd rather use
that to minimize url tampering. Thanks Lance.
On Wed, Apr 24, 2013 at 1:53 PM, Lance Java wrote:
> Something like this (not tested)
>
> @Inject
> private ComponentResources resources;
>
> @Inject
> private JavaScriptSuppo
Something like this (not tested)
@Inject
private ComponentResources resources;
@Inject
private JavaScriptSupport jss;
@Persist(PersistanceConstants.FLASH)
private String pdfUrl;
@SetupRender
void setupRender() {
if (pdfUrl != null) {
jss.addScript("document.location.href = '%s';", pdfUrl);
}
}
Hi Lance, I think I'm with you most of the way with the exception of
generating a link to the pdf event.
So I'm returning PurchaseRequest.class in my onSuccess method which would
for the page to reload with context from onPassivate, this should resolve
my sync issues. Where I'm lost is how to trig
Split it into 2 phases:
Phase 1: Submit form
Do the work (webservice + version increment)
Generate a link to the generatePDF event
Return the page to be re-rendered
Phase 2: Re-render the page
Use javascript to download the PDF once the page has loaded.