The quick solution, a bit ugly, is to write a method like this:

public void saveData(String cod, String description, String monto) {
             ScriptTagProxy dataProxy = new ScriptTagProxy("http://
localhost/quienes/guardarDatos.php?cod="+cod
+"&description="+description+"&monto="+monto);
             RecordDef rd = new RecordDef(new FieldDef[] {new
StringFieldDef("isOk")});
             final JsonReader jsonReader = new JsonReader(rd);
             jsonReader.setRoot("isOk");
             Store store = new Store(dataProxy,jsonReader);
             store.addStoreListener(new StoreListenerAdapter(){
                   public void onLoad(Store store, Record[] records) {
                      String isOk = records[0].getAsString("isOk");
                       if(isOk.equals("SI") {
                          MessageBox.alert("Aviso", "El registro ha
sido guardado con exito");
                       } else {
                          MessageBox.alert("Error", "Ha surgido algun
problema");
                       }
                   }
[...]
             });
           store.load();
        }

When you need to save the data call it:

     saveData('0002','Esto es una descripcion', '34.89');

Then you should impement the server side part, where you get the
parameters sent (i.e. cod, description, monto, $_REQUEST['cod'],
$_REQUEST['descripcion'], etc), perform an update/insert into the
database, and return a json structure where the response (i.e.
'isOk').
This is a workaround. Is ugly, because you don't use the 'store' in a
proper way (is not associate with any component) but I think that it
should work.

Let me know....

Leo

-- 
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en.

Reply via email to