You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Michal Wegrzyn <mi...@onior.com> on 2012/11/29 14:56:04 UTC

events between pages

Hi,

I would like to send event from iframe to "parent" page which has multiple iframes.

Event framework makes it possible to use application or session as sinks, but event affects only page from which event was sent.

Why events which have session/application as sinks are not propagated to all pages?

Is it possible to workaround it?

Best regards,
Michal Wegrzyn

RE: events between pages

Posted by Michal Wegrzyn <mi...@onior.com>.
Thanks for a reply. Exactly. For my custom js I do simply:

target.appendJavaScript( "if(window.parent != null) { window.parent." + script + "}else{" +script +"}"  );

because iframes are inside parent page.

Maybe there is a way to add above modification to ART with some kind of contributor interface?

Best regards,
Michał


> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: Wednesday, December 12, 2012 14:03
> To: users@wicket.apache.org
> Subject: Re: events between pages
> 
> They are not part of the iframe's document and the JavaScript code
> cannot find them to replace them.
> It is easy to use the 'parent' in the JS code but I see no way to know
> that at the server side. I.e. when using ART#add() to say that the
> component is in the parent document...
> 
> 
> On Wed, Dec 12, 2012 at 12:16 PM, Michal Wegrzyn
> <mi...@onior.com>wrote:
> 
> > Hi Martin,
> >
> > For your workaround event is propagated and it works fine, but there
> > are problems with AjaxRequestTarget, precisely with target.add(
> > componentToRefresh ).
> > Components that are outside of an iframe are not refreshed (target
> > works on iframe context and they are not found).
> >
> > What would be in this situation best solution?
> >
> > Best regards,
> > Michał
> >
> >
> > > -----Original Message-----
> > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > Sent: Thursday, November 29, 2012 15:01
> > > To: users@wicket.apache.org
> > > Subject: Re: events between pages
> > >
> > > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > > <mi...@onior.com>wrote:
> > >
> > > > Hi,
> > > >
> > > > I would like to send event from iframe to "parent" page which has
> > > > multiple iframes.
> > > >
> > > > Event framework makes it possible to use application or session
> as
> > > > sinks, but event affects only page from which event was sent.
> > > >
> > > > Why events which have session/application as sinks are not
> > > > propagated to all pages?
> > > >
> > >
> > > Define "all pages".
> > > For application that could mean all pages for all users ever used
> so
> > > far.
> > > For session this means all pages in the history of this user (the
> > > data store).
> > >
> > >
> > > >
> > > > Is it possible to workaround it?
> > > >
> > >
> > > You can get any page by its id:
> > > session.getPageManager().getPage(pageId)
> > > and use it as a sink.
> > >
> > >
> > > >
> > > > Best regards,
> > > > Michal Wegrzyn
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com <http://jweekend.com/>
> >
> 
> 
> 
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

Re: events between pages

Posted by Martin Grigorov <mg...@apache.org>.
They are not part of the iframe's document and the JavaScript code cannot
find them to replace them.
It is easy to use the 'parent' in the JS code but I see no way to know that
at the server side. I.e. when using ART#add() to say that the component is
in the parent document...


On Wed, Dec 12, 2012 at 12:16 PM, Michal Wegrzyn
<mi...@onior.com>wrote:

> Hi Martin,
>
> For your workaround event is propagated and it works fine, but there are
> problems with AjaxRequestTarget, precisely with target.add(
> componentToRefresh ).
> Components that are outside of an iframe are not refreshed (target works
> on iframe context and they are not found).
>
> What would be in this situation best solution?
>
> Best regards,
> Michał
>
>
> > -----Original Message-----
> > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > Sent: Thursday, November 29, 2012 15:01
> > To: users@wicket.apache.org
> > Subject: Re: events between pages
> >
> > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > <mi...@onior.com>wrote:
> >
> > > Hi,
> > >
> > > I would like to send event from iframe to "parent" page which has
> > > multiple iframes.
> > >
> > > Event framework makes it possible to use application or session as
> > > sinks, but event affects only page from which event was sent.
> > >
> > > Why events which have session/application as sinks are not propagated
> > > to all pages?
> > >
> >
> > Define "all pages".
> > For application that could mean all pages for all users ever used so
> > far.
> > For session this means all pages in the history of this user (the data
> > store).
> >
> >
> > >
> > > Is it possible to workaround it?
> > >
> >
> > You can get any page by its id:
> > session.getPageManager().getPage(pageId)
> > and use it as a sink.
> >
> >
> > >
> > > Best regards,
> > > Michal Wegrzyn
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

