public void updateField( ObjectName oname, String name, Object value ) { if( loading ) return; // nothing by default //log.info( "XXX UpdateField " + oname + " " + name + " " + value); Node n=(Node)object2Node.get( oname ); if( n == null ) { log.info( "Node not found " + oname ); return; } Node attNode=DomUtil.findChildWithAtt(n, "attribute", "name", name); if( attNode == null ) { // found no existing attribute with this name attNode=n.getOwnerDocument().createElement("attribute"); DomUtil.setAttribute(attNode, "name", name); n.appendChild(attNode); } String oldValue=DomUtil.getAttribute(attNode, "value"); if( oldValue != null ) { // we'll convert all values to text content DomUtil.removeAttribute( attNode, "value"); } DomUtil.setText(attNode, value.toString()); //store(); }
public void updateField( ObjectName oname, String name, Object value ) { if( loading ) return; // nothing by default //log.info( "XXX UpdateField " + oname + " " + name + " " + value); Node n=(Node)object2Node.get( oname ); if( n == null ) { log.info( "Node not found " + oname ); return; } Node attNode=DomUtil.findChildWithAtt(n, "attribute", "name", name); if( attNode == null ) { // found no existing attribute with this name attNode=n.getOwnerDocument().createElement("attribute"); DomUtil.setAttribute(attNode, "name", name); n.appendChild(attNode); } String oldValue=DomUtil.getAttribute(attNode, "value"); if( oldValue != null ) { // we'll convert all values to text content DomUtil.removeAttribute( attNode, "value"); } DomUtil.setText(attNode, value.toString()); //store(); }
public void updateField( ObjectName oname, String name, Object value ) { if( loading ) return; // nothing by default //log.info( "XXX UpdateField " + oname + " " + name + " " + value); Node n=(Node)object2Node.get( oname ); if( n == null ) { CoyoteLogger.MODELER_LOGGER.nodeNotFound(oname); return; } Node attNode=DomUtil.findChildWithAtt(n, "attribute", "name", name); if( attNode == null ) { // found no existing attribute with this name attNode=n.getOwnerDocument().createElement("attribute"); DomUtil.setAttribute(attNode, "name", name); n.appendChild(attNode); } String oldValue=DomUtil.getAttribute(attNode, "value"); if( oldValue != null ) { // we'll convert all values to text content DomUtil.removeAttribute( attNode, "value"); } DomUtil.setText(attNode, value.toString()); //store(); }
@Override public void updateField( ObjectName oname, String name, Object value ) { if( loading ) return; // nothing by default //log.info( "XXX UpdateField " + oname + " " + name + " " + value); Node n = object2Node.get(oname); if( n == null ) { log.info( "Node not found " + oname ); return; } Node attNode=DomUtil.findChildWithAtt(n, "attribute", "name", name); if( attNode == null ) { // found no existing attribute with this name attNode=n.getOwnerDocument().createElement("attribute"); DomUtil.setAttribute(attNode, "name", name); n.appendChild(attNode); } String oldValue=DomUtil.getAttribute(attNode, "value"); if( oldValue != null ) { // we'll convert all values to text content DomUtil.removeAttribute( attNode, "value"); } DomUtil.setText(attNode, value.toString()); //store(); }
@Override public void updateField( ObjectName oname, String name, Object value ) { if( loading ) return; // nothing by default //log.info( "XXX UpdateField " + oname + " " + name + " " + value); Node n = object2Node.get(oname); if( n == null ) { log.info( "Node not found " + oname ); return; } Node attNode=DomUtil.findChildWithAtt(n, "attribute", "name", name); if( attNode == null ) { // found no existing attribute with this name attNode=n.getOwnerDocument().createElement("attribute"); DomUtil.setAttribute(attNode, "name", name); n.appendChild(attNode); } String oldValue=DomUtil.getAttribute(attNode, "value"); if( oldValue != null ) { // we'll convert all values to text content DomUtil.removeAttribute( attNode, "value"); } DomUtil.setText(attNode, value.toString()); //store(); }
@Override public void updateField( ObjectName oname, String name, Object value ) { if( loading ) return; // nothing by default //log.info( "XXX UpdateField " + oname + " " + name + " " + value); Node n = object2Node.get(oname); if( n == null ) { log.info( "Node not found " + oname ); return; } Node attNode=DomUtil.findChildWithAtt(n, "attribute", "name", name); if( attNode == null ) { // found no existing attribute with this name attNode=n.getOwnerDocument().createElement("attribute"); DomUtil.setAttribute(attNode, "name", name); n.appendChild(attNode); } String oldValue=DomUtil.getAttribute(attNode, "value"); if( oldValue != null ) { // we'll convert all values to text content DomUtil.removeAttribute( attNode, "value"); } DomUtil.setText(attNode, value.toString()); //store(); }