Do enlighting me..Why would you override a request cycle?What other cycle would you then generate?The only thing you want to really replace is the Response..Replace the response. Render the page that you want as email
Restore the response and render the real output page (that says email sent or
while processing a wicket request - you want to generate a separate
email by rendering a separate page into a separate response and then
email that. right now you have to use wickettester to do that but that
sets up its own application/session/request cycle so it messes with
the threadlocals
not not reallyi must be missing something..Link.onClick(){ StirngResponse response = new StringResponse(); RequestCycle.setResponse(response); MyEmailPage page = new MyEmailPage();
page.renderPage(); REquestCycle.setResonse(previous); smtpServer.sent(response.toString()); setResponePage(new
and doing that in a different RequestCycle doesn't have that effect??I think it does.. Is exactly the same.But in this case i dont think it will have anyside effects.. Because if that pageis not stateless then it really also can't be sent as an email!!
So generating pages for other then sent it
Well, for some reason I cannot render a page using MockupWebApplication. I get an exception saying that all components on the page failed to render. Log file, however, says that every one of them was rendered. I think that the problem lies inside
ComponentRequestTarget.respond(final RequestCycle
One more roadblock... RequestCycle constructor current ThreadLocal variable. There is no way to alter value of current RequestCycle after it was set in the constructor, which means that I cannot suspend current request cycle, generate my page into a string, and then resume the original request
yeah, the threadlocal context vars are prob going to be a problem. you can spin off a worker thread to do the render and wait for it.-IgorOn 8/4/06,
Alexei Sokolov [EMAIL PROTECTED] wrote:
One more roadblock... RequestCycle constructor current ThreadLocal variable. There is no way to alter value
You can introduce push/pop methods on RequestCycle in the next version of wicket.AlexOn 8/4/06, Igor Vaynberg
[EMAIL PROTECTED] wrote:yeah, the threadlocal context vars are prob going to be a problem. you can spin off a worker thread to do the render and wait for it.
-IgorOn 8/4/06,
Alexei
request cycle is not the only problem. we have application and session threadlocals as well.-IgorOn 8/4/06, Alexei Sokolov
[EMAIL PROTECTED] wrote:You can introduce push/pop methods on RequestCycle in the next version of wicket.
AlexOn 8/4/06, Igor Vaynberg
[EMAIL PROTECTED] wrote:
yeah, the
For Application Session you have set() methods. So, you can backup current values and then restore them.AlexOn 8/4/06, Igor Vaynberg
[EMAIL PROTECTED] wrote:request cycle is not the only problem. we have application and session threadlocals as well.
-IgorOn 8/4/06, Alexei Sokolov
[EMAIL
we can add a set() to request cycle as well :)-IgorOn 8/4/06, Alexei Sokolov [EMAIL PROTECTED]
wrote:For Application Session you have set() methods. So, you can backup current values and then restore them.
AlexOn 8/4/06, Igor Vaynberg
[EMAIL PROTECTED] wrote:
request cycle is not the only
And if you can do it in 1.2.2 it would be great.AlexOn 8/4/06, Igor Vaynberg [EMAIL PROTECTED]
wrote:we can add a set() to request cycle as well :)
-IgorOn 8/4/06, Alexei Sokolov
[EMAIL PROTECTED]
wrote:
For Application Session you have set() methods. So, you can backup current values and then
add an rfe so it doesnt slip, or of course a patch would be welcome :)-IgorOn 8/4/06, Alexei Sokolov
[EMAIL PROTECTED] wrote:And if you can do it in 1.2.2 it would be great.
AlexOn 8/4/06, Igor Vaynberg
[EMAIL PROTECTED]
wrote:
we can add a set() to request cycle as well :)
-IgorOn 8/4/06,
Hello,I would like to reuse some of the components I have to generate e-mail reports. Is it possible? Thank you,Alex
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
yes, you can use wickettester and stringresponse to render a page into a string.-IgorOn 8/3/06, Alexei Sokolov
[EMAIL PROTECTED] wrote:Hello,I would like to reuse some of the components I have to generate e-mail reports. Is it possible?
Thank you,Alex
It is possible, and you should look at our junit test cases to get
some inspiration. Whether it is recommended... I don't know. I'd go
for something simple like a Velocity template. Wicket components are
meant for interaction, something you don't need when creating email
messages.
Eelco
On
i disagree, i think wicket is in itself a great templating enginein 3.0 i would like to separate the layers more so you can easily build up components and render them to anywhere - gets you a component-oriented templating engine :)
-IgorOn 8/3/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
It is
Fair enough. I wouldn't say I'm against it per se. But for many cases
imo it is overkill.
Eelco
On 8/3/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
i disagree, i think wicket is in itself a great templating engine
in 3.0 i would like to separate the layers more so you can easily build up
well...if you are generating html emails and you have common display panels already in place for pojos, why not reuse those? you get to reuse the layout, css, etc with almost no effort.-Igor
On 8/3/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
Fair enough. I wouldn't say I'm against it per se. But
I had this need too, so I wrote a custom class to mail both HTML and TEXT versions of an email using WicketTester. It uses a custom resource finder to load ***.txt and ***.html files to send. The .html files are full wicket pages and they get rendered as-is, the .txt files contain only wicket:
Well, for instance if you need something like I needed for
www.burgerweeshuis.nl (years ago): administrators maintain a template
with basic scripting facilities (accessing context variables,
conditionals, etc). In that case using Velocity is simpler.
Eelco
On 8/3/06, Igor Vaynberg [EMAIL
21 matches
Mail list logo