PDA

View Full Version : ScriptTagProxy calss from designer and server side code



miguelconde
31 Mar 2010, 8:14 PM
Guy's,
I am using the scriptagproxy class
to hand my crud actions,

var myRemoteProxy = new Ext.data.ScriptTagProxy({
api : {
read : RutaContenidoPHPClases + '/CargarAlmacenMovilCabezera.php',
create : RutaContenidoPHPClases + '/AddUpdateAlmacenMovilCabezera.php',
update : RutaContenidoPHPClases + '/AddUpdateAlmacenMovilCabezera.php',
destroy : '' //RutaContenidoPHPClases + '/EliminarAlmacenMovilCabezera.php'
}
});

this work fine in the call's to the server side, my php script's run well, but,
when it return the data, some error ocurred. I used:

echo $callback.'({"success":"false","msg":"my message error"})';

for the warnings, and something like this
for the record returns

$returnJSON = '{"success":"true","myroot":'. json_encode($data) . '}';
echo $callback.'('.$returnJSON.')';

a response type error ocurred in the exception, then
offcourse the 'response' object is null, I never could make that the
the 'remote' type happen and to obtain the error message from the response object

I think that, the problem is there in the parameter's that
my jsonstore is waiting for.

How i can handle the ScriptTagProxy class from the designer?

Thank you very much

aconran
31 Mar 2010, 9:04 PM
Currently you can only use the built-in convenience Stores. We plan to add a JsonPStore which would use a JsonReader and ScriptTagProxy.