You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jörn Zaefferer <jo...@googlemail.com> on 2008/02/19 20:54:29 UTC

(Server-independent) Comet support in Wicket?

Hi,

I've started evaluating Wicket today for an application written from
scratch. First impressions are very well, there is just one
requirement on which I couldn't find enough useful information yet:
Comet support in Wicket or Comet with Wicket.

Before looking at Wicket I tried to use lift which has Comet support
built in (based on Scala Actors). This post
(http://blogs.webtide.com/gregw/2006/07/25/1153845234453.html)
suggests that its not possible to implement scaleable Comet support
within a web framework, instead it must be supported by the
application server, eg. Jetty 6.

Post about Comet and Wicket, eg. this one
(http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg17308.html)
don't give me any actual information about the current state of afairs
(its from 2006, the linked sf.net issue is now private). This issue
(http://wicketstuff.org/jira/browse/DOJO-23) about integration with
cometd isn't too helpful either, I can't find any documentation on
that.

To provide some information on the actual requirements I have: The
architecture must support several both dependent and independent
components on a single page which get updated based on server-events,
be it on schedules or events triggered by other users. While the exact
number of simultaneous users isn't clear yet, up to 10k must be
possible with the appropriate hardware.

Thanks
Jörn Zaefferer

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


Re: (Server-independent) Comet support in Wicket?

Posted by Jörn Zaefferer <jo...@googlemail.com>.
Thanks Erik and Stefan, that helps a lot.

At least I'm now mostly convinced that Jetty 6 continuations are the
way to go for Comet support. wicketstuff-push, based on dojo and
cometd isn't that convincing though. I can't compile wicketstuff-push
because there is no wicketstuff-dojo snapshot, as referenced in the
pom.xml. Also, as a jQuery developer I'd much rather stick with jQuery
instead of relying on dojo, which does way more than just supporting
comet.

The wicketstuff-push project is a good reference for implementing
comet with wicket and jQuery, so it would be quite helpful to get that
running.

Jörn

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


Re: (Server-independent) Comet support in Wicket?

Posted by Stefan Fußenegger <st...@gmx.at>.
wicketstuff-push might be what you are looking for: wicket cometd support
with jetty. but i don't think that anybody has used it with 10k simultaneous
users yet.

see:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-push/
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-push-examples/



Jörn Zaefferer-2 wrote:
> 
> Hi,
> 
> I've started evaluating Wicket today for an application written from
> scratch. First impressions are very well, there is just one
> requirement on which I couldn't find enough useful information yet:
> Comet support in Wicket or Comet with Wicket.
> 
> Before looking at Wicket I tried to use lift which has Comet support
> built in (based on Scala Actors). This post
> (http://blogs.webtide.com/gregw/2006/07/25/1153845234453.html)
> suggests that its not possible to implement scaleable Comet support
> within a web framework, instead it must be supported by the
> application server, eg. Jetty 6.
> 
> Post about Comet and Wicket, eg. this one
> (http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg17308.html)
> don't give me any actual information about the current state of afairs
> (its from 2006, the linked sf.net issue is now private). This issue
> (http://wicketstuff.org/jira/browse/DOJO-23) about integration with
> cometd isn't too helpful either, I can't find any documentation on
> that.
> 
> To provide some information on the actual requirements I have: The
> architecture must support several both dependent and independent
> components on a single page which get updated based on server-events,
> be it on schedules or events triggered by other users. While the exact
> number of simultaneous users isn't clear yet, up to 10k must be
> possible with the appropriate hardware.
> 
> Thanks
> Jörn Zaefferer
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 


-----
-------
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: http://www.nabble.com/%28Server-independent%29-Comet-support-in-Wicket--tp15574656p15589149.html
Sent from the Wicket - User 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: scriptaculous error - Effect is not defined

Posted by Maris Orbidans <sm...@ime.lv>.
  Now I have another error: *TypeError: Effect has no properties*

I have no idea what's wrong because everything worked some time ago. I 
want to highlight a table row when user clicks on a link in that row.

*My code:*

public class ColumnLinkPanel extends Panel
{
private static final Logger log = 
LoggerFactory.getLogger(ColumnLinkPanel.class);

public ColumnLinkPanel(String id, final IModel model)
{
super(id);

Image icon = new Image("detailsIcon",new 
ResourceReference(ColumnLinkPanel.class,"doc.png"));
AjaxLink ajaxLink = new AjaxLink("detailsLink")
{
@Override
public void onClick(AjaxRequestTarget target)
{
ResultDetailsPanel newPanel = new 
ResultDetailsPanel("resultDetailsPanel",model);
findParent(MainPage.class).get("resultDetailsPanel").replaceWith(newPanel.setOutputMarkupId(true)); 

target.addComponent(newPanel);
target.appendJavascript(new 
Effect.Highlight(findParent(OddEvenItem.class)).toJavascript());
}
};

add(ajaxLink.add(icon));
}
}


*From Ajax debug:*

<tbody>
<tr id="id120" class="even">
<td class="timeColumn">
<span>2008.02.20 20:37:57</span>
</td><td class="testColumn">
<span>Tests 1</span>
</td><td class="detailsColumn">
<span>
<a id="detailsLink21" onclick="var 
wcall=wicketAjaxGet('?wicket:interface=:2:resultsPanel:datatable:rows:1:cells:3:cell:detailsLink::IBehaviorListener:0:-1',null,null, 
function() {return Wicket.$('detailsLink21') != 
null;}.bind(this));return !wcall;" href="#"><img 
src="resources/lv.lu.cdzfk.ctests.web.components.ColumnLinkPanel/doc.png" 
border="0"/></a>
</span>
</td>
</tr><tr id="*id222*" class="odd">
<td class="timeColumn">
<span>2008.02.21 04:36:18</span>
</td><td class="testColumn">
<span>Tests 1</span>
</td><td class="detailsColumn">
<span>
<a id="detailsLink23" onclick="var 
wcall=wicketAjaxGet('?wicket:interface=:2:resultsPanel:datatable:rows:2:cells:3:cell:detailsLink::IBehaviorListener:0:-1',null,null, 
function() {return Wicket.$('detailsLink23') != 
null;}.bind(this));return !wcall;" href="#"><img 
src="resources/lv.lu.cdzfk.ctests.web.components.ColumnLinkPanel/doc.png" 
border="0"/></a>
</span>
</td>
</tr>
</tbody>
<tfoot>



</tfoot>
</table>
</div>]]></component></ajax-response>
*INFO: *Response parsed. Now invoking steps...
*INFO: *Response processed successfully.
*INFO: *Invoking post-call handler(s)...
*INFO: *Calling focus on searchButton7
*INFO: *focus set on detailsLink23
*INFO: *
*INFO: *Initiating Ajax GET request on 
?wicket:interface=:2:resultsPanel:datatable:rows:2:cells:3:cell:detailsLink::IBehaviorListener:0:-1&random=0.5963552713915646
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (1081 characters)
*INFO: *
<?xml version="1.0" encoding="UTF-8"?><ajax-response><component 
id="resultDetailsPanel15" ><![CDATA[<div id="resultDetailsPanel15" 
class="contentDiv">
<h1>Detaļas</h1>
<table border="0" id="detailsTable">
<tr>
<td><span>Reakcijas laiks</span></td>
<td><span>78,109,125,156,187,234,250,281,313,344,375,406,437,469,500,516,547,579,609,641,672,703,734,766,797,828,860,875,906,938,969,1000,1031,1062,1094</span></td>
</tr>
<tr>
<td>Rezultāti</td>
<td>
<table border="0">
<tr>
<td><span>Vidējais reakcijas laiks</span></td>
<td><span>582.6 ms</span></td>
</tr>
</table>
</td>
</tr>
</table>
</div>]]></component><evaluate><![CDATA[new Effect.Highlight('*id222*',
{}
);
]]></evaluate></ajax-response>
*INFO: *Response parsed. Now invoking steps...
*ERROR: *Exception evaluating javascript: TypeError: Effect has no 
properties



> Yep.  If your using the effects directly without any of the Ajax
> components, you need to manually add the scriptaculous javascript
> files to your page.
>
> add this code to your page and you should be good to go:
> add(ScriptaculousAjaxBehavior.newJavascriptBinding());
>
> On Thu, Feb 21, 2008 at 12:56 AM, Maris Orbidans <sm...@ime.lv> wrote:
>   
>> hi
>>
>>  I am trying to use wicketstuff-scriptaculous-1.3 latest snapshot but
>>  it's not working.
>>  I have simply included the jar in my app.  Do I need to do anything else
>>  to install scriptaculous support ?
>>
>>  Maris
>>
>>
>>
>>  public class ColumnLinkPanel extends Panel
>>  {
>>
>>     public ColumnLinkPanel(String id, final IModel model)
>>     {
>>         super(id);
>>
>>         Image icon = new Image("detailsIcon",new
>>  ResourceReference(ColumnLinkPanel.class,"doc.png"));
>>         AjaxLink ajaxLink = new AjaxLink("detailsLink")
>>         {
>>             @Override
>>             public void onClick(AjaxRequestTarget target)
>>             {
>>                 ResultDetailsPanel newPanel = new
>>  ResultDetailsPanel("resultDetailsPanel",model);
>>
>>  findParent(MainPage.class).get("resultDetailsPanel").replaceWith(newPanel.setOutputMarkupId(true));
>>                 target.addComponent(newPanel);
>>                 target.appendJavascript(new
>>  Effect.Highlight(this).toJavascript());
>>             }
>>         };
>>
>>         add(ajaxLink.add(icon));
>>     }
>>  }
>>
>>
>>
>>
>>  *INFO: *
>>  <?xml
>>  ............................................
>>                 </tr>
>>             </table>
>>     </div>]]></component><evaluate><![CDATA[new Effect.Highlight('detailsLink11',
>>  {}
>>  );
>>  ]]></evaluate></ajax-response>
>>
>>  *ERROR:
>>  *Exception evaluating javascript: ReferenceError: Effect is not defined
>>
>>  ---------------------------------------------------------------------
>>  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
>
>
>   

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


