Adam Winer wrote:
One
of the items already on our todo list is moving all the functions,
classes, and variables inside a single top level object.
Using a single top-level object is something I've been considering
suggesting for a while.
MyFaces could create a single "myfaces" object for javascript, then
attach any further scripting to that object as "methods". This reduces
the namespace pollution to a single name.
Of course components can create their own "object", and attach it to the
global myfaces object as a member, and then hang their methods off that
object to avoid possible name collisions with other components.
myfaces = new Object();
myfaces.submitForm = function() {......}
myfaces.ajax = new Object();
myfaces.ajax.someMethod = function() {.....}
onchange="myfaces.submitForm()"
Adam: is this what you meant?
Regards,
Simon