use of com.twinsoft.convertigo.beans.ngx.components.UIAppGuard in project convertigo by convertigo.
the class NgxUIComponentTreeObject method setPropertyValue.
@Override
public void setPropertyValue(Object id, Object value) {
DatabaseObject dbo = getObject();
if (dbo instanceof UIDynamicElement) {
IonBean ionBean = ((UIDynamicElement) dbo).getIonBean();
if (ionBean != null) {
if (ionBean.hasProperty((String) id)) {
if (value != null) {
if (value instanceof String) {
value = new MobileSmartSourceType((String) value);
}
Object oldValue = ionBean.getPropertyValue((String) id);
if (!value.equals(oldValue)) {
ionBean.setPropertyValue((String) id, value);
TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
hasBeenModified(true);
viewer.update(this, null);
TreeObjectEvent treeObjectEvent = new TreeObjectEvent(this, (String) id, oldValue, value);
ConvertigoPlugin.projectManager.getProjectExplorerView().fireTreeObjectPropertyChanged(treeObjectEvent);
return;
}
}
}
}
}
if (dbo instanceof UIAppGuard) {
UIAppGuard dboGuard = (UIAppGuard) dbo;
if ("guardType".equals(id)) {
String guardType = (String) value;
if (!guardType.equals(dboGuard.getGuardType().name())) {
if (dboGuard.getApplication().hasGuard(AppGuardType.valueOf(guardType))) {
return;
}
}
}
}
super.setPropertyValue(id, value);
}
Aggregations