ServiceForm emptyObj = new ServiceForm();
objToView(emptyObj);
}
public void objToView(Object obj) {
ServiceForm form = (ServiceForm) obj;
Combobox providerCB = (Combobox) getFellow("provider");
Iterator it = providerCB.getItems().iterator();
while (it.hasNext()) {
Comboitem item = (Comboitem) it.next();
Org o = (Org) item.getValue();
if (o.getOrgId().equals(form.getProviderId())) {
providerCB.setSelectedItem(item);
}
}
Textbox serviceNameTB = (Textbox) getFellow("serviceName");
Textbox serviceUrlTB = (Textbox) getFellow("serviceUrl");
Textbox parameterDescriptionTB = (Textbox) getFellow("parameterDescription");
Textbox serviceKeyTB = (Textbox) getFellow("serviceKey");
serviceNameTB.setText(form.getServiceName());
serviceUrlTB.setText(form.getServiceUrl());
parameterDescriptionTB.setText(form.getParameterDescription());
serviceKeyTB.setText(form.getServiceKey());
Combobox connectFrequencyCB = (Combobox) getFellow("connectFrequency");
Iterator cfItr = connectFrequencyCB.getItems().iterator();
while (cfItr.hasNext()) {
Comboitem item = (Comboitem) cfItr.next();
String connectFrequencyValue = item.getValue().toString();
if (connectFrequencyValue.equals(form.getConnectFrequency())) {
connectFrequencyCB.setSelectedItem(item);
}
}
Textbox serviceKeyPasswordTB = (Textbox) getFellow("serviceKeyPassword");
serviceKeyPasswordTB.setText(form.getServiceKeyPassword());
}