On Mon, Jan 21, 2013 at 3:01 PM, Diogo Casado <diogocas...@gmail.com> wrote:

> Hi,
> I'm implementing some components that have a really dynamic behavior.
> The JavaScript client side component properties changes as user interacts.
> But the thing is that I don't really need an Ajax call after every change
> to update this properties server-side. Just when the user clicks in another
> AjaxButton for example. This behavior can relieve the pressure on our
> server.
> So I wish that this specific component state/properties could be embedded
> in any ajax call (like in a post).
> Well, I know several ways of doing that, but the one that seemed more
> transparent is to have a trigger when any ajax call happens, capturing the
> request before it is sent and then.. add my component properties.
> I was inspecting the wicket-ajax.js (Wicket 1.5) but it seems that we don't
> have any kind of triggers working in this way.. did just a quick look.
> There is

  Wicket.Ajax.registerPreCallHandler(function() {
maybe you can use that to do what you want? Unfortunately on 1.4.x and
1.5.X handlers do not receive as parameter the URL or anything useful. Bu
maybe you can monkey patch get and post to pass more info,

> Do you have any ideas for this?
> Other possibilities are making a simple event interface for this component
> that should be called when desired. But in this case, we would still have a
> couple of ajax calls to update individual elements (I suppose).
> Thanks.
> - Diogo Casado

Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ <http://antiliasoft.com/antilia>

Reply via email to