/**
* Set the properties localized name to the text that is in the nameField
* control
*/
private void updateNameProperty() {
DeviceRepositoryAccessorManager dram =
context.getDeviceRepositoryAccessorManager();
// get the name of the policy that is being edited
String policy = getPolicyName();
// obtain the localized name from the control
String localizedName = nameField.getText();
if (!localizedName.equals(
dram.getLocalizedPolicyName(policy))) {
ObservableProperties properties = dram.getProperties();
// remove the listener that is registered
properties.removePropertyChangeListener(propertyChangeListener);
try {
// update the properties
dram.setLocalizedPolicyName(policy, localizedName);
} finally {
// re-register the property change listener
properties.addPropertyChangeListener(propertyChangeListener);
}