PDA

View Full Version : radiogroup and store proxy http



italoc
16 Jul 2009, 12:44 PM
i have 2 problem after upgrade to extjs 3.0

i can't realod the store and chacke the url of http proxy, i use this method


pato.proxy.conn.setUrl = 'extjs.php?pato=true&notasel='+record.data.id;
pato.load();
but don't change the url of proxy

i can't read the value of checkbox i use this:


{
xtype: 'radiogroup',
fieldLabel: 'C.F./STP',
name: 'addcfstp',
id: 'addcfstp',
getValue: function() {
var v;
this.items.each(function(item) {
if (!item.getValue()) return true;
v = item.getRawValue();
return false;
});
return v;
}


with

Ext.getCmp('addcfstp').getValue();

but return always "NULL" value..

Can you help me???

thanks..

mjlecomte
16 Jul 2009, 4:44 PM
That's a method!


pato.proxy.conn.setUrl = 'extjs.php?pato=true&notasel='+record.data.id;
pato.proxy.conn.setUrl('extjs.php?pato=true&notasel='+record.data.id);
pato.load();

mjlecomte
16 Jul 2009, 4:58 PM
I don't see why you are implementing / overriding your own getValue method.

Have you looked here?
http://extjs.com/deploy/ext-3.0.0/examples/form/check-radio.html

italoc
17 Jul 2009, 12:06 AM
That's a method!


pato.proxy.conn.setUrl = 'extjs.php?pato=true&notasel='+record.data.id;
pato.proxy.conn.setUrl('extjs.php?pato=true&notasel='+record.data.id);
pato.load();

whit this code i obtain this error:


pato.proxy.conn.setUrl is not a function

this is the proxy:



var pato = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'extjs.php?pato=true'
}),
reader: new Ext.data.JsonReader({
totalProperty: 'totalCount',
root: 'pato',
id: 'id'
}, [
{name: 'id', mapping: 'id', type: 'string'},
{name: 'patologia', mapping: 'patologia', type: 'string'},
{name: 'descrizione', mapping: 'descrizione', type: 'string'}
])
});

steffenk
17 Jul 2009, 12:15 AM
if you read the docs you'll see that the method is from proxy, not conn


pato.proxy.setUrl('extjs.php?pato=true&notasel='+record.data.id);
http://extjs.com/deploy/dev/docs/?class=Ext.data.HttpProxy

italoc
17 Jul 2009, 12:43 AM
thank you..

now the http proxy store work correctly..

for the radiogroup now with this code:


Ext.getCmp('idofradio').getValue()

i obtain [OBJECT][OBJECT]