You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sfwicket <li...@bgb.net> on 2012/09/17 22:13:00 UTC

Wicket 6 Websocket Example

Is there a working Wicket 6.0.0 Websocket example written in Java? The  
only demo provided here on the wiki page is written in Scala.

https://cwiki.apache.org/WICKET/wicket-native-websockets.html

The other demo I found has outdated dependencies on Wicket  
6.0-SNAPSHOT and wicket-native-websocket-tomcat 0.1-SNAPSHOT and will  
not compile after altering these dependencies to 6.0.0 and 0.2  
respectively.

Can someone point me to a working Wicket 6.0.0 Websocket demo?

Thanks!


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


Re: Wicket 6 Websocket Example

Posted by Martin Grigorov <mg...@apache.org>.
On Tue, Sep 18, 2012 at 12:31 AM, sfwicket <li...@bgb.net> wrote:
>
> Thanks... the Tomcat artifact could be switched to 0.2 as well - I know its
> commented out but would make it easier switching from Jetty to Tomcat.

Done.

>
>
> Curious though in the example, ChartsResourceReference.java:
>
>
> JavaScriptHeaderItem.forReference(WicketWebSocketJQueryResourceReference.get())
>
> presumably adds:
>
>
>
> to the header, but it also seems that by adding a WebSocketBehavior to the
> Panel, this is automatically included. Just trying to figure the bare
> minimum to get a WebsocketBehavior to work. Is adding this resource
> reference necessary?
>

Wicket filters duplicate header contributions. This way both of them
declare that they depend on wicket-websocket-jquery.js but only one
contribution is actually done.

> Thanks
>
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Websocket-Example-tp4652059p4652067.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



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

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


Re: Wicket 6 Websocket Example

Posted by sfwicket <li...@bgb.net>.
Thanks... the Tomcat artifact could be switched to 0.2 as well - I know its
commented out but would make it easier switching from Jetty to Tomcat.


Curious though in the example, ChartsResourceReference.java:

   
JavaScriptHeaderItem.forReference(WicketWebSocketJQueryResourceReference.get())

presumably adds:



to the header, but it also seems that by adding a WebSocketBehavior to the
Panel, this is automatically included. Just trying to figure the bare
minimum to get a WebsocketBehavior to work. Is adding this resource
reference necessary?

Thanks





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Websocket-Example-tp4652059p4652067.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket 6 Websocket Example

Posted by Martin Grigorov <mg...@apache.org>.
Good!
I've updated the code of the demo apps in my repository.

On Mon, Sep 17, 2012 at 11:57 PM, sfwicket <li...@bgb.net> wrote:
>
> got it - thanks!
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Websocket-Example-tp4652059p4652064.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



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

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


Re: Wicket 6 Websocket Example

Posted by sfwicket <li...@bgb.net>.
got it - thanks!



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Websocket-Example-tp4652059p4652064.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket 6 Websocket Example

Posted by Martin Grigorov <mg...@apache.org>.
This class has been renamed to UrlResourceReference. Remove 'External'
and it should work.

On Mon, Sep 17, 2012 at 11:41 PM, sfwicket <li...@bgb.net> wrote:
>
>
>
> ChartsResourceReference.java will not compile with a missing import on:
>
> import org.apache.wicket.request.resource.ExternalUrlResourceReference;
>
> This is with the Wicket version set in the pom.xml as either 6.0-SNAPSHOT
> (as it currently is) or changing it to 6.0.0.
>
> also, the pom.xml will not resolve this dependency:
>
>                 <dependency>
>                         <groupId>org.apache.wicket</groupId>
>
> <artifactId>wicket-native-websocket-tomcat</artifactId>
>                         <version>0.1-SNAPSHOT</version>
>                 </dependency>
>
> but I found version 0.2 or 0.3-SNAPSHOT do resolve. similarly for the
> wicket-native-websocket-jetty artifact.
>
>
>
> Quoting Martin Grigorov <mg...@apache.org>:
>
>> Hi,
>>
>> http://wicketinaction.com/2012/07/wicket-6-native-websockets/
>>
>> This is the Java example.
>> What is the problem with compiling it ?
>>
>> On Mon, Sep 17, 2012 at 11:13 PM, sfwicket <li...@bgb.net> wrote:
>>>
>>>
>>> Is there a working Wicket 6.0.0 Websocket example written in Java? The
>>> only
>>> demo provided here on the wiki page is written in Scala.
>>>
>>> https://cwiki.apache.org/WICKET/wicket-native-websockets.html
>>>
>>> The other demo I found has outdated dependencies on Wicket 6.0-SNAPSHOT
>>> and
>>> wicket-native-websocket-tomcat 0.1-SNAPSHOT and will not compile after
>>> altering these dependencies to 6.0.0 and 0.2 respectively.
>>>
>>> Can someone point me to a working Wicket 6.0.0 Websocket demo?
>>>
>>> Thanks!
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



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

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


Re: Wicket 6 Websocket Example

Posted by sfwicket <li...@bgb.net>.


ChartsResourceReference.java will not compile with a missing import on:

import org.apache.wicket.request.resource.ExternalUrlResourceReference;

This is with the Wicket version set in the pom.xml as either  
6.0-SNAPSHOT (as it currently is) or changing it to 6.0.0.

also, the pom.xml will not resolve this dependency:

		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket-native-websocket-tomcat</artifactId>
			<version>0.1-SNAPSHOT</version>
		</dependency>

but I found version 0.2 or 0.3-SNAPSHOT do resolve. similarly for the  
wicket-native-websocket-jetty artifact.


Quoting Martin Grigorov <mg...@apache.org>:

> Hi,
>
> http://wicketinaction.com/2012/07/wicket-6-native-websockets/
>
> This is the Java example.
> What is the problem with compiling it ?
>
> On Mon, Sep 17, 2012 at 11:13 PM, sfwicket <li...@bgb.net> wrote:
>>
>> Is there a working Wicket 6.0.0 Websocket example written in Java? The only
>> demo provided here on the wiki page is written in Scala.
>>
>> https://cwiki.apache.org/WICKET/wicket-native-websockets.html
>>
>> The other demo I found has outdated dependencies on Wicket 6.0-SNAPSHOT and
>> wicket-native-websocket-tomcat 0.1-SNAPSHOT and will not compile after
>> altering these dependencies to 6.0.0 and 0.2 respectively.
>>
>> Can someone point me to a working Wicket 6.0.0 Websocket demo?
>>
>> Thanks!
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



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


Re: Wicket 6 Websocket Example

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

http://wicketinaction.com/2012/07/wicket-6-native-websockets/

This is the Java example.
What is the problem with compiling it ?

On Mon, Sep 17, 2012 at 11:13 PM, sfwicket <li...@bgb.net> wrote:
>
> Is there a working Wicket 6.0.0 Websocket example written in Java? The only
> demo provided here on the wiki page is written in Scala.
>
> https://cwiki.apache.org/WICKET/wicket-native-websockets.html
>
> The other demo I found has outdated dependencies on Wicket 6.0-SNAPSHOT and
> wicket-native-websocket-tomcat 0.1-SNAPSHOT and will not compile after
> altering these dependencies to 6.0.0 and 0.2 respectively.
>
> Can someone point me to a working Wicket 6.0.0 Websocket demo?
>
> Thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



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

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