RE: events between pages

Posted by Michal Wegrzyn <mi...@onior.com>.
Hi Martin,

For your workaround event is propagated and it works fine, but there are problems with AjaxRequestTarget, precisely with target.add( componentToRefresh ).
Components that are outside of an iframe are not refreshed (target works on iframe context and they are not found).

What would be in this situation best solution?

Best regards,
Michał


> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: Thursday, November 29, 2012 15:01
> To: users@wicket.apache.org
> Subject: Re: events between pages
> 
> On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> <mi...@onior.com>wrote:
> 
> > Hi,
> >
> > I would like to send event from iframe to "parent" page which has
> > multiple iframes.
> >
> > Event framework makes it possible to use application or session as
> > sinks, but event affects only page from which event was sent.
> >
> > Why events which have session/application as sinks are not propagated
> > to all pages?
> >
> 
> Define "all pages".
> For application that could mean all pages for all users ever used so
> far.
> For session this means all pages in the history of this user (the data
> store).
> 
> 
> >
> > Is it possible to workaround it?
> >
> 
> You can get any page by its id:
> session.getPageManager().getPage(pageId)
> and use it as a sink.
> 
> 
> >
> > Best regards,
> > Michal Wegrzyn
> >
> 
> 
> 
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

RE: events between pages

Posted by Michal Wegrzyn <mi...@onior.com>.

> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: Thursday, November 29, 2012 16:57
> To: users@wicket.apache.org
> Subject: Re: events between pages
> 
> On Thu, Nov 29, 2012 at 4:50 PM, Michal Wegrzyn
> <mi...@onior.com>wrote:
> 
> >
> >
> > > -----Original Message-----
> > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > Sent: Thursday, November 29, 2012 16:33
> > > To: users@wicket.apache.org
> > > Subject: Re: events between pages
> > >
> > > On Thu, Nov 29, 2012 at 4:28 PM, Michal Wegrzyn
> > > <mi...@onior.com>wrote:
> > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > Sent: Thursday, November 29, 2012 15:43
> > > > > To: users@wicket.apache.org
> > > > > Subject: Re: events between pages
> > > > >
> > > > > You can do this.
> > > > > You can use either wicket-atmosphere or wicket-native-websocket
> > > > > to push data to the clients.
> > > > >
> > > >
> > > > But only with Wicket >=6.0.0.
> > > >
> > > > Is it hard to affect also "all" "recent" (at least for current
> > > > user) pages for events in Wicket?
> > > > That would be a nice feature.
> > > >
> > >
> > > New features go only in 6.x anyway.
> > >
> > > You can keep a list of created WebSession objects, all last used
> > > pages are kept as attribute in the Session object.
> > >
> >
> > Shall I add then new feature request for 6.x? :)
> >
> 
> I lost you.
> Wicket 6.x provides these features - Atmosphere/WebSocket. What feature
> request exactly ?
> 
> You cannot initiate push from the server to the browsers with normal
> HTTP.
> You need either WebSocket/SSE/Long-Polling/Streaming/Flash
> 

Sorry, I was not clear enough.
Feature would be to trigger wicket events on all user pages and not only on the current page.

