URL argument support for the Template and Script servlets

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2905 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-05-17 10:02:07 +00:00
parent df8bb065e9
commit c1f6eb64cb

View File

@@ -40,9 +40,16 @@ public class ScriptableHashMap<K,V> extends HashMap implements Scriptable
*/ */
public Object get(String name, Scriptable start) public Object get(String name, Scriptable start)
{ {
// get the property from the underlying map // get the property from the underlying QName map
if ("length".equals(name))
{
return this.size();
}
else
{
return get(name); return get(name);
} }
}
/** /**
* @see org.mozilla.javascript.Scriptable#get(int, org.mozilla.javascript.Scriptable) * @see org.mozilla.javascript.Scriptable#get(int, org.mozilla.javascript.Scriptable)