Re: scriptaculous error - Effect is not defined

Posted by Ryan Sonnek <ry...@gmail.com>.
Yep.  If your using the effects directly without any of the Ajax
components, you need to manually add the scriptaculous javascript
files to your page.

add this code to your page and you should be good to go:
add(ScriptaculousAjaxBehavior.newJavascriptBinding());

On Thu, Feb 21, 2008 at 12:56 AM, Maris Orbidans <sm...@ime.lv> wrote:
> hi
>
>  I am trying to use wicketstuff-scriptaculous-1.3 latest snapshot but
>  it's not working.
>  I have simply included the jar in my app.  Do I need to do anything else
>  to install scriptaculous support ?
>
>  Maris
>
>
>
>  public class ColumnLinkPanel extends Panel
>  {
>
>     public ColumnLinkPanel(String id, final IModel model)
>     {
>         super(id);
>
>         Image icon = new Image("detailsIcon",new
>  ResourceReference(ColumnLinkPanel.class,"doc.png"));
>         AjaxLink ajaxLink = new AjaxLink("detailsLink")
>         {
>             @Override
>             public void onClick(AjaxRequestTarget target)
>             {
>                 ResultDetailsPanel newPanel = new
>  ResultDetailsPanel("resultDetailsPanel",model);
>
>  findParent(MainPage.class).get("resultDetailsPanel").replaceWith(newPanel.setOutputMarkupId(true));
>                 target.addComponent(newPanel);
>                 target.appendJavascript(new
>  Effect.Highlight(this).toJavascript());
>             }
>         };
>
>         add(ajaxLink.add(icon));
>     }
>  }
>
>
>
>
>  *INFO: *
>  <?xml
>  ............................................
>                 </tr>
>             </table>
>     </div>]]></component><evaluate><![CDATA[new Effect.Highlight('detailsLink11',
>  {}
>  );
>  ]]></evaluate></ajax-response>
>
>  *ERROR:
>  *Exception evaluating javascript: ReferenceError: Effect is not defined
>
>  ---------------------------------------------------------------------
>  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