> 
> > >
> > > >
> > > > >
> > > > > On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn
> > > > > <mi...@onior.com>wrote:
> > > > >
> > > > > > Recent = "one".
> > > > > > It would be security issue only if event API has some holes
> :)
> > > > > > Anyway it would be quite handy to send for example some info
> > > > > > events to all logged users.
> > > > > >
> > > > > > Best regards,
> > > > > > Michal Wegrzyn
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > > > Sent: Thursday, November 29, 2012 15:16
> > > > > > > To: users@wicket.apache.org
> > > > > > > Subject: Re: events between pages
> > > > > > >
> > > > > > > On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
> > > > > > > <mi...@onior.com>wrote:
> > > > > > >
> > > > > > > > Thanks Martin.
> > > > > > > >
> > > > > > > > What is the pageId parameter in
> > > getPageManager().getPage(pageId)?
> > > > > > > > Component id or page version id (present in url)?
> > > > > > > >
> > > > > > >
> > > > > > > The id from the url.
> > > > > > > See Page#getPageReference()
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > For session I would expect all most recent versions of
> > > visited
> > > > > > > > pages for a current user.
> > > > > > > >
> > > > > > >
> > > > > > > Define "recent" :-)
> > > > > > > One, two, ... more ?
> > > > > > >
> > > > > > >
> > > > > > > > For application the same but for all users.
> > > > > > > >
> > > > > > >
> > > > > > > If a random user can manipulate the pages of the other
> users
> > > > > > > would be a security issue, and rude :-)
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > Best regards,
> > > > > > > > Michal Wegrzyn
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > > > > > Sent: Thursday, November 29, 2012 15:01
> > > > > > > > > To: users@wicket.apache.org
> > > > > > > > > Subject: Re: events between pages
> > > > > > > > >
> > > > > > > > > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > > > > > > > > <mi...@onior.com>wrote:
> > > > > > > > >
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > I would like to send event from iframe to "parent"
> > > > > > > > > > page which has multiple iframes.
> > > > > > > > > >
> > > > > > > > > > Event framework makes it possible to use application
> > > > > > > > > > or session
> > > > > > > as
> > > > > > > > > > sinks, but event affects only page from which event
> > > > > > > > > > was
> > > sent.
> > > > > > > > > >
> > > > > > > > > > Why events which have session/application as sinks
> are
> > > not
> > > > > > > > > > propagated to all pages?
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > Define "all pages".
> > > > > > > > > For application that could mean all pages for all users
> > > ever
> > > > > > > > > used
> > > > > > > so
> > > > > > > > > far.
> > > > > > > > > For session this means all pages in the history of this
> > > user
> > > > > > > > > (the data store).
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Is it possible to workaround it?
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > You can get any page by its id:
> > > > > > > > > session.getPageManager().getPage(pageId)
> > > > > > > > > and use it as a sink.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Best regards,
> > > > > > > > > > Michal Wegrzyn
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Martin Grigorov
> > > > > > > > > jWeekend
> > > > > > > > > Training, Consulting, Development http://jWeekend.com
> > > > > > > > > <http://jweekend.com/>
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Martin Grigorov
> > > > > > > jWeekend
> > > > > > > Training, Consulting, Development http://jWeekend.com
> > > > > > > <http://jweekend.com/>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Martin Grigorov
> > > > > jWeekend
> > > > > Training, Consulting, Development http://jWeekend.com
> > > > > <http://jweekend.com/>
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com <http://jweekend.com/>
> >
> 
> 
> 
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

Re: events between pages

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Nov 29, 2012 at 4:50 PM, Michal Wegrzyn <mi...@onior.com>wrote:

>
>
> > -----Original Message-----
> > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > Sent: Thursday, November 29, 2012 16:33
> > To: users@wicket.apache.org
> > Subject: Re: events between pages
> >
> > On Thu, Nov 29, 2012 at 4:28 PM, Michal Wegrzyn
> > <mi...@onior.com>wrote:
> >
> > >
> > > > -----Original Message-----
> > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > Sent: Thursday, November 29, 2012 15:43
> > > > To: users@wicket.apache.org
> > > > Subject: Re: events between pages
> > > >
> > > > You can do this.
> > > > You can use either wicket-atmosphere or wicket-native-websocket to
> > > > push data to the clients.
> > > >
> > >
> > > But only with Wicket >=6.0.0.
> > >
> > > Is it hard to affect also "all" "recent" (at least for current user)
> > > pages for events in Wicket?
> > > That would be a nice feature.
> > >
> >
> > New features go only in 6.x anyway.
> >
> > You can keep a list of created WebSession objects, all last used pages
> > are kept as attribute in the Session object.
> >
>
> Shall I add then new feature request for 6.x? :)
>

I lost you.
Wicket 6.x provides these features - Atmosphere/WebSocket. What feature
request exactly ?

You cannot initiate push from the server to the browsers with normal HTTP.
You need either WebSocket/SSE/Long-Polling/Streaming/Flash


