Hi Xavier, thanks for the reply. no do not have commit access to the wicketstuff svn, but I just applied for it in the Wicket-Dev mailinglist as described in the wicket-stuff FAQ.
thanks again, regards Michael Xavier Hanin wrote: > > On 11/6/07, Michael Sparer <[EMAIL PROTECTED]> wrote: >> >> >> Salut Xavier, > > > Hallo Michael, > > I was wondering if I could/should commit the changes I made to wicketstuff >> push to the svn. In brief, this is what I did: >> >> 1. Extended the CometdDefaultBehaviorTemplate.js with the following if >> clause >> var doRoundTrip = "true"; >> if(prop == "script") { >> doRoundTrip = "false"; >> eval(message.data[prop]); >> } else { >> addToUrl = addToUrl + "&" + prop + "=" + message.data[prop]; // this >> line was there before >> } >> if (doRoundTrip) { >> var wcall=wicketAjaxGet('${url}' + addToUrl, function() { }, >> function() >> { }); >> } >> >> This makes it possible to send javascript code as String to the client >> without doing a roundtrip to the server to retrieve the >> wicket-components. >> The JS just checks if the property is named "script" and then executes >> the >> javascript. This is meant for cases when you just want to make minor >> changes >> to the DOM and/or reduce traffic. >> >> 2. Created a new ChannelEvent and a new ChannelListener for the mentioned >> "javascript only" channel events >> >> Please tell me what you think about it. > > > This sounds like an interesting change, go ahead, commit your changes, I'm > pretty sure Vincent won't object (and svn revert is always here in case of > problem). Are you already a committer on wicket stuff? > > Xavier > > regards >> >> >> Xavier Hanin wrote: >> > >> > On 10/25/07, Michael Sparer <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> Hi Xavier, >> >> >> >> thanks for your effort but please don't take too much time >> investigating >> >> my >> >> issues :-) >> >> >> >> I'm using wicket 1.3.0-beta3 and wicketstuff push... well since it >> >> doesn't >> >> show the svn version numbers the version of monday this week. >> > >> > >> > This is very similar to what I use (with a new version of >> wicketstuff-push >> > I >> > pushed on tuesday I think, which fixes a problem with backward button). >> > But >> > if you use the dojo based implementation, I can't speak much about it >> > since >> > Vincent did all the job. >> > >> > Yesterday I >> >> had a more thorough look into what's exactly happening i.e. how the >> push >> >> project interacts with the wicketstuff dojo project and integrates >> >> cometd. >> >> There I found out that in order to communicate with wicket there's an >> >> extra >> >> round trip to the server taking place. So the channel sends a message >> to >> >> the >> >> client-javascript (including the data to be shown on page) which then >> >> makes >> >> an ajax call back to the server where the data gets rendered into xml >> and >> >> is >> >> then shown on the page. I wondered if that was intentional and if yes, >> >> what >> >> purpose it serves. >> > >> > >> > From my understanding (but I didn't develop this) the problem is that >> it's >> > not straightforward to render a wicket component outside a web request, >> so >> > the additional cycle is there to call the rendering in a "normal" web >> > request: comet is only used to detect there is something to refresh, >> then >> > the refresh is done with a usual wicket ajax call. But I may be >> wrong... >> > >> > For my project I've changed the java-script function which starts the >> AJAX >> >> call sothat it renderes the message to proper javascript and directly >> >> inserts it in the document's DOM without making an additional call. >> This >> >> however, makes the server site less flexible as only a javascript >> string >> >> can >> >> be processed on client site - but that's ok for my app. >> > >> > >> > Indeed if you don't need component rendering reducing the cycles is >> > better. >> > I had plan to work on a comet based implementation of IPushService some >> > time >> > ago, but I've never found the time... If I do one day I'll try to >> reduce >> > the >> > cycles to as less as possible, and I may also have to review some >> > component >> > refresing concepts, like refreshing a RepeatingView when only one line >> has >> > been added. The only easy way to do this for the moment is to add the >> > component to the target request, but then the whole component is >> rendered >> > and sent to the client. Having something finer would be nice. But >> that's >> > only ideas, and I'm really lacking of time. >> > >> > Xavier >> > >> > Xavier Hanin wrote: >> >> > >> >> > Michael, >> >> > >> >> > As I said I don't use the ChannelService myself, but I used to have >> >> > similar >> >> > troubles with the PushService, which I think I finally fixed, but it >> >> > wasn't >> >> > easy. Since the fix is in TimerChannelBehavior (which is used by >> both >> >> the >> >> > push and channel timer based implementation, it should work for >> both, >> >> but >> >> > I >> >> > haven't tested. Can I ask which version of wicket and >> wicketstuff-push >> >> > you're using, and also which implementation of IChannelService? If >> you >> >> > want >> >> > to investigate in the code, the core of the fix relies on the >> redirect >> >> and >> >> > setRedirectId in TimerChannelBehavior. >> >> > >> >> > Xavier >> >> > >> >> > On 10/24/07, Michael Sparer <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> >> >> >> Hi Xavier, >> >> >> >> >> >> first of all thank you for the effort you've done for the >> >> push-project. >> >> >> Up >> >> >> to now it really provided the features I need for my app. But now >> I'm >> >> >> kind >> >> >> of stuck. My problem is: I have two panels on one page. Both panel >> >> >> subscribe >> >> >> themselves as ChannelListener for the same channel. But >> unfortunately >> >> >> whenever an event invoking the listeners occurred, the onEvent >> method >> >> >> gets >> >> >> executed twice on both listeners (i.e. four times). It occurrs only >> if >> >> >> you >> >> >> have two panels i.e. two listeners on the same page. >> >> >> >> >> >> IMO the error is somewhere in the javascript where a function gets >> >> >> executed >> >> >> twice...but I haven't found it so far. So do you have any clue? >> >> >> >> >> >> thanks >> >> >> >> >> >> Michael >> >> >> >> >> >> Xavier Hanin wrote: >> >> >> > >> >> >> > On 10/23/07, Michael Sparer <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> >> >> >> >> >> >> Hi Xavier, >> >> >> >> >> >> >> >> thanks for your reply - well yes, that's certainly right. I've >> just >> >> >> lost >> >> >> >> sight of it. But I got another question: how stable is the >> >> >> >> wicketstuff-push >> >> >> >> project or what sections are stable and which have to be >> improved >> >> for >> >> >> use >> >> >> >> in >> >> >> >> a professional webapp? >> >> >> > >> >> >> > >> >> >> > AFAIK wicketstuff-push is developed by vincent demay and myself. >> >> >> Vincent >> >> >> > worked on the cometd channel implementation, and I've worked >> mostly >> >> on >> >> >> the >> >> >> > timer based IPushService implementation (where events do not come >> >> from >> >> >> the >> >> >> > client at all). I don't know how stable is the channel >> >> implementation >> >> >> > since >> >> >> > I don't use it myself, maybe Vincent could give more details (not >> >> sure >> >> >> if >> >> >> > it's used in production or not). For the IPushService >> >> implementation, >> >> >> it >> >> >> > still requires more testing and improvements, because the problem >> is >> >> >> not >> >> >> > easy to solve with a timer based polling implementation: we have >> to >> >> >> detect >> >> >> > clients disconnection, and also handle back button where pages go >> >> back >> >> >> to >> >> >> > life from the a serialized form. And we also need to work on a >> comet >> >> >> based >> >> >> > implementation of this push service. So I think there's still >> need >> >> for >> >> >> > improvement and bug fixing in this section. >> >> >> > >> >> >> > BTW, I've just checked in an improvement about this problem of >> page >> >> >> > deserialization which required an API change for the >> IPushService. >> >> If >> >> >> you >> >> >> > plan to use it, do not forget to do an svn update. >> >> >> > >> >> >> > Xavier >> >> >> > >> >> >> > thanks in advance >> >> >> >> >> >> >> >> Michael >> >> >> >> >> >> >> >> Xavier Hanin wrote: >> >> >> >> > >> >> >> >> > On 10/22/07, Michael Sparer <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Hi, >> >> >> >> >> >> >> >> >> >> today I wondered if there's a wicket-approach for pushing >> >> messages >> >> >> >> from >> >> >> >> >> the >> >> >> >> >> server to the client (also called reverse ajax or pushlets). >> >> Well >> >> >> yes, >> >> >> >> >> there >> >> >> >> >> is one called wicketstuff push. I looked at its examples and >> >> soon >> >> >> >> managed >> >> >> >> >> to >> >> >> >> >> implement my own pushing stuff. In the examples >> (chat-example) >> >> >> >> however, >> >> >> >> >> the >> >> >> >> >> ChannelService that delivers the messages to its listeners, >> is >> >> >> stored >> >> >> >> in >> >> >> >> >> the >> >> >> >> >> application. I.e. there is only one channel for the whole >> >> >> application. >> >> >> >> >> Now imagine I want to create an additional private-chat-room >> for >> >> >> two >> >> >> >> >> users >> >> >> >> >> --> I'd need a ChannelService only for two users. So my >> question >> >> >> is: >> >> >> >> >> what's >> >> >> >> >> the wicket way to pass and store such an object which is >> >> applicable >> >> >> >> only >> >> >> >> >> for >> >> >> >> >> two users (sessions)? >> >> >> >> > >> >> >> >> > >> >> >> >> > You can use an application wide ChannelService and use the >> >> channel >> >> >> name >> >> >> >> > ("chat/message" in the example) to isolate messages by >> >> >> >> private-chat-room. >> >> >> >> > >> >> >> >> > Xavier >> >> >> >> > >> >> >> >> > Thanks in advance >> >> >> >> >> >> >> >> >> >> Michael >> >> >> >> >> >> >> >> >> >> -- >> >> >> >> >> View this message in context: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> http://www.nabble.com/wicketstuff-push-and-sharing-an-IChannelService-tf4671463.html#a13345278 >> >> >> >> >> Sent from the Wicket - User mailing list archive at >> Nabble.com >> . >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >> > >> >> >> >> > -- >> >> >> >> > Xavier Hanin - Independent Java Consultant >> >> >> >> > http://xhab.blogspot.com/ >> >> >> >> > http://ant.apache.org/ivy/ >> >> >> >> > http://www.xoocode.org/ >> >> >> >> > >> >> >> >> > >> >> >> >> >> >> >> >> -- >> >> >> >> View this message in context: >> >> >> >> >> >> >> >> >> >> http://www.nabble.com/wicketstuff-push-and-sharing-an-IChannelService-tf4671463.html#a13358479 >> >> >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > Xavier Hanin - Independent Java Consultant >> >> >> > http://xhab.blogspot.com/ >> >> >> > http://ant.apache.org/ivy/ >> >> >> > http://www.xoocode.org/ >> >> >> > >> >> >> > >> >> >> >> >> >> -- >> >> >> View this message in context: >> >> >> >> >> >> http://www.nabble.com/wicketstuff-push-and-sharing-an-IChannelService-tf4671463.html#a13381208 >> >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > Xavier Hanin - Independent Java Consultant >> >> > http://xhab.blogspot.com/ >> >> > http://ant.apache.org/ivy/ >> >> > http://www.xoocode.org/ >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/wicketstuff-push-and-sharing-an-IChannelService-tf4671463.html#a13401455 >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > -- >> > Xavier Hanin - Independent Java Consultant >> > http://xhab.blogspot.com/ >> > http://ant.apache.org/ivy/ >> > http://www.xoocode.org/ >> > >> > >> >> >> ----- >> Michael Sparer >> http://talk-on-tech.blogspot.com >> -- >> View this message in context: >> http://www.nabble.com/wicketstuff-push-and-sharing-an-IChannelService-tf4671463.html#a13612887 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > Xavier Hanin - Independent Java Consultant > http://xhab.blogspot.com/ > http://ant.apache.org/ivy/ > http://www.xoocode.org/ > > ----- Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicketstuff-push-and-sharing-an-IChannelService-tf4671463.html#a13644180 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]