scriptaculous error - Effect is not defined

Posted by Maris Orbidans <sm...@ime.lv>.
hi

I am trying to use wicketstuff-scriptaculous-1.3 latest snapshot but 
it's not working.
I have simply included the jar in my app.  Do I need to do anything else 
to install scriptaculous support ?

Maris



public class ColumnLinkPanel extends Panel
{

    public ColumnLinkPanel(String id, final IModel model)
    {
        super(id);
       
        Image icon = new Image("detailsIcon",new 
ResourceReference(ColumnLinkPanel.class,"doc.png"));
        AjaxLink ajaxLink = new AjaxLink("detailsLink")
        {
            @Override
            public void onClick(AjaxRequestTarget target)
            {
                ResultDetailsPanel newPanel = new 
ResultDetailsPanel("resultDetailsPanel",model);
                
findParent(MainPage.class).get("resultDetailsPanel").replaceWith(newPanel.setOutputMarkupId(true));
                target.addComponent(newPanel);
                target.appendJavascript(new 
Effect.Highlight(this).toJavascript());
            }
        };
       
        add(ajaxLink.add(icon));
    }
}




*INFO: *
<?xml
............................................
                </tr>            
            </table>
    </div>]]></component><evaluate><![CDATA[new Effect.Highlight('detailsLink11', 
{}
);
]]></evaluate></ajax-response>

*ERROR: 
*Exception evaluating javascript: ReferenceError: Effect is not defined

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


Re: where is wicket-contrib-tinymce ???

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
its also in maven repo:

