With the new version of XPages Database Open Dialog Custom Control from openntf by Lars Buntrock i have been unable to pass the output of the callback to Java Script Server Side or even save the return value to the database. do anybody have idea how to solve this ? the dialogbox was called using a CSJS with the below code:
$.openAppDlgCs.show({load:true, fade:true, callback:setFields, passThrough:''});
below is the setFields code:
function setFields() {
var dbTitle = "";
var dbPath = "";
var dbSrv = "";
var dbHttpUrl = "";
var dbNotesUrl = "";
var dbReplicaId = "";
var dbbin = "";
try {
if (arguments.length > 0) {
var db = arguments[0];
var passThrough = arguments[1];
dbTitle = (typeof db.title === "undefined") ? "" : db.title;
dbPath = (typeof db.path === "undefined") ? "" : db.path;
dbSrv = (typeof db.server === "undefined") ? "" : db.server;
dbHttpUrl = (typeof db.httpUrl === "undefined") ? "" : db.httpUrl;
dbNotesUrl = (typeof db.notesUrl === "undefined") ? "" : db.notesUrl;
dbReplicaId = (typeof db.replicaId === "undefined") ? "" : db.replicaId;
dbbin = dbTitle;
}
$("#dbTitle").text(dbTitle);
$("#dbServer").text(dbSrv);
$("#dbPath").text(dbPath);
$("#dbHttpUrl").text(dbHttpUrl);
$("#dbNotesUrl").text(dbNotesUrl);
$("#dbReplicaId").text(dbReplicaId);
$("#dbbin").val(dbbin);//
} catch (e) {
console.log(arguments.callee.name);
console.log(e);
}
};
The output was display with the below code:
<div class="form-group">
<label for="dbTitle">Title</label>
<span class="form-control" id="dbTitle"></span>
</div>