Hi,

I have modified wicket-atmosphere example with sending messages, to display
a browser (DataView) with all received messages. So when user sends a
message (String) it will be added to list of messages stored in a page and
the browser is refreshed. There is a strange behavior when we open two
browser tabs (FF 28, Wicket 6.15.0, Wicket-Atmosphere 0.18).

1. Start example app and opens home page in two tabs:
   tab0 = http://localhost:8080/app/?0
   tab1 = http://localhost:8080/app/?1
2. Enter "1" in input field on tab0, click "Send message". Both tabs
receive "1" message and it will be displayed in a browser.
3. Send "2" in tab0:
- on tab1 browser displays 2 rows: 2, 1
- on tab0 browser displays only 1 row: 2
4. Test sending another messages on tab0 or tab1 - you will see that not
all messages are received.

It looks like a problem with page versioning or something similar. The list
of messages (messages field in a page) is not properly restored in
following requests. Here is a simple log from example app using above
scenario:

- sending 1
BEFORE: 1, messages=[]
AFTER: 1, messages=[1]
BEFORE: 1, messages=[]
AFTER: 1, messages=[1]
- sending 2
BEFORE: 2, messages=[1]
AFTER: 2, messages=[2, 1]
BEFORE: 2, messages=[]
AFTER: 2, messages=[2]

As you can see a list of messages on one tab becomes empty on the second
send. You can try to send messages from tab0 or tab1 and you should see
that strange behavior (messages list is not updated properly).

Is it a bug or maybe it is something wrong in my example? Maybe I should
turn on (somehow) multiple tabs support, there is such setting in Wicket
1.4 but in Wicket 6 I belive there is not necessary to configure such
support in any special way?

BTW: Why in the original example page versioning is disabled:
setVersioned(false); ?


Example project:
https://dl.dropboxusercontent.com/u/138504/wicket-atmosphere-tabs-example.zip

--
Best regards,
Daniel

Reply via email to