Well first I’m working alone with jquerymovile, java, js and ajax.
this is how I call the registered data and I build the nodes I do not know if this is good or bad :/
function load() {
.ajax({ url : "rest/rrhh/organigramamodel", cache : false, success : function(data) { for (var i = 0; i < data.length; i++) { JSON.stringify(data); var modeloc = (go.Model);
modeloc.nodeDataArray =
[{}];
var nodo = data[i];
myDiagram.startTransaction(“add employee”);
if(i == 0 ) {
var nodoAcargar = { key: data[i].id_cargo , name: “” , nivel : data[i].nivel };
myDiagram.model.addNodeData(nodoAcargar);
}else if (i > 0){
var nodoAcargar = { key: data[i].id_cargo , name: “” , parent: data[i].idcargo_padre , nivel : data[i].nivel };
myDiagram.model.addNodeData(nodoAcargar);
myDiagram.commitTransaction(“add employee”);
}
}}, error : function(error) { { if (error.status == 401) { desAuth(); } jqmSimpleMessage("Error en listar infor empleado: " + error.responseText); } }, beforeSend : function(xhr, settings) { xhr.setRequestHeader('Authorization', 'Bearer ' + getVCookie(getVCookie("userPro"))); } }); }
at the moment of creating a new node this happens and it sends me message
I do not know why he no longer shows me the links of the nodes and why he does not believe me new anymore I am new with this api and I do not understand much :(