Hi Martin,

thank you for the quick response. The onEvent Method was the part I was looking 
for... A
quick check showed me that this should work as I would like it to...

BTW: I think Wicket is a real great piece of Software...

Cheers,

J.


On 18.04.2012 09:15, Martijn Dashorst wrote:
Reserve a hidden part of your pages to render the messages, and create
some javascript kung fu to read those messages and display them in
some way. Create an onEvent() handler that adds the messages container
to the ajax request target, and calls your javascript kung fu master.
See the wiki for the event bus mechanism of 1.5 for more information

Martijn

On Wed, Apr 18, 2012 at 9:08 AM, Jürgen Lind<juergen.l...@iteratec.de>  wrote:
Hi,

I am currently evaluating my options for (semi) pro-active messages to the
user. The first
idea was to use an AjaxSelfUpdatingTimerBehavior to poll for new messages
for the user. Since
this might put quite some unnecessary load on the server, I was thinking
about using the
current request to piggyback the messages. The idea is quite simple:

1. I have a component in thebase page that shows the messages (if present)
to the user

2. An update of this component is added to every Ajax-request the user
makes.

Now comes the tricky bit: what is the best approach to implementing this? I
was thinking
about adding the code for updating the component into the
RequestCycleListener. That leads
to the fist question on how to access the current Ajax request target there.
I found the API
call to check whether a request is an Ajax request, but no way to get the
AjaxRequestTarget...

The second question is, how to access the component. I could either place a
reference to it in
the WebSession (is that a good idea?) or I would need way to access the
current page to get it
from there. How could I do that within the RequestCycleListener?

The third and final question is, whether all that stuff does make any sense
at all - perhaps there
are even better ways to do what I want...

Any help would be appreciated...

Cheers,

J.

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






--
Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbH                Fon: +49 (0)89 614551-44
Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
82008 Unterhaching           Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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

Reply via email to