1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| public class Kalima implements EntryPoint {
public void onModuleLoad() {
RequestBuilder firstReq = new RequestBuilder(RequestBuilder.GET, baseURL + "?action=getTableInfos");
try {
firstReq.sendRequest(null, new RequestCallback() {
public void onError(Request request, Throwable exception) {
Window.alert("err0 " + exception.getMessage());
}
public void onResponseReceived(Request request, Response response) {
JSONValue value = JSONParser.parse(response.getText());
JSONObject Infos = value.isObject();
if (Infos != null) {
Infos = Infos.get("Infos").isObject();
String cacheids[] = Infos.get("CACHEIDS").isString().stringValue().split(",");
Infos.get("CACHEIDS").isString().stringValue().split(",");
for (int i=0; i<cacheids.length; i++) {
scenaTable.put(cacheids[i], new Table(cacheids[i]));
}
}
java.util.Iterator<String> it = scenaTable.keySet().iterator();
tabIndex = 0;
while (it.hasNext()) {
String scena_Name = (String) it.next();
Table puits = scenaTable.get(scena_Name);
puits.setTabIndex(tabIndex++);
tabPanel.add(nouveauPuits(puits), puits.scena_Name);
puits.startTimer();
nameTableList.add(puits.scena_Name);;
}
tabPanel.selectTab(activeTab);
} |
Partager