Yeah, I've been thinking about that issue a little.

There are a couple of ways to deal with this:

I was undecided between these 2 approaches:

1. Put the WicketSessionFilter in your cometd servlet

http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/index.html


2. Extend the Cometd listeners to retain wicket information

check out:

org.wicketstuff.push.cometd.WicketRemoveListener



I think, in your case you should choose the WicketSessionFilter.


On Wed, Dec 10, 2008 at 3:15 PM, alexander.elsholz <
[email protected]> wrote:

>
> hi,
>
> thanks, it works fine for model-changes, so that components could read
> actual data.
>
> the open one is to switch the page by the asynchron server-push. there is
> no
> Requestcycle  in the my asynchron event (its null).
>
> to deal with this problem i tried to display the user a link, but there is
> a
> secound problem. when i try to set the link visible true i get this
> exception:
>
> java.lang.IllegalStateException: you can only locate or create sessions in
> the context of a request cycle
>        at org.apache.wicket.Session.findOrCreate(Session.java:206)
>
> could you help me again?
>
>
> thanks alex
>
>
>
> Michael Sparer wrote:
> >
> > take a look at wicketstuff-push or wicketstuff-dojo-1.1. (which also
> > includes cometd that provides your desired push behaviour)
> >
> > regards,
> > Michael
> >
> >
> > alexander.elsholz wrote:
> >>
> >> Hi,
> >>
> >> i need a possibility to refresh parts of view, when data on the server
> >> changed. there is no "synchron" ajax-event, where i can use the
> >> requesttarget, because i use a thread to ask an other service for the
> >> result.
> >>
> >> actually i use the ajaxSelfUpdateBehavior, but i think its too much
> >> traffic.
> >>
> >> also i want to switch the side in a asynchron event. when the event is
> >> occured i want to redirect the user to previews page. here i can also
> use
> >> a modal window, which displays two buttons (yes i want and no, i won't)
> >>
> >> thanks alex
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Asynchron-push-update-redirect-tp20934629p20942140.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to