From: Julio G. <ju...@us...> - 2004-07-29 14:26:12
|
Update of /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/sfcore/componentdescription In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14878/componentdescription Modified Files: ComponentDescriptionImpl.java ComponentDescription.java Log Message: ComponentDescription methods renamed: getParent->sfContext getParent->sfParent And componentDescription.getContext().put() replaced by cd.sfAddAttribute()/sfReplaceAttribute() Index: ComponentDescription.java =================================================================== RCS file: /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/sfcore/componentdescription/ComponentDescription.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ComponentDescription.java 20 Jul 2004 13:32:09 -0000 1.5 --- ComponentDescription.java 29 Jul 2004 14:26:01 -0000 1.6 *************** *** 109,113 **** * @see #setContext */ ! public Context getContext(); /** --- 109,113 ---- * @see #setContext */ ! public Context sfContext(); /** *************** *** 129,133 **** * @see #setParent */ ! public ComponentDescription getParent(); /** --- 129,133 ---- * @see #setParent */ ! public ComponentDescription sfParent(); /** Index: ComponentDescriptionImpl.java =================================================================== RCS file: /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/sfcore/componentdescription/ComponentDescriptionImpl.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ComponentDescriptionImpl.java 27 Jul 2004 22:23:53 -0000 1.17 --- ComponentDescriptionImpl.java 29 Jul 2004 14:26:01 -0000 1.18 *************** *** 111,115 **** Reference r = parent.sfCompleteName(); ! Object name = parent.getContext().keyFor(this); if (name != null) { --- 111,115 ---- Reference r = parent.sfCompleteName(); ! Object name = parent.sfAttributeKeyFor(this); if (name != null) { *************** *** 187,191 **** * @see #setContext */ ! public Context getContext() { return context; } --- 187,191 ---- * @see #setContext */ ! public Context sfContext() { return context; } *************** *** 198,202 **** * @return old context * ! * @see #getContext */ public Context setContext(Context cxt) { --- 198,202 ---- * @return old context * ! * @see #sfContext */ public Context setContext(Context cxt) { *************** *** 214,218 **** * @see #setParent */ ! public ComponentDescription getParent() { return parent; } --- 214,218 ---- * @see #setParent */ ! public ComponentDescription sfParent() { return parent; } *************** *** 273,277 **** */ public Object sfResolveId(Object id) { ! return getContext().get(id); } --- 273,277 ---- */ public Object sfResolveId(Object id) { ! return sfContext().get(id); } *************** *** 282,286 **** */ public ReferenceResolver sfResolveParent() { ! return getParent(); } --- 282,286 ---- */ public ReferenceResolver sfResolveParent() { ! return sfParent(); } *************** *** 331,335 **** for (Enumeration e = context.keys(); e.hasMoreElements();) { ! Object value = res.getContext().get(e.nextElement()); if (value instanceof ComponentDescription) { --- 331,335 ---- for (Enumeration e = context.keys(); e.hasMoreElements();) { ! Object value = res.sfContext().get(e.nextElement()); if (value instanceof ComponentDescription) { *************** *** 442,449 **** ps.write("extends " + (compVal.getEager() ? "" : "LAZY ")); ! if (compVal.getContext().size() > 0) { ps.write(" {\n"); compVal.writeContextOn(ps, indent + 1, ! compVal.getContext().keys()); tabPad(ps, indent); ps.write('}'); --- 442,449 ---- ps.write("extends " + (compVal.getEager() ? "" : "LAZY ")); ! if (compVal.sfContext().size() > 0) { ps.write(" {\n"); compVal.writeContextOn(ps, indent + 1, ! compVal.sfContext().keys()); tabPad(ps, indent); ps.write('}'); *************** *** 677,681 **** } String cxtKey = key.substring(startWith.length()); ! compDesc.getContext().put(cxtKey, value); } } --- 677,685 ---- } String cxtKey = key.substring(startWith.length()); ! try { ! compDesc.sfAddAttribute(cxtKey, value); ! } catch (SmartFrogRuntimeException ex1) { ! //Logger.log(ex1); ! } } } |