On 6/23/07, John Krasnay <[EMAIL PROTECTED]> wrote:

Thanks for the tip, but could you give us a little more of a clue? For
example, from where should we get the RequestCycle? Using
RequestCycle.get() doesn't sound right, since that's for the response
we're sending to the browser, not for the HTML we want to render into
the email.

I looked into the WicketTester, as suggested by a previous response. It
creates a WebRequestCycle, but it needs quite a bit of plumbing like
a mock session, request, response, application, etc. Is this what we
really have to do, in addition to using the StringRequestTarget?


see our tests. all the mock setup is done for you. our tests simply call a
few methods and get a page rendered into a string that is then compared to
another file.

-igor



jk

On Sat, Jun 23, 2007 at 04:30:23PM +0200, Jean-Baptiste Quenot wrote:
> * Srinu Sunkara:
>
> > Hi - I am trying to get the  HTML source code of a web page with
> > in the program  (so that I can send this  in an email). Can some
> > one tell me how can I get the HTML source.
>
> Sure.  Processing a Wicket page and sending the result to a buffer
> can be achieved through  StringRequestTarget, thus allowing you to
> use the buffer contents for sending email.
>
> See RequestCycle.setRequestTarget()
>
> You can find the full answer on this thread:
> http://www.nabble.com/Sending-Emails-Via-Wicket--t3639601.html
>
> Hope this helps,
> --
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/
>
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to