Datasource GET ALL RRECORDS - obtener records deun datasource
DATASORUCE GET ALL RRECORDS.txt
dataSource.fetchData(null, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest request) {
// TODO Auto-generated method stub
Record[] record_data = response.getData();
//CONFIG BASICA
titulo_chart = record_data[0].getAttribute("titulo");
subtitulo_chart = record_data[0].getAttribute("subtitulo");
b_msg_chart = record_data[0].getAttribute("b_msg");
t_msg_chart = record_data[0].getAttribute("t_msg");
//CONFIG X AXIS
// JSONArray value = XMLTools.selectObjects( error_key , "/x_list/RESULTADO2");
// String status = ((JSONString) value.get(0)).stringValue();
Record[] results = response.getData();
System.out.println("Results contains " + results.length +" records.");
for(Record result : results)
{
String[] attribs = result.getAttributes();
for(String attrib : attribs)
{
System.out.println(attrib + ": " + result.getAttribute(attrib));
}
}
System.out.println("Raw Data: " + rawData.toString());
try
{
JavaScriptObject wizardResult = (JavaScriptObject)rawData;
System.out.println(wizardResult.toSource());
}
catch(Exception exc)
{
System.out.println("Caught an error: "+ exc);
}
// com.google.gwt.user.client.Window.alert( error_key.toString() );
//CONFIG SERIES
//CONFIG GENERALDATA
widget_real_chart.change_Chart(
tipo_chart_id ,
titulo_chart , subtitulo_chart , b_msg_chart , t_msg_chart , "rd",
xlist, seriesList , generalData
);
}
});
como obtener records de un datasource gwt javascript manualmente,
dataSource.fetchData(null, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest request) {
// TODO Auto-generated method stub
Record[] record_data = response.getData();
//CONFIG BASICA
titulo_chart = record_data[0].getAttribute("titulo");
subtitulo_chart = record_data[0].getAttribute("subtitulo");
b_msg_chart = record_data[0].getAttribute("b_msg");
t_msg_chart = record_data[0].getAttribute("t_msg");
//CONFIG X AXIS
// JSONArray value = XMLTools.selectObjects( error_key , "/x_list/RESULTADO2");
// String status = ((JSONString) value.get(0)).stringValue();
Record[] results = response.getData();
System.out.println("Results contains " + results.length +" records.");
for(Record result : results)
{
String[] attribs = result.getAttributes();
for(String attrib : attribs)
{
System.out.println(attrib + ": " + result.getAttribute(attrib));
}
}
System.out.println("Raw Data: " + rawData.toString());
try
{
JavaScriptObject wizardResult = (JavaScriptObject)rawData;
System.out.println(wizardResult.toSource());
}
catch(Exception exc)
{
System.out.println("Caught an error: "+ exc);
}
// com.google.gwt.user.client.Window.alert( error_key.toString() );
//CONFIG SERIES
//CONFIG GENERALDATA
widget_real_chart.change_Chart(
tipo_chart_id ,
titulo_chart , subtitulo_chart , b_msg_chart , t_msg_chart , "rd",
xlist, seriesList , generalData
);
}
});
como obtener records de un datasource gwt javascript manualmente,
Comments
Post a Comment