initController();
}
protected void initController() {
BindingBuilder builder = new BindingBuilder(
getApplication().getBindingFactory(),
this);
builder.setDelegate(nodeChangeProcessor);
bindings = new ObjectBinding[4];
bindings[0] = builder.bindToComboSelection(
view.getPasswordEncoder(),
"node.dataSourceDescriptor.passwordEncoderClass");
bindings[1] = builder.bindToTextField(
view.getPasswordKey(),
"node.dataSourceDescriptor.passwordEncoderKey");
bindings[2] = builder.bindToComboSelection(
view.getPasswordLocation(),
"node.dataSourceDescriptor.passwordLocation");
bindings[3] = builder.bindToTextField(
view.getPasswordSource(),
"node.dataSourceDescriptor.passwordSource");
((ProjectController) getParent())
.addDataNodeDisplayListener(new DataNodeDisplayListener() {
public void currentDataNodeChanged(DataNodeDisplayEvent e) {
refreshView(e.getDataNode());
}
});
getView().addComponentListener(new ComponentAdapter() {
public void componentShown(ComponentEvent e) {
refreshView(node != null ? node : ((ProjectController) getParent())
.getCurrentDataNode());
}
});
builder
.bindToAction(
view.getPasswordEncoder(),
"validatePasswordEncoderAction()");
builder.bindToAction(
view.getPasswordLocation(),
"passwordLocationChangedAction()");
}