My App is the same that last week but now it isn't working.
I invoke the service in the page event.
I build manually the response map
$
--Detalle
--ID
And I add my JS code in the implementation:
precode
$t.jsGetProyectos1 = $t.createClass(null, {
Code: Select all
init : function(requestOptions) {
this.__requestOptions = $.extend({}, requestOptions);
},
process : function(settings) {
if (this.__requestOptions.echo) {
settings.success(this.__requestOptions.echo);
} else {
var db = window.openDatabase(dbName, dbVersion, dbName, dbSize);
var __Rows = [];
console.log("hola");
db.transaction(function(tx) {
tx.executeSql('SELECT detalle, ID FROM "Ubicaciones" where tipo = 1 order by detalle', [], function(tx, results) {
var v_len = results.rows.length;
if (v_len > v_limite) {v_len = v_limite;}
for (var i = 0; i < v_len; i++) {
fnLog(results.rows.item(i)['detalle']);
if (results.rows.item(i)['detalle'] == "") {
results.rows.item(i)['detalle'] = '<sin nombre>';
fnLog("hay que cambiar");
}
__Rows.push(results.rows.item(i));
} // for
console.log(JSON.stringify(__Rows));
settings.success(__Rows);
settings.complete('success');
}); // SELECT
}); // Transaction
}
}
});
/code/pre