You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marco <ma...@mkconsultancy.nl> on 2011/10/03 12:22:30 UTC

Re: Redering to to file in wicket1.5

You can also use:



I prefer this solution. Using a class which is intended for testing
(WicketTester) to produce results in a production environment is strange.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redering-to-to-file-in-wicket1-5-tp3854891p3867053.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Redering to to file in wicket1.5

Posted by Martin Grigorov <mg...@apache.org>.
On Mon, Oct 3, 2011 at 12:39 PM, Marco <ma...@mkconsultancy.nl> wrote:
> public String renderTemplate(WebPage webPage) {
>        BufferedWebResponse bufferedWebResponse = new BufferedWebResponse(null);
>        webPage.getRequestCycle().setResponse(bufferedWebResponse);
>        webPage.render();
>
>        return bufferedWebResponse.getText().toString();
> }
>
> Martin, it's the solution we discussed earlier at
> http://apache-wicket.1842946.n4.nabble.com/Render-WebPage-to-String-in-Wicket-1-5-td3622130.html\
Yes, I'm going to create an example in wicket-examples like the one
for 1.4 at http://wicketstuff.org/wicket14/staticpages/ and another
one with TextTemplate because most of the time this email template is
actually static markup with dynamically generated urls inside.

Will be part of https://issues.apache.org/jira/browse/WICKET-4095
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redering-to-to-file-in-wicket1-5-tp3854891p3867079.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Redering to to file in wicket1.5

Posted by Marco <ma...@mkconsultancy.nl>.
public String renderTemplate(WebPage webPage) {
	BufferedWebResponse bufferedWebResponse = new BufferedWebResponse(null);
	webPage.getRequestCycle().setResponse(bufferedWebResponse);
	webPage.render();
	
	return bufferedWebResponse.getText().toString();
}

Martin, it's the solution we discussed earlier at
http://apache-wicket.1842946.n4.nabble.com/Render-WebPage-to-String-in-Wicket-1-5-td3622130.html

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redering-to-to-file-in-wicket1-5-tp3854891p3867079.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Redering to to file in wicket1.5

Posted by Martin Grigorov <mg...@apache.org>.
Hi Marco,

On Mon, Oct 3, 2011 at 12:22 PM, Marco <ma...@mkconsultancy.nl> wrote:
> You can also use:
>
>
>
You paste didn't make it.
> I prefer this solution. Using a class which is intended for testing
> (WicketTester) to produce results in a production environment is strange.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redering-to-to-file-in-wicket1-5-tp3854891p3867053.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org