Found a little problem while programming
I have created an array called "tasks" inside of a transformResponse of a RestDataSource which will create some htmlpanes in a tab, when I want to access this tab I get following message from firebug:
_1.$kk is not a function
file:/C:/xampp/tomcat/webapps/smart/isomorphic/system/modules/ISC_Core.js
Line 2510
when I give the array a different name like foo, it works perfekt.
I have tried it in Firefox 3 and ie6
here is my code:
Hit "laden" in the first tab and then go to the second called "Aufgaben"
Chris
PS:Please release 7.0 before trying to fix this ;-)
I have created an array called "tasks" inside of a transformResponse of a RestDataSource which will create some htmlpanes in a tab, when I want to access this tab I get following message from firebug:
_1.$kk is not a function
file:/C:/xampp/tomcat/webapps/smart/isomorphic/system/modules/ISC_Core.js
Line 2510
when I give the array a different name like foo, it works perfekt.
I have tried it in Firefox 3 and ie6
here is my code:
Code:
isc.RestDataSource.create({
ID:"DSTasks",
fields:{
id:{title:"id", name:"id", hidden:true},
name:{title:"Bezeichnung", name:"name"},
added:{title:"hinzugefügt", name:"added"},
due:{title:"fällig am ", name:"due"},
status:{title:"status", name:"status"}
},
dataFormat:"json",
dataURL:"test2.json",
transformResponse : function (dsResponse, dsRequest, jsonData) {
rows = isc.XMLTools.selectObjects(jsonData, "/response/rows");
tasks=new Array(rows);
notes=new Array(rows);
assigned=new Array(rows);
dates=new Array(rows);
for (u=0; u<=rows; u++) {
tasks[u-1]=isc.XMLTools.selectObjects(jsonData, "/response/data/"+u+"/tasks");
notes[u-1]=isc.XMLTools.selectObjects(jsonData, "/response/data/"+u+"/note");
assigned[u-1]=isc.XMLTools.selectObjects(jsonData, "/response/data/"+u+"/assigned");
dates[u-1]=isc.XMLTools.selectObjects(jsonData, "/response/data/"+u+"/date");
}
drawTasks();
}
})
isc.DynamicForm.create({
ID:"FormSearch",
canFocus:true,
fields:[
{name:"search", title:"Suche", canFocus:true,type:"text",keyUp:
function() {
var bla=FormSearch.getValue("search");
for(i=0;i<tasks.length;i++){
if(bla>"") {
if(tasks[i].toString().toLowerCase().search(bla.toLowerCase())>0 ) {
VlTasks.getMember("pane"+tasks[i]).show();
}
if(tasks[i].toString().toLowerCase().search(bla.toLowerCase())<0 ) {
VlTasks.getMember("pane"+tasks[i]).hide();
}
}else {
VlTasks.getMember("pane"+tasks[i]).show();
}
}
}
},
]
})
isc.VLayout.create({
ID:"VlTasks",
padding:20
})
isc.HLayout.create({
ID:"HlTasks",
members:[FormSearch,VlTasks]
})
isc.HTMLPane.create({
ID:"functions",
contents:"<a href=\"javascript:DSTasks.fetchData()\">laden</a>"
})
isc.TabSet.create({
ID:"TabSetProjects",
width:"100%",
height:"100%",
tabs:[
{ID:"overview", title:"Übersicht",pane:functions},
{ID:"tasks", title:"Aufgaben", pane:HlTasks},
{ID:"milestones", title:"Meilensteine"},
{ID:"files", title:"Dateien"},
{ID:"messages", title:"Nachrichten"}
]
})
function drawTasks() {
for(var z=0; z<tasks.length;z++)
{
var panename="pane"+tasks[z];
VlTasks.addMember(
isc.HTMLPane.create({
ID:panename,
width:"100%",
height:40,
overflow:"hidden",
animateTime:200,
border:"1px solid black",
contents:"<div id=\"test\"><a href=\"javascript:changeStatus("+panename+")>"+tasks[z]+"</a></div><br> zugeteilt: "+assigned[z]+" fällig am: "+dates[z]
})
);
if(u!=tasks.length){
VlTasks.addMember(
isc.HTMLPane.create({
width:"100%",
height:10,
overflow:"hidden"
})
);
}
}
}
Chris
PS:Please release 7.0 before trying to fix this ;-)
Comment