Wicket
  1. Wicket
  2. WICKET-363

Push behavior to handle server side events

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-beta1
    • Fix Version/s: 6.0.0-beta2
    • Component/s: wicket
    • Labels:
      None

      Description

      It would be nice to have some kind of server side push mechanism in wicket. Something similar to what is possible with AjaxRequestTarget, but triggered by server side events instead of client side events.

      I've already discussed that on the user mailing list:
      http://www.nabble.com/server-side-triggered-page-refresh-%28aka-push%29-tf3321420.html#a9234009
      http://www.nabble.com/Pushing-data-to-the-Ajax-client-in-wicket--tf3354017.html

      I will attach a patch implementing a basic push behavior.

      1. push-wicket-patch.txt
        14 kB
        Xavier Hanin
      2. push-wicket-examples-patch.txt
        8 kB
        Xavier Hanin

        Issue Links

          Activity

          Hide
          Xavier Hanin added a comment -

          Attached a patch to wicket-1.x branch for both wicket and wicket-examples projects.

          I've added the feature in wicket directly, but it doesn't require any change in wicket, so it could be in wicket-extensions or even in wicket stuff. But I thought it was small and simple enough to find its way here.

          Show
          Xavier Hanin added a comment - Attached a patch to wicket-1.x branch for both wicket and wicket-examples projects. I've added the feature in wicket directly, but it doesn't require any change in wicket, so it could be in wicket-extensions or even in wicket stuff. But I thought it was small and simple enough to find its way here.
          Hide
          Johan Compagner added a comment -

          this is just polling yes? (so just as our clock example)

          Show
          Johan Compagner added a comment - this is just polling yes? (so just as our clock example)
          Hide
          Xavier Hanin added a comment -

          Yes, this is just polling, but with a simple API that makes the user see it as a push mechanism. If you look at the example you can see that it doesn't look like polling (whlie the clock example is really a polling example). The user really has the feeling to push things, but they are actually pushed only when the client poll. But since you rely on an interface, switching to a cometd implementation is easy (if a cometd impl is available for your server).

          Show
          Xavier Hanin added a comment - Yes, this is just polling, but with a simple API that makes the user see it as a push mechanism. If you look at the example you can see that it doesn't look like polling (whlie the clock example is really a polling example). The user really has the feeling to push things, but they are actually pushed only when the client poll. But since you rely on an interface, switching to a cometd implementation is easy (if a cometd impl is available for your server).
          Hide
          Alastair Maw added a comment -

          Sorry, 1.4.0 for this.

          Show
          Alastair Maw added a comment - Sorry, 1.4.0 for this.
          Hide
          Emond Papegaaij added a comment -

          Wicket 6 now features an experimental module that integrates the Atmosphere framework (wicket-atmosphere). With this module, ajax updates can be pushed to the client. All major browsers and webservers are supported.

          Show
          Emond Papegaaij added a comment - Wicket 6 now features an experimental module that integrates the Atmosphere framework (wicket-atmosphere). With this module, ajax updates can be pushed to the client. All major browsers and webservers are supported.

            People

            • Assignee:
              Emond Papegaaij
              Reporter:
              Xavier Hanin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development