http://wicketstuff.org/maven/repository/org/wicketstuff/wicket-contrib-tinymce/

Java Programmer wrote:
> On Feb 20, 2008 10:42 PM, Maris Orbidans <sm...@ime.lv> wrote:
>   
>> where is wicket-contrib-tinymce project and svn repo ?
>>
>> it's not even mentioned in this page
>>
>> http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki
>>     
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-tinymce
>
> Adr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>   

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


Re: where is wicket-contrib-tinymce ???

Posted by Java Programmer <jp...@gmail.com>.
On Feb 20, 2008 10:42 PM, Maris Orbidans <sm...@ime.lv> wrote:
> where is wicket-contrib-tinymce project and svn repo ?
>
> it's not even mentioned in this page
>
> http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-tinymce

Adr

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


where is wicket-contrib-tinymce ???

Posted by Maris Orbidans <sm...@ime.lv>.
where is wicket-contrib-tinymce project and svn repo ?

it's not even mentioned in this page

http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki


Maris

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


Re: (Server-independent) Comet support in Wicket?

Posted by Erik van Oosten <e....@grons.nl>.
Jörn Zaefferer wrote:
> On Feb 20, 2008 3:50 AM, Erik van Oosten <er...@grons.nl> wrote:
>   
>> Jörn Zaefferer wrote:
>>     
>>> ... The
>>> architecture must support several both dependent and independent
>>> components on a single page which get updated based on server-events,
>>> be it on schedules or events triggered by other users.
>>>       
>> Wicket currently support updates through timers on the client side.
>>     
>
> Can you point me at a resource that provides some details on that?
>   

http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/ajax/AjaxSelfUpdatingTimerBehavior.html
I've never used it. But I guess you'll just do something like:

Component p  = new MyPanel("mypanelid");
add(p);
p.setOutputMarkupId(true);
p.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(2));

The component will now re-render itself every 2 seconds.

>>>  While the exact
>>> number of simultaneous users isn't clear yet, up to 10k must be
>>> possible with the appropriate hardware.
>>>
>>>       
>> That is quite huge, for any framework. Because of the way Wicket uses
>> the HTTP session, you are probably best of with a Terracotta cluster.
>>     
>
> To that regard: Is there a document that describes Wicket
> architecture? It looks like I need a good understand of the session
> usage when dealing larger number of users.
>   
Yes, that would be essential (as with any framework).

Important reads:
http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/protocol/http/pagestore/DiskPageStore.html
http://www.nabble.com/DiskPageStore-improvements-for-1.3.1-p14711582.html
http://cwiki.apache.org/WICKET/wicket-inside.html

I did not yet find a link that explains what Wicket puts in the session. 
But basically (in Wicket 1.3) it is the entire component tree instance 
of the last page that was rendered to the user (including all model 
instances, but excluding data in detachable models). Nothing else goes 
to the session.
The page does not go the session when it includes bookmarkable links 
only (which is very rare). Another use case that is supported is login 
forms. (For both: look up stateless pages).

Regards,
    Erik.


--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/

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


Re: (Server-independent) Comet support in Wicket?

Posted by Jörn Zaefferer <jo...@googlemail.com>.
On Feb 20, 2008 3:50 AM, Erik van Oosten <er...@grons.nl> wrote:
> Jörn Zaefferer wrote:
> > ... The
> > architecture must support several both dependent and independent
> > components on a single page which get updated based on server-events,
> > be it on schedules or events triggered by other users.
> Wicket currently support updates through timers on the client side.

Can you point me at a resource that provides some details on that?

>
> >  While the exact
> > number of simultaneous users isn't clear yet, up to 10k must be
> > possible with the appropriate hardware.
> >
> That is quite huge, for any framework. Because of the way Wicket uses
> the HTTP session, you are probably best of with a Terracotta cluster.

To that regard: Is there a document that describes Wicket
architecture? It looks like I need a good understand of the session
usage when dealing larger number of users.

Thanks
Jörn

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


Re: (Server-independent) Comet support in Wicket?

Posted by Erik van Oosten <er...@grons.nl>.
Jörn Zaefferer wrote:
> ... The
> architecture must support several both dependent and independent
> components on a single page which get updated based on server-events,
> be it on schedules or events triggered by other users.
Wicket currently support updates through timers on the client side.

>  While the exact
> number of simultaneous users isn't clear yet, up to 10k must be
> possible with the appropriate hardware.
>   
That is quite huge, for any framework. Because of the way Wicket uses 
the HTTP session, you are probably best of with a Terracotta cluster.

Regards,
    Erik.

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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