/** * Fill the attribute with the default values - this is typically * called when a new property is created, before it is synced into * a DOM Node. This makes the attributes cached and when the property * is turned into a DOM node, the attributes are also created. */ void setDefaultAttributeValues(BeanProp prop) { BeanProperty bp = this.getBeanProperty(prop); if (bp != null) { // Set the default values BaseAttribute[] ap = prop.getAttributes(); for (int i=0; i<ap.length; i++) { String value = ap[i].getDefaultValue(); if (value != null) this.setAttributeValue(prop, ap[i].getDtdName(), value); } } }