> >
> > >
> > > >
> > > > On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn
> > > > <mi...@onior.com>wrote:
> > > >
> > > > > Recent = "one".
> > > > > It would be security issue only if event API has some holes :)
> > > > > Anyway it would be quite handy to send for example some info
> > > > > events to all logged users.
> > > > >
> > > > > Best regards,
> > > > > Michal Wegrzyn
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > > Sent: Thursday, November 29, 2012 15:16
> > > > > > To: users@wicket.apache.org
> > > > > > Subject: Re: events between pages
> > > > > >
> > > > > > On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
> > > > > > <mi...@onior.com>wrote:
> > > > > >
> > > > > > > Thanks Martin.
> > > > > > >
> > > > > > > What is the pageId parameter in
> > getPageManager().getPage(pageId)?
> > > > > > > Component id or page version id (present in url)?
> > > > > > >
> > > > > >
> > > > > > The id from the url.
> > > > > > See Page#getPageReference()
> > > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > For session I would expect all most recent versions of
> > visited
> > > > > > > pages for a current user.
> > > > > > >
> > > > > >
> > > > > > Define "recent" :-)
> > > > > > One, two, ... more ?
> > > > > >
> > > > > >
> > > > > > > For application the same but for all users.
> > > > > > >
> > > > > >
> > > > > > If a random user can manipulate the pages of the other users
> > > > > > would be a security issue, and rude :-)
> > > > > >
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Best regards,
> > > > > > > Michal Wegrzyn
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > > > > Sent: Thursday, November 29, 2012 15:01
> > > > > > > > To: users@wicket.apache.org
> > > > > > > > Subject: Re: events between pages
> > > > > > > >
> > > > > > > > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > > > > > > > <mi...@onior.com>wrote:
> > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I would like to send event from iframe to "parent" page
> > > > > > > > > which has multiple iframes.
> > > > > > > > >
> > > > > > > > > Event framework makes it possible to use application or
> > > > > > > > > session
> > > > > > as
> > > > > > > > > sinks, but event affects only page from which event was
> > sent.
> > > > > > > > >
> > > > > > > > > Why events which have session/application as sinks are
> > not
> > > > > > > > > propagated to all pages?
> > > > > > > > >
> > > > > > > >
> > > > > > > > Define "all pages".
> > > > > > > > For application that could mean all pages for all users
> > ever
> > > > > > > > used
> > > > > > so
> > > > > > > > far.
> > > > > > > > For session this means all pages in the history of this
> > user
> > > > > > > > (the data store).
> > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Is it possible to workaround it?
> > > > > > > > >
> > > > > > > >
> > > > > > > > You can get any page by its id:
> > > > > > > > session.getPageManager().getPage(pageId)
> > > > > > > > and use it as a sink.
> > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Best regards,
> > > > > > > > > Michal Wegrzyn
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Martin Grigorov
> > > > > > > > jWeekend
> > > > > > > > Training, Consulting, Development http://jWeekend.com
> > > > > > > > <http://jweekend.com/>
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Martin Grigorov
> > > > > > jWeekend
> > > > > > Training, Consulting, Development http://jWeekend.com
> > > > > > <http://jweekend.com/>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Martin Grigorov
> > > > jWeekend
> > > > Training, Consulting, Development
> > > > http://jWeekend.com <http://jweekend.com/>
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

RE: events between pages

Posted by Michal Wegrzyn <mi...@onior.com>.

> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: Thursday, November 29, 2012 16:33
> To: users@wicket.apache.org
> Subject: Re: events between pages
> 
> On Thu, Nov 29, 2012 at 4:28 PM, Michal Wegrzyn
> <mi...@onior.com>wrote:
> 
> >
> > > -----Original Message-----
> > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > Sent: Thursday, November 29, 2012 15:43
> > > To: users@wicket.apache.org
> > > Subject: Re: events between pages
> > >
> > > You can do this.
> > > You can use either wicket-atmosphere or wicket-native-websocket to
> > > push data to the clients.
> > >
> >
> > But only with Wicket >=6.0.0.
> >
> > Is it hard to affect also "all" "recent" (at least for current user)
> > pages for events in Wicket?
> > That would be a nice feature.
> >
> 
> New features go only in 6.x anyway.
> 
> You can keep a list of created WebSession objects, all last used pages
> are kept as attribute in the Session object.
> 

Shall I add then new feature request for 6.x? :)

