I've a project which is has created by JSF and dojo. In my main.js I have a function which is doing some stuff like:
define(
["./util/Query", "dojo/domReady!" ],
function(Query) {
// ... some extra stuff here
var queryFunctions = new Query(someVar);
// some extra stuff ...
});
I've also created a module which is named Query :
define(["dojo/_base/declare"],
function(declare) {
return declare(null, {
_someVar: null,
constructor: function(SomeVar) {
this._someVar = SomeVar;
},
functionOne: function(xhr, status, args) {
// some stuff here;
}
});
});
And in my JSF file, I've a ajax tag to make an ajax request to bean function and then, update a dom object:
<p:ajax update="someDOM"
listener="#{myBean.changeHandler}"
oncomplete="functionOne(xhr, status, args)" />
Basically I want to use functionOne() function which is in my Query module. I can not access queryFunctions variable directly in the ajax tag. How can I do that?