Wicket 1.5 - new browser window support & detection

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Wicket 1.5 - new browser window support & detection

David Rain
Hi,

I have a question about multi window (mutli tab) support in Wicket 1.5+. Many things changed .. like concept of IDs and versions... these are now only simple IDs, etc.
My quetion is how do I enable multi window support in 1.5? There is no IPgaeSettings#setAutomaticMultiWindowSupport.
The second question is if I can be informed about the fact that new window was opened. There used to be INewBrowserWindowListener. But no it is gone. I've seen issue about it but no reactions https://issues.apache.org/jira/browse/WICKET-4308

Thanks for answers.
Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5 - new browser window support & detection

Andrea Del Bene-2
AFAIK multi tabs/windows support is enabled by default, you don't need
to do anything to enable it.

> Hi,
>
> I have a question about multi window (mutli tab) support in Wicket 1.5+.
> Many things changed .. like concept of IDs and versions... these are now
> only simple IDs, etc.
> My quetion is how do I enable multi window support in 1.5? There is no
> IPgaeSettings#setAutomaticMultiWindowSupport.
> The second question is if I can be informed about the fact that new window
> was opened. There used to be INewBrowserWindowListener. But no it is gone.
> I've seen issue about it but no reactions
> https://issues.apache.org/jira/browse/WICKET-4308
>
> Thanks for answers.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-new-browser-window-support-detection-tp4582538p4582538.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5 - new browser window support & detection

David Rain
OK, I also think so.
But I really need to detect the fact, that new window was opened. The Listener was perfect... I wonder why it has been removed?
Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5 - new browser window support & detection

Martin Grigorov-4
Hi David,

What is your use case ?
How do you use this callback method ?

On Tue, Apr 24, 2012 at 12:13 PM, David Rain <[hidden email]> wrote:

> OK, I also think so.
> But I really need to detect the fact, that new window was opened. The
> Listener was perfect... I wonder why it has been removed?
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-new-browser-window-support-detection-tp4582538p4582816.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5 - new browser window support & detection

David Rain
Hello Martin!

I do not use it right now but I would like to. I knew it was there because I've studied API and sources of Wicket. But it was in time we used Wicket 1.4 and I knew I came across this onNewBrowserWindow method and many classes implemented it http://wicket.apache.org/apidocs/1.4/index.html?org/apache/wicket/markup/html/INewBrowserWindowListener.html

Now it is gone (we use Wicket 1.5.5 now). We have an application that is completely AJAX like. Only 2 page (login & main) a the content inside is switched (via replace methods and AjaxRequestTarget#add). But - as far as security is concerned - we have to logout user and destroy session when he opens another window or tab. That's a rule we cannot break. So I need some detection of "new window opened" event.
I use logout and session invalidation in onConfigure now - the main page is rendered only once, everything is made via AJAX calls then. Thus another render attempt means that user opened new window or tab (but he could have also pressed F5 -> and it would end in logout too, but in this case we do not want it - that's why I said it's just a temporary workaround).

Thanks for any ideas.

David
Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5 - new browser window support & detection

Martin Grigorov-4
Hi David,

I just attached a demo app with a behavior to
https://issues.apache.org/jira/browse/WICKET-4308 that implements the
requested functionality.
Please try it and give feedback.

On Thu, Apr 26, 2012 at 8:30 AM, David Rain <[hidden email]> wrote:

> Hello Martin!
>
> I do not use it right now but I would like to. I knew it was there because
> I've studied API and sources of Wicket. But it was in time we used Wicket
> 1.4 and I knew I came across this onNewBrowserWindow method and many classes
> implemented it
> http://wicket.apache.org/apidocs/1.4/index.html?org/apache/wicket/markup/html/INewBrowserWindowListener.html
>
> Now it is gone (we use Wicket 1.5.5 now). We have an application that is
> completely AJAX like. Only 2 page (login & main) a the content inside is
> switched (via replace methods and AjaxRequestTarget#add). But - as far as
> security is concerned - we have to logout user and destroy session when he
> opens another window or tab. That's a rule we cannot break. So I need some
> detection of "new window opened" event.
> I use logout and session invalidation in onConfigure now - the main page is
> rendered only once, everything is made via AJAX calls then. Thus another
> render attempt means that user opened new window or tab (but he could have
> also pressed F5 -> and it would end in logout too, but in this case we do
> not want it - that's why I said it's just a temporary workaround).
>
> Thanks for any ideas.
>
> David
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-new-browser-window-support-detection-tp4582538p4588927.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5 - new browser window support & detection

David Rain
Works great man!
Honestly, I wanted to write somekind of javascript like yours but I thought that something like this must already be in Wicket to support multiple window instances (and I am sure that it was there in W 1.4).
Nevertheless, thank you very much!
David
Reply | Threaded
Open this post in threaded view
|

Re: Wicket 1.5 - new browser window support & detection

Martin Grigorov-4
Good!
Wicket 1.4 implements this a bit differently and honestly I don't
quite understand how it works exactly.
My version requires Ajax behavior, this is OK for your case but may
not be OK for other people...
Let's see what the reporter of the ticket thinks about it and then we
can discuss adding it in Wicket officially.

On Thu, Apr 26, 2012 at 2:47 PM, David Rain <[hidden email]> wrote:

> Works great man!
> Honestly, I wanted to write somekind of javascript like yours but I thought
> that something like this must already be in Wicket to support multiple
> window instances (and I am sure that it was there in W 1.4).
> Nevertheless, thank you very much!
> David
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-new-browser-window-support-detection-tp4582538p4589586.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]