- getting view as JSON. database.nsf/viewname?readviewentries& OutputFormat=JSON (fast and modern)
- agent approach (example here, most flexible and probably most slow approach)
- page/form/view as elelemnts, f.x. database.nsf/myform?openform&unid=123123 (easy to use but not flexible, I use it very rarely)
Very small and known example of dojo's ajax, I'm getting some information from agent and then will use it in my JS later.var jsondata;
dojo.xhrGet({
url: "database/agentGetData?Openagent¶m1=id1",
sync: true,
load: function(data) {
jsondata = data;
}
});
6 comments :
nice, when you work with xPages your Ajax request is as simple as a "partial refresh" checkbox.
right, but xPage is still not everywhere, so we need to know how to do that in classic lotus web development.
Also this is helpfull when you are writing an html5 app and want to get info from the server while all the elements reside cached in the browser
I see this is CSJS. Is there a way to do this with SSJS - as opposed to the Agent.Run? I need to send query string parameters to the agent - not save a document to pass to it.
Ted Ryan you can pass parameters to the agent?
Post a Comment