Hi and thanks for the links, very useful.

I tried the easiest solution:


http://cwiki.apache.org/confluence/display/WICKET/FAQs#FAQs- HowcanIrendermytemplatestoaString%3F

and I am having a further problem....

In this case, I am in the middle of a Wicket/http request and using the BaseWicketTester as so:

startPage(newly instantiated WebPage)
followed by
getServletResponse().getDocument()

which works fine (however, it leaves the wicket:id=... tagsin the String)

BUT when I go to write out the current wicket/http request (not the mock one from BaseWicketTester) it seems to be empty.

Question:
1. Could it be the case that using the MockWebApplication objects still work on thread/request-specific session and response data? I would explicitly hope this was NOT the case.

2. Perhaps the same HJttpServletResponse object is used for both the MockApp and WicketApp?

If this is the case, using the more complicated example may work as it "hides" those objects by using its own (newly instatiated) subclass of WicketApplication.

Further Question:
3. In this case, (seeing as I very new to Wicket and dont really get it all yet) would I be missing some state in the WicketApplication that my Page object is not going to have access too?

Mike


On Wed, Dec 10, 2008 at 2:49 AM, Ernesto Reinaldo Barreiro <
[EMAIL PROTECTED]> wrote:

Hope this helps...


http://www.nabble.com/Use-wicket-page-templates-not-for- webapplication-td19173648.html


http://cwiki.apache.org/confluence/display/WICKET/FAQs#FAQs- HowcanIrendermytemplatestoaString%3F
http://cwiki.apache.org/WICKET/use-wicket-as-template-engine.html

Ernesto

On Wed, Dec 10, 2008 at 7:31 AM, Mike Papper <[EMAIL PROTECTED]> wrote:

Hi,

thanks for that - I did search the archives and found nothing...is there
a
"name" for this that you know of - such that I could use it in the
search? I
think I was calling it "internal redirect".

Mike


On Dec 9, 2008, at 10:16 PM, Jeremy Thomerson wrote:

Search around in the mail archives - the typical solution involves using
WicketTester.

On Tue, Dec 9, 2008 at 8:06 PM, Mike Papper <[EMAIL PROTECTED]> wrote:

 Hi, very new to Wicket and this list...

so I'm wondering if anyone can tell me if the following is possible and
approx. how-to?

Overview: we have a wicket page that generates some html +javascript
etc.
We
want to render this page from within the application (into a String)
and
send it to some other web service (such as Facebook). We currently use
httpclient to make a http request back to our server and take the
response
and munge it. The overhead of the extra request is an unsatisfactory
load
on
our servers.

Is there a way to make to mimic an 'internal' servlet/web request and
take
that response (or at least the rendering of the Page) but do not affect
the
state of the current (external) http request? We tried using
MockServlet
with the WicketFilter but when the intenral request was finished it
seemed
to alter the state of the original request (such that the session went
away
and the response was invalid - I think the original response had been generated from the contents of the mock request/response). Even if this
could be fixed...theres more:

An additional constraint is to call this 'internal request' from
anywhere
in
the code and not necessarily within a http request (i.e., from a Quartz thread). So, we may not have any WicketApplication ...If it is the case
that
we can only gert our hands on the WicketApplication from a thread that
is
part of a http request, then the quartz thread willnot have acces to
WicketApplication (I am unsure about this).

Looking around in the docs, I came across the RequestCycle and
wondering
if
thats how I can do this?

Any pointer for this would be appreciated - it would be a shame not to
be
able to use Wicket for this internal rendering.

Mike




--
Jeremy Thomerson
http://www.wickettraining.com



-------------------------------------------------------------------- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Jeremy Thomerson
http://www.wickettraining.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to