> 
> >
> > >
> > > On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn
> > > <mi...@onior.com>wrote:
> > >
> > > > Recent = "one".
> > > > It would be security issue only if event API has some holes :)
> > > > Anyway it would be quite handy to send for example some info
> > > > events to all logged users.
> > > >
> > > > Best regards,
> > > > Michal Wegrzyn
> > > >
> > > > > -----Original Message-----
> > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > Sent: Thursday, November 29, 2012 15:16
> > > > > To: users@wicket.apache.org
> > > > > Subject: Re: events between pages
> > > > >
> > > > > On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
> > > > > <mi...@onior.com>wrote:
> > > > >
> > > > > > Thanks Martin.
> > > > > >
> > > > > > What is the pageId parameter in
> getPageManager().getPage(pageId)?
> > > > > > Component id or page version id (present in url)?
> > > > > >
> > > > >
> > > > > The id from the url.
> > > > > See Page#getPageReference()
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > > For session I would expect all most recent versions of
> visited
> > > > > > pages for a current user.
> > > > > >
> > > > >
> > > > > Define "recent" :-)
> > > > > One, two, ... more ?
> > > > >
> > > > >
> > > > > > For application the same but for all users.
> > > > > >
> > > > >
> > > > > If a random user can manipulate the pages of the other users
> > > > > would be a security issue, and rude :-)
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > > Best regards,
> > > > > > Michal Wegrzyn
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > > > Sent: Thursday, November 29, 2012 15:01
> > > > > > > To: users@wicket.apache.org
> > > > > > > Subject: Re: events between pages
> > > > > > >
> > > > > > > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > > > > > > <mi...@onior.com>wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I would like to send event from iframe to "parent" page
> > > > > > > > which has multiple iframes.
> > > > > > > >
> > > > > > > > Event framework makes it possible to use application or
> > > > > > > > session
> > > > > as
> > > > > > > > sinks, but event affects only page from which event was
> sent.
> > > > > > > >
> > > > > > > > Why events which have session/application as sinks are
> not
> > > > > > > > propagated to all pages?
> > > > > > > >
> > > > > > >
> > > > > > > Define "all pages".
> > > > > > > For application that could mean all pages for all users
> ever
> > > > > > > used
> > > > > so
> > > > > > > far.
> > > > > > > For session this means all pages in the history of this
> user
> > > > > > > (the data store).
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > Is it possible to workaround it?
> > > > > > > >
> > > > > > >
> > > > > > > You can get any page by its id:
> > > > > > > session.getPageManager().getPage(pageId)
> > > > > > > and use it as a sink.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > Best regards,
> > > > > > > > Michal Wegrzyn
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Martin Grigorov
> > > > > > > jWeekend
> > > > > > > Training, Consulting, Development http://jWeekend.com
> > > > > > > <http://jweekend.com/>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Martin Grigorov
> > > > > jWeekend
> > > > > Training, Consulting, Development http://jWeekend.com
> > > > > <http://jweekend.com/>
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com <http://jweekend.com/>
> >
> 
> 
> 
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

Re: events between pages

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Nov 29, 2012 at 4:28 PM, Michal Wegrzyn <mi...@onior.com>wrote:

>
> > -----Original Message-----
> > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > Sent: Thursday, November 29, 2012 15:43
> > To: users@wicket.apache.org
> > Subject: Re: events between pages
> >
> > You can do this.
> > You can use either wicket-atmosphere or wicket-native-websocket to push
> > data to the clients.
> >
>
> But only with Wicket >=6.0.0.
>
> Is it hard to affect also "all" "recent" (at least for current user) pages
> for events in Wicket?
> That would be a nice feature.
>

New features go only in 6.x anyway.

You can keep a list of created WebSession objects, all last used pages are
kept as attribute in the Session object.


