protected void bindFormProperty(TgwAttribute attr) { if (IdAttribute.class.isInstance(attr)) { return; } bindNormalFormProperty(attr); if (TgwAttributeUtils.needConverter(attr)) { String src = TgwNameUtils.toDynaConverterName(attr.getName()); String target = TgwNameUtils.toDynaPropertyName(attr.getName()); addConverterResource(attr, src, target); } if (attr instanceof ForeignKeyAttribute) { String refEntityName = ((ForeignKeyAttribute) attr) .getRefEntityName(); String propName = TgwNameUtils.createEscapeEntityBindingName( refEntityName, attr.getName()); addProperty(propName, Long.class.getName()); } }
public static void bindField(Form form, TgwAttribute attr, String indexedListProperty) { RuleList rules = createDepends(attr); String columnName = null; if (TgwAttributeUtils.needConverter(attr)) { if (attr instanceof ListAttribute || attr instanceof FileAttribute) { columnName = TgwNameUtils.toDynaConverterName(attr.getName()); } else { return; } } else { columnName = TgwNameUtils.toDynaPropertyName(attr.getName()); } if (rules.size() > 0) { String displayName = attr.getDisplayName(); bindField(form, rules, columnName, displayName, indexedListProperty); } }