Posts

Showing posts from March, 2011

get criteria from filterbuilder

get criteria from filterbuilder smartgwt Obtener criteria de filterbuilder gwt String jsObj = JSON.encode(filterBuilder.getCriteria().getJsObj()); SC.say(jsObj); o tambien se puede utilizar AdvancedCriteria cr = filterBuilder.getCriteria(); JavaScriptObject jso = cr.getJsObj(); Map map = cr.getValues(); Set keys = map.keySet(); Iterator it = keys.iterator(); while( it.hasNext()){ String key = it.next().toString(); System.out.println("=> "+map.get(key)); } Out put => AdvancedCriteria => and => [object Object]

load_data in smartgwt

    public void load_data() {         if (loading == 0) {             loading = 1;             // --- DATASOOURCE ---             GridSource.fetchData(                      new Criteria("1", "a"),                      new Criteria("1", "a"),                      new Criteria("1", "a"),                      new Criteria("1", "a"),                     new DSCallback() {                         @Override                         public void execute(DSResponse response,                                 Object rawData, DSRequest request) {                             Grid_editor.setData(response.getData());                         }                     });         }     } load_data en smartgwt