>
> >
> > On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn
> > <mi...@onior.com>wrote:
> >
> > > Recent = "one".
> > > It would be security issue only if event API has some holes :) Anyway
> > > it would be quite handy to send for example some info events to all
> > > logged users.
> > >
> > > Best regards,
> > > Michal Wegrzyn
> > >
> > > > -----Original Message-----
> > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > Sent: Thursday, November 29, 2012 15:16
> > > > To: users@wicket.apache.org
> > > > Subject: Re: events between pages
> > > >
> > > > On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
> > > > <mi...@onior.com>wrote:
> > > >
> > > > > Thanks Martin.
> > > > >
> > > > > What is the pageId parameter in getPageManager().getPage(pageId)?
> > > > > Component id or page version id (present in url)?
> > > > >
> > > >
> > > > The id from the url.
> > > > See Page#getPageReference()
> > > >
> > > >
> > > > >
> > > > >
> > > > > For session I would expect all most recent versions of visited
> > > > > pages for a current user.
> > > > >
> > > >
> > > > Define "recent" :-)
> > > > One, two, ... more ?
> > > >
> > > >
> > > > > For application the same but for all users.
> > > > >
> > > >
> > > > If a random user can manipulate the pages of the other users would
> > > > be a security issue, and rude :-)
> > > >
> > > >
> > > >
> > > > >
> > > > > Best regards,
> > > > > Michal Wegrzyn
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > > Sent: Thursday, November 29, 2012 15:01
> > > > > > To: users@wicket.apache.org
> > > > > > Subject: Re: events between pages
> > > > > >
> > > > > > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > > > > > <mi...@onior.com>wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I would like to send event from iframe to "parent" page which
> > > > > > > has multiple iframes.
> > > > > > >
> > > > > > > Event framework makes it possible to use application or
> > > > > > > session
> > > > as
> > > > > > > sinks, but event affects only page from which event was sent.
> > > > > > >
> > > > > > > Why events which have session/application as sinks are not
> > > > > > > propagated to all pages?
> > > > > > >
> > > > > >
> > > > > > Define "all pages".
> > > > > > For application that could mean all pages for all users ever
> > > > > > used
> > > > so
> > > > > > far.
> > > > > > For session this means all pages in the history of this user
> > > > > > (the data store).
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Is it possible to workaround it?
> > > > > > >
> > > > > >
> > > > > > You can get any page by its id:
> > > > > > session.getPageManager().getPage(pageId)
> > > > > > and use it as a sink.
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Best regards,
> > > > > > > Michal Wegrzyn
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Martin Grigorov
> > > > > > jWeekend
> > > > > > Training, Consulting, Development http://jWeekend.com
> > > > > > <http://jweekend.com/>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Martin Grigorov
> > > > jWeekend
> > > > Training, Consulting, Development
> > > > http://jWeekend.com <http://jweekend.com/>
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

RE: events between pages

Posted by Michal Wegrzyn <mi...@onior.com>.
> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: Thursday, November 29, 2012 15:43
> To: users@wicket.apache.org
> Subject: Re: events between pages
> 
> You can do this.
> You can use either wicket-atmosphere or wicket-native-websocket to push
> data to the clients.
> 

But only with Wicket >=6.0.0.

Is it hard to affect also "all" "recent" (at least for current user) pages for events in Wicket?
That would be a nice feature.

> 
> On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn
> <mi...@onior.com>wrote:
> 
> > Recent = "one".
> > It would be security issue only if event API has some holes :) Anyway
> > it would be quite handy to send for example some info events to all
> > logged users.
> >
> > Best regards,
> > Michal Wegrzyn
> >
> > > -----Original Message-----
> > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > Sent: Thursday, November 29, 2012 15:16
> > > To: users@wicket.apache.org
> > > Subject: Re: events between pages
> > >
> > > On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
> > > <mi...@onior.com>wrote:
> > >
> > > > Thanks Martin.
> > > >
> > > > What is the pageId parameter in getPageManager().getPage(pageId)?
> > > > Component id or page version id (present in url)?
> > > >
> > >
> > > The id from the url.
> > > See Page#getPageReference()
> > >
> > >
> > > >
> > > >
> > > > For session I would expect all most recent versions of visited
> > > > pages for a current user.
> > > >
> > >
> > > Define "recent" :-)
> > > One, two, ... more ?
> > >
> > >
> > > > For application the same but for all users.
> > > >
> > >
> > > If a random user can manipulate the pages of the other users would
> > > be a security issue, and rude :-)
> > >
> > >
> > >
> > > >
> > > > Best regards,
> > > > Michal Wegrzyn
> > > >
> > > > > -----Original Message-----
> > > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > > Sent: Thursday, November 29, 2012 15:01
> > > > > To: users@wicket.apache.org
> > > > > Subject: Re: events between pages
> > > > >
> > > > > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > > > > <mi...@onior.com>wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I would like to send event from iframe to "parent" page which
> > > > > > has multiple iframes.
> > > > > >
> > > > > > Event framework makes it possible to use application or
> > > > > > session
> > > as
> > > > > > sinks, but event affects only page from which event was sent.
> > > > > >
> > > > > > Why events which have session/application as sinks are not
> > > > > > propagated to all pages?
> > > > > >
> > > > >
> > > > > Define "all pages".
> > > > > For application that could mean all pages for all users ever
> > > > > used
> > > so
> > > > > far.
> > > > > For session this means all pages in the history of this user
> > > > > (the data store).
> > > > >
> > > > >
> > > > > >
> > > > > > Is it possible to workaround it?
> > > > > >
> > > > >
> > > > > You can get any page by its id:
> > > > > session.getPageManager().getPage(pageId)
> > > > > and use it as a sink.
> > > > >
> > > > >
> > > > > >
> > > > > > Best regards,
> > > > > > Michal Wegrzyn
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Martin Grigorov
> > > > > jWeekend
> > > > > Training, Consulting, Development http://jWeekend.com
> > > > > <http://jweekend.com/>
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com <http://jweekend.com/>
> >
> 
> 
> 
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

