public OPropertyMetaColumn(CustomAttribute custom, IModel<DisplayMode> modeModel) { this(custom.getName(), modeModel); }
public OClassMetaColumn(CustomAttribute custom, IModel<DisplayMode> modeModel) { this(custom.getName(), modeModel); }
else if((CustomAttribute.ON_CREATE_FIELDS.getName().equals(critery)) && (custom = CustomAttribute.getIfExists(critery)) != null)
private static List<OArchitectOProperty> toOArchitectProperties(OClass oClass, List<OClass> superClasses) { Collection<OProperty> properties = oClass.properties(); List<OArchitectOProperty> architectProperties = new ArrayList<>(properties.size()); ExtendedOPropertiesDataProvider provider = new ExtendedOPropertiesDataProvider(new CollectionModel<>(properties)); provider.setSort(CustomAttribute.ORDER.getName(), SortOrder.ASCENDING); Iterator<? extends OProperty> iterator = provider.iterator(0, provider.size()); while (iterator.hasNext()){ OProperty property = iterator.next(); OArchitectOProperty architectOProperty = OArchitectOProperty.toArchitectOProperty(oClass, property); architectOProperty.setSubClassProperty(isSubClassProperty(property, superClasses)); architectProperties.add(architectOProperty); } return architectProperties; }
@Override protected void onConfigure() { super.onConfigure(); String critery = getPropertyObject(); if(OClassPrototyper.SUPER_CLASSES.equals(critery)) { Collection<OClass> superClasses = (Collection<OClass>)getEnteredValue(); AbstractMetaPanel<OClass, String, ?> onCreateFieldsPanel = getMetaComponent(CustomAttribute.ON_CREATE_FIELDS.getName()); AbstractMetaPanel<OClass, String, ?> onCreateIdentityTypePanel = getMetaComponent(CustomAttribute.ON_CREATE_IDENTITY_TYPE.getName()); if(onCreateFieldsPanel!=null || onCreateIdentityTypePanel!=null) { boolean visibility = false; for(OClass superClass : superClasses) { if(visibility = superClass.isSubClassOf(OSecurityShared.RESTRICTED_CLASSNAME)) break; } if(onCreateFieldsPanel!=null) onCreateFieldsPanel.setVisibilityAllowed(visibility); if(onCreateIdentityTypePanel!=null) onCreateIdentityTypePanel.setVisibilityAllowed(visibility); } } }
@Override protected void onConfigure() { super.onConfigure(); String critery = getPropertyObject(); if(OPropertyPrototyper.TYPE.equals(critery)) { OType oType = (OType)getEnteredValue(); // Show Linked Class if type is a some kind of link AbstractMetaPanel<OProperty, String, ?> metaPanel = getMetaComponent(OPropertyPrototyper.LINKED_CLASS); if(metaPanel!=null) metaPanel.setVisibilityAllowed(oType!=null && (oType.isLink() || oType.isEmbedded())); // Show Linked Type if type is a some kind of embedded metaPanel = getMetaComponent(OPropertyPrototyper.LINKED_TYPE); if(metaPanel!=null) metaPanel.setVisibilityAllowed(oType!=null && oType.isEmbedded() && !OType.EMBEDDED.equals(oType)); // Show inverse if current type is a link metaPanel = getMetaComponent(CustomAttribute.PROP_INVERSE.getName()); if(metaPanel!=null) metaPanel.setVisibilityAllowed(oType!=null && oType.isLink()); } else if(CustomAttribute.CALCULABLE.getName().equals(critery)) { Boolean calculable = (Boolean) getEnteredValue(); AbstractMetaPanel<OProperty, String, ?> metaPanel = getMetaComponent(CustomAttribute.CALC_SCRIPT.getName()); if(metaPanel!=null) metaPanel.setVisibilityAllowed(calculable!=null && calculable); } }
else if((CustomAttribute.ON_CREATE_FIELDS.getName().equals(critery)) && (custom = CustomAttribute.getIfExists(critery)) != null)
pProvider.setSort(CustomAttribute.ORDER.getName(), SortOrder.ASCENDING); GenericTablePanel<OProperty> tablePanel = new GenericTablePanel<OProperty>("tablePanel", pColumns, pProvider ,20); OrienteerDataTable<OProperty, String> pTable = tablePanel.getDataTable();