[Mc4j-cvs] mc4j/src/org/mc4j/console/bean/attribute AttributePropertyFactory.java,1.1,1.2
Brought to you by:
ghinkl
From: Greg H. <gh...@us...> - 2004-04-07 03:21:03
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17596/src/org/mc4j/console/bean/attribute Modified Files: AttributePropertyFactory.java Log Message: If we don't have the class for the object type, make it a string. Index: AttributePropertyFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributePropertyFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AttributePropertyFactory.java 2 Apr 2004 03:27:55 -0000 1.1 --- AttributePropertyFactory.java 7 Apr 2004 03:08:09 -0000 1.2 *************** *** 55,58 **** --- 55,61 ---- } catch (ClassNotFoundException cnfe) { + //ErrorManager.getDefault().notify(cnfe); + + property = new AttributeProperty(node); } *************** *** 65,68 **** --- 68,74 ---- protected AttributeNode attributeNode; + + protected boolean unknownType = false; + public AttributeProperty(Class type, AttributeNode attributeNode) { super(type); *************** *** 73,76 **** --- 79,87 ---- } + public AttributeProperty(AttributeNode attributeNode) { + this(String.class, attributeNode); + unknownType = true; + } + /** * Can read the value of the property. *************** *** 88,91 **** --- 99,105 ---- */ public boolean canWrite() { + if (unknownType) + return false; + return this.attributeNode.getAttributeInfo().isWritable(); } |