Re: events between pages

Posted by Martin Grigorov <mg...@apache.org>.
You can do this.
You can use either wicket-atmosphere or wicket-native-websocket to push
data to the clients.


On Thu, Nov 29, 2012 at 3:36 PM, Michal Wegrzyn <mi...@onior.com>wrote:

> Recent = "one".
> It would be security issue only if event API has some holes :)
> Anyway it would be quite handy to send for example some info events to all
> logged users.
>
> Best regards,
> Michal Wegrzyn
>
> > -----Original Message-----
> > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > Sent: Thursday, November 29, 2012 15:16
> > To: users@wicket.apache.org
> > Subject: Re: events between pages
> >
> > On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
> > <mi...@onior.com>wrote:
> >
> > > Thanks Martin.
> > >
> > > What is the pageId parameter in getPageManager().getPage(pageId)?
> > > Component id or page version id (present in url)?
> > >
> >
> > The id from the url.
> > See Page#getPageReference()
> >
> >
> > >
> > >
> > > For session I would expect all most recent versions of visited pages
> > > for a current user.
> > >
> >
> > Define "recent" :-)
> > One, two, ... more ?
> >
> >
> > > For application the same but for all users.
> > >
> >
> > If a random user can manipulate the pages of the other users would be a
> > security issue, and rude :-)
> >
> >
> >
> > >
> > > Best regards,
> > > Michal Wegrzyn
> > >
> > > > -----Original Message-----
> > > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > > Sent: Thursday, November 29, 2012 15:01
> > > > To: users@wicket.apache.org
> > > > Subject: Re: events between pages
> > > >
> > > > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > > > <mi...@onior.com>wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I would like to send event from iframe to "parent" page which has
> > > > > multiple iframes.
> > > > >
> > > > > Event framework makes it possible to use application or session
> > as
> > > > > sinks, but event affects only page from which event was sent.
> > > > >
> > > > > Why events which have session/application as sinks are not
> > > > > propagated to all pages?
> > > > >
> > > >
> > > > Define "all pages".
> > > > For application that could mean all pages for all users ever used
> > so
> > > > far.
> > > > For session this means all pages in the history of this user (the
> > > > data store).
> > > >
> > > >
> > > > >
> > > > > Is it possible to workaround it?
> > > > >
> > > >
> > > > You can get any page by its id:
> > > > session.getPageManager().getPage(pageId)
> > > > and use it as a sink.
> > > >
> > > >
> > > > >
> > > > > Best regards,
> > > > > Michal Wegrzyn
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Martin Grigorov
> > > > jWeekend
> > > > Training, Consulting, Development
> > > > http://jWeekend.com <http://jweekend.com/>
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

RE: events between pages

Posted by Michal Wegrzyn <mi...@onior.com>.
Recent = "one".
It would be security issue only if event API has some holes :)
Anyway it would be quite handy to send for example some info events to all logged users.

Best regards,
Michal Wegrzyn

> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: Thursday, November 29, 2012 15:16
> To: users@wicket.apache.org
> Subject: Re: events between pages
> 
> On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn
> <mi...@onior.com>wrote:
> 
> > Thanks Martin.
> >
> > What is the pageId parameter in getPageManager().getPage(pageId)?
> > Component id or page version id (present in url)?
> >
> 
> The id from the url.
> See Page#getPageReference()
> 
> 
> >
> >
> > For session I would expect all most recent versions of visited pages
> > for a current user.
> >
> 
> Define "recent" :-)
> One, two, ... more ?
> 
> 
> > For application the same but for all users.
> >
> 
> If a random user can manipulate the pages of the other users would be a
> security issue, and rude :-)
> 
> 
> 
> >
> > Best regards,
> > Michal Wegrzyn
> >
> > > -----Original Message-----
> > > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > > Sent: Thursday, November 29, 2012 15:01
> > > To: users@wicket.apache.org
> > > Subject: Re: events between pages
> > >
> > > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > > <mi...@onior.com>wrote:
> > >
> > > > Hi,
> > > >
> > > > I would like to send event from iframe to "parent" page which has
> > > > multiple iframes.
> > > >
> > > > Event framework makes it possible to use application or session
> as
> > > > sinks, but event affects only page from which event was sent.
> > > >
> > > > Why events which have session/application as sinks are not
> > > > propagated to all pages?
> > > >
> > >
> > > Define "all pages".
> > > For application that could mean all pages for all users ever used
> so
> > > far.
> > > For session this means all pages in the history of this user (the
> > > data store).
> > >
> > >
> > > >
> > > > Is it possible to workaround it?
> > > >
> > >
> > > You can get any page by its id:
> > > session.getPageManager().getPage(pageId)
> > > and use it as a sink.
> > >
> > >
> > > >
> > > > Best regards,
> > > > Michal Wegrzyn
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com <http://jweekend.com/>
> >
> 
> 
> 
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

