It seems to me that this should be possible. In an XPages application I have two ServerSide JavaScript Libraries jsMain and jsSave. In the jsMain I have this Script:
function thisAction(msg:String){
try{
switch(msg){
case "Save" :
print("This action = " + msg);
if (jsSave.processAction()){
print("jsSave.processAction returned true");
return true;
break;
}else{
print("jsSave.processAction returned false");
return false;
break;
}
default:
print("In default msg is " + msg);
return false;
break;
}
}catch(e){
print("thisAction Failed in jsMain " + e.toString())
}
}
In a button on an XPage I call thisAction("Save") and it invokes the thisAction function, now when the msg is Save I want to call the function processAction but it resides in the JS Library jsSave. What I have above fails with the error:
thisAction Failed in jsMain 'jsSave' not found
So is there a way to tell this code that processAction is in an different SSJS Library?