[
https://issues.apache.org/jira/browse/WICKET-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516711
]
Will Benedict commented on WICKET-795:
--------------------------------------
Wow, well. Live and learn. getDocument() removes the need for the
CaptureApplication class, but not the threading stuff, which I think is still
handy. RenderRunner.run() is easily modified to this:
...
final WicketTester renderer = new WicketTester();
renderer.startPage(pageSource);
renderedSource = renderer.getServletResponse().getDocument();
In addition, this will probably work fine on 1.2.x as well. Let me know if I
should do an updated patch or if these minor changes are enough.
> Easy access to final rendered page source
> -----------------------------------------
>
> Key: WICKET-795
> URL: https://issues.apache.org/jira/browse/WICKET-795
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.3.0-beta2
> Reporter: Will Benedict
> Priority: Trivial
> Attachments: Page_source_rendering_classes.patch
>
>
> I'd like a way to run pages through Wicket so that I can grab the final HTML
> and use it elsewhere (as an email body, for instance). I've been working on
> it and I've got a working solution, but there is still a snag.
> Spawned from this thread:
> http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-tf3968790.html#a11265339
> Chunk of working code:
> http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-tf3968790.html#a11548230
> Current existing hurdle:
> http://www.nabble.com/RequestCycle-goes-null-after-using-WicketTester-within-Wicket-page-tf4153591.html
> Once I can get this simple bit to work, I'll add parameters and what not...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.