Re: events between pages

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Nov 29, 2012 at 3:11 PM, Michal Wegrzyn <mi...@onior.com>wrote:

> Thanks Martin.
>
> What is the pageId parameter in getPageManager().getPage(pageId)?
> Component id or page version id (present in url)?
>

The id from the url.
See Page#getPageReference()


>
>
> For session I would expect all most recent versions of visited pages for a
> current user.
>

Define "recent" :-)
One, two, ... more ?


> For application the same but for all users.
>

If a random user can manipulate the pages of the other users would be a
security issue, and rude :-)



>
> Best regards,
> Michal Wegrzyn
>
> > -----Original Message-----
> > From: Martin Grigorov [mailto:mgrigorov@apache.org]
> > Sent: Thursday, November 29, 2012 15:01
> > To: users@wicket.apache.org
> > Subject: Re: events between pages
> >
> > On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> > <mi...@onior.com>wrote:
> >
> > > Hi,
> > >
> > > I would like to send event from iframe to "parent" page which has
> > > multiple iframes.
> > >
> > > Event framework makes it possible to use application or session as
> > > sinks, but event affects only page from which event was sent.
> > >
> > > Why events which have session/application as sinks are not propagated
> > > to all pages?
> > >
> >
> > Define "all pages".
> > For application that could mean all pages for all users ever used so
> > far.
> > For session this means all pages in the history of this user (the data
> > store).
> >
> >
> > >
> > > Is it possible to workaround it?
> > >
> >
> > You can get any page by its id:
> > session.getPageManager().getPage(pageId)
> > and use it as a sink.
> >
> >
> > >
> > > Best regards,
> > > Michal Wegrzyn
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

RE: events between pages

Posted by Michal Wegrzyn <mi...@onior.com>.
Thanks Martin.

What is the pageId parameter in getPageManager().getPage(pageId)?
Component id or page version id (present in url)?


For session I would expect all most recent versions of visited pages for a current user.
For application the same but for all users.

Best regards,
Michal Wegrzyn

> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigorov@apache.org]
> Sent: Thursday, November 29, 2012 15:01
> To: users@wicket.apache.org
> Subject: Re: events between pages
> 
> On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn
> <mi...@onior.com>wrote:
> 
> > Hi,
> >
> > I would like to send event from iframe to "parent" page which has
> > multiple iframes.
> >
> > Event framework makes it possible to use application or session as
> > sinks, but event affects only page from which event was sent.
> >
> > Why events which have session/application as sinks are not propagated
> > to all pages?
> >
> 
> Define "all pages".
> For application that could mean all pages for all users ever used so
> far.
> For session this means all pages in the history of this user (the data
> store).
> 
> 
> >
> > Is it possible to workaround it?
> >
> 
> You can get any page by its id:
> session.getPageManager().getPage(pageId)
> and use it as a sink.
> 
> 
> >
> > Best regards,
> > Michal Wegrzyn
> >
> 
> 
> 
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

Re: events between pages

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Nov 29, 2012 at 2:56 PM, Michal Wegrzyn <mi...@onior.com>wrote:

> Hi,
>
> I would like to send event from iframe to "parent" page which has multiple
> iframes.
>
> Event framework makes it possible to use application or session as sinks,
> but event affects only page from which event was sent.
>
> Why events which have session/application as sinks are not propagated to
> all pages?
>

Define "all pages".
For application that could mean all pages for all users ever used so far.
For session this means all pages in the history of this user (the data
store).


>
> Is it possible to workaround it?
>

You can get any page by its id: session.getPageManager().getPage(pageId)
and use it as a sink.


>
> Best regards,
> Michal Wegrzyn
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>