pep
06-02-2004, 05:34 PM
I want to make a soap request on user's click.
so I have a class that makes th request, wich works perfectly when I use it with tags, and I initialize it like this,
var customDataset=
new xsoapdataset(canvas,
{
name:classroot.getUID()+'data',
src:'http://tomcatserver:8080/axis/services/Myservice',
path:'/All/foo/bar',
type:"http",
autorequest:"false",
onerror:"canvas.alert('Error while retriving your contact list <br/> Do you want to retry?',' ')",
ontimeout:"canvas.alert('Timeout while retriving your contact list <br/> Do you want to retry?',' ')" ,
ondata:"canvas.swap"+classroot.getUID()+"Event.sendEvent()"
}
);
where I have already created a swap<thisclassrootUID>Event to do something int his contex ondata.
var swapme=new LzDelagate(this.inside,"answer");
swapme.register(canvas,'swap'+classroot.getUID()+' Event');
unfortunately, the delegate do not work and answer() is never called.
I also tried to have the ondata event work like this:
swapme.register(customDataset,"ondata")
canvas.updateLoginEvent.sendEvent();
and this
{name: ...
...
ondata:'answer'
}
none works.
rq:
I must have a name like classroot.getUID+'data' so that each occurence of the class can have its own dataset, since to dataset cannot have the same name. But then I couldn't find a way to call the dataset from else where to launch the request method again.
so I have a class that makes th request, wich works perfectly when I use it with tags, and I initialize it like this,
var customDataset=
new xsoapdataset(canvas,
{
name:classroot.getUID()+'data',
src:'http://tomcatserver:8080/axis/services/Myservice',
path:'/All/foo/bar',
type:"http",
autorequest:"false",
onerror:"canvas.alert('Error while retriving your contact list <br/> Do you want to retry?',' ')",
ontimeout:"canvas.alert('Timeout while retriving your contact list <br/> Do you want to retry?',' ')" ,
ondata:"canvas.swap"+classroot.getUID()+"Event.sendEvent()"
}
);
where I have already created a swap<thisclassrootUID>Event to do something int his contex ondata.
var swapme=new LzDelagate(this.inside,"answer");
swapme.register(canvas,'swap'+classroot.getUID()+' Event');
unfortunately, the delegate do not work and answer() is never called.
I also tried to have the ondata event work like this:
swapme.register(customDataset,"ondata")
canvas.updateLoginEvent.sendEvent();
and this
{name: ...
...
ondata:'answer'
}
none works.
rq:
I must have a name like classroot.getUID+'data' so that each occurence of the class can have its own dataset, since to dataset cannot have the same name. But then I couldn't find a way to call the dataset from else where to launch the request method again.