コード例 #1
0
 public static void activate(Field masterField, RelatedGuiField relatedGuiField) {
   RequestComboBox comboBox = (RequestComboBox) masterField.getComponent();
   RelatedFieldValueUpdater listener =
       new RelatedFieldValueUpdater(relatedGuiField, relatedGuiField.getComponent(), comboBox);
   comboBox.getDataSource().addPropertyChangeListener(DataSource.SELECTED_ROW_PROPERTY, listener);
   listener.updateValue();
 }
コード例 #2
0
 void updateValue() {
   String value = comboBox.getSelectedValue(relatedGuiField.getName());
   for (FieldSetter fieldSetter : FIELD_SETTERS) {
     if (fieldSetter.handle(relatedGuiFieldComponent)) {
       fieldSetter.setValue(relatedGuiFieldComponent, value);
       break;
     }
   }
 }