let me tell you what I'm working on now (not finished yet), it simply does this:
// Define an ajax call in a handler
AjaxDojoBind bind = new AjaxDojoBind();
bind.setCallBackURL(getCallbackUrl());
bind.setMethod(AjaxDojoBind.Method.GET);
bind.addParameter("productID", "312&EO+B");
bind.addParameter(tf.getInputName(), "$_this.value");
and when calling:
attributes.put("onkeyup", bind.getJavaScript());
it generate this:
dojo.io.bind({url:'/?path=0:myNumber&interface=IBehaviorListener&behaviourId=1', mimetype:'text/plain', method : 'GET', content: {productID:312%26EO%2BB,myNumber: this.value}});
now, what I have now only support the above, but I'm planing on put more in it. So tell me if this is helpfull and I will speed things up and submit to wicket comunity :)
Also, if you want to suggest different name or want to suggest a package for this, the reason I'm building this is to also support selection lists I want to build, which you have 2 HTML lists that you can drag an item from one list to another to add, I'll need this for a future project.
Regards, Ali
On 2/1/06, Marco van de Haar <[EMAIL PROTECTED]> wrote:
If you have working dojo-wicket classes, we would be very happy ot add
them to the contrib-dojo project.
Marco
Ali Zaid schreef:
> Hi Eelco;
>
> Thanks for your reply, it's working now, just minutes before your
> email arrive, anyway, it work now with dojo (put not with prototype),
> the problem with dojo is that I missplaced the ' in (content:{
> 'myNumber:705}'} ), what I want to do is a class AjaxDojoBind, which
> simply I feed callback URL, method, placeholder, and add parameters to
> it, and it construct the whole request, I also used something like $_
> to tell the class that this parameter should be a _javascript_ not a
> string variable, when I'm done with it I will post it for eveybody.
>
> with prototype for some reason the above request doesn't work, and I
> don't want to make an issue of it since this is a _javascript_ code problem.
>
> As I said, I hope when I'm done and post this class for wicket
> comunity that they find it useful :)
>
> Regards, Ali
>
>
> On 1/31/06, *Eelco Hillenius* < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Ali,
>
> It's not clear to me what exactly isn't working. Could you explain a
> bit more, and maybe provide us with some more code?
>
> Eelco
>
>
> On 1/31/06, Ali Zaid <[EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>> wrote:
> > Hi;
> >
> > I know this is a _javascript_ question more than wicket, but I'm
> going crazy!
> > I'm trying to do some helper class to construct my Ajax code,
> simply I tried
> > dojo.io.bind and Ajax.Request and failed to use post method to
> send the data
> > to my wicket Ajax handler, here is the generated code.
> >
> > Dojo
> > <input
> >
> >> > mimetype:'text/plain', method : 'POST', content:{
> 'myNumber:705}'});"
> > value="------" type="text"
> > name="myNumber" id="myNumber"/
> > >
> >
> >
> > prototype
> > <input >> >
> Ajax.Request('/?path=0:myNumber&interface=IBehaviorListener&behaviourId=1',
>
> > { method : 'POST', postBody: 'myNumber=705' });"
> > value="------" type="text"
> > name="myNumber" id="myNumber"/
> > >
> >
> >
> > I'm really in a mess here, although I can easly send this info
> just by
> > construct the full call back URL cause my application is simple,
> I just want
> > what I wrote to work :(, PLEASE HELP! what am I missing?
> >
> > --
> > Regards, Ali
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD
> SPLUNK!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
> <http://sel.as-us.falkag.net/sel?cmdlnk&kid%103432&bid#0486&dat%121642 >
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> <mailto: [email protected]>
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> <https://lists.sourceforge.net/lists/listinfo/wicket-user>
>
>
>
>
> --
> Regards, Ali
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
--
Regards, Ali
