View Full Version : Problem Loading data to store

20 Aug 2009, 8:16 AM
Hi all (again), im having trouble populating a store, im building a list with online users, that is populated from a xml (im working with maverick). Im getting the xml from the urk "keepalive.m?xml=0" every 4 seconds (im using taskrunner for it). The thing is that im getting the xml on the response, on every hit (the values i nees are between the "value" nodes)

<?xml version="1.0"?>
<KeepAlive xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CurrentPerfiles> :7:</CurrentPerfiles>
<CurrentEmail>[email protected]</CurrentEmail>
<anyType xsi:type="xsd:int">7</anyType>
I declare the record for it, and then load the data to the store (no exceptions on the load of it), but if i debug with firebug, the store is ALWAYS empty.
(I´ve attached images of the firebug to further clarification)

Here´s the code

Ext.onReady(function () {

var out = new Ext.form.DisplayField({
cls: 'x-form-text',
id: 'out'

var p = new Ext.Panel({
title: 'Usuarios Online',
width: 170,
height: 300,
layout: 'fit'

items: [out]

var task = {
run: updateClock,
interval: 4000 //1 second
var runner = new Ext.util.TaskRunner();


var updateClock = function () {
var usuarios = GetData();
var out = Ext.getCmp('out');
out.append(String.format('<p><i>{0}</i></p>', usuarios.data.Hospital));
out.el.scroll('b', 100000, true);

var GetData = function () {
var OnlineRecord = Ext.data.Record.create([{
name: 'idUsuario',
mapping: 'idUsuario',
type: 'int'
name: 'nombre',
mapping: 'nombre',
type: 'string'
name: 'apellido',
mapping: 'apellido',
type: 'string'
name: 'hospital',
mapping: 'hospital',
type: 'string'
name: 'provincia',
mapping: 'provincia',
type: 'string'
//,{ name: 'Nuevo', mapping: 'Nuevo', type: 'string' }

var readerUsuariosOnline = new Ext.data.XmlReader({
record: 'value'

var usuariosOnline = new Ext.data.Store({
url: 'KeepAlive.m?xml=0',
method: 'POST',
reader: readerUsuariosOnline

usuariosOnline.addListener('loadexception', function () {
alert('usuariosOnline Data Load Exception');

usuariosOnline.addListener('load', function () {
//alert('usuariosOnline Data Loaded');

return usuariosOnline;

Im going nutz here, any ideas?

Tnks in advance

21 Aug 2009, 4:41 AM
Im gonna auto answer this one, there´s nothing wrong with mi code, its working, the problem was the firebug. For some reason (im still clueless of why this is happening) it just sows mi data store empty.

Ok, i hope the code help someone; tnks for the space, and see you all soon

21 Aug 2009, 4:51 AM
The latest firebug in combination with firefox 3.5 was a bit buggy on my friends computer too...