public void handleEvent(Event arg0) {
try {
cityCombo.removeAll();
int y = 0, index = 0;
State state = (State) system.query(new GetStates(stateCombo.getText()));
List<City> cities = state.getCityList();
for (City city : cities) {
cityCombo.add(city.getCityName());
if(gd.get("city") != null) {
if (gd.get("city").toString().equals(city.getCityName())) {
index = y;
}
}
y++;
}
cityCombo.select(index);
} catch (Exception e) {
}
}
});
try {
List<State> states = (List<State>) system.query(new GetStatesList());
for (State state : states) {
stateCombo.add(state.getAcronym());
if(gd.get("state") != null) {
if (gd.get("state").toString().equals(state.getAcronym())) {
stateCombo.select(i);
}
}
i++;
}