/** * Get the attribute value (see BeanProp class) */ public String getAttributeValue(String propName, String name) { return this.beanProp(propName).getAttributeValue(0, name); }
/** * Get the attribute value (see BeanProp class) */ public String getAttributeValue(String propName, int index, String name) { return this.beanProp(propName).getAttributeValue(index, name); }
/** * Get the attribute value on the current property bean. * If there is no current attribute (or element for that matter), * then null is returned. */ public String getAttributeValue(String name) { BeanProp bp = this.beanProp(); if (bp != null) { // Find out what our index is within the BeanProp object int i = bp.idToIndex(this.binding.getId()); if (i < 0) // I guess we're not part of the BeanProp yet. return null; return bp.getAttributeValue(i, name); } else { // // That's a brand new bean not attached yet to a graph. Try // to get the value from the cache. // if (this.attrCache != null) return (String)this.attrCache.get(name); else return null; } }
private void copyAttributes(BeanProp prop, int propIndex, BaseBean bean, int beanIndex) { // Copy the attributes String name = prop.getName(); BaseAttribute[] ba = bean.listAttributes(name); if (ba != null) { for(int j=0; j<ba.length; j++) { if (!ba[j].isFixed()) { String attrName = ba[j].getName(); String v = bean.getAttributeValue(name, beanIndex, attrName); if (v != prop.getAttributeValue(propIndex, attrName)) { prop.setAttributeValue(propIndex, attrName, v); } } } } }
if (bp.isIndexed()) { for (int k=0; k<size; k++) { String v = bp.getAttributeValue(k, name); v = (String)Common.getComparableObject(v); String v = bp.getAttributeValue(0, name); v = (String)Common.getComparableObject(v);
if (!prop.getAttrProp(a).isFixed()) { for(int i=0; i<size; i++) { String v = prop.getAttributeValue(i, a); if (bean.getAttributeValue(name, i, a) != v) bean.setAttributeValue(name, i, a, v); String a = attrs[j]; if (!prop.getAttrProp(a).isFixed()) { String v = prop.getAttributeValue(0, a); if (bean.getAttributeValue(name, 0, a) != v) bean.setAttributeValue(name, a, v);