-
1. Re: Hash is not a constructor
bostone Apr 23, 2008 8:50 PM (in response to bostone)OK, I know what the issue is. The page was already using prototype.js, so after removing script tag link to the prototype.js simple panel works as advertised. However, my JS code that was relying on prototype.js is now broken. For example, I see this error:
Class is not defined var Validator = Class.create();
The version of prototype.js I'm using is 1.5.0_rc2 from scriptaculous distribution.
Can you guys point to some documentation or just simply explain how to migrate my existing prototype code to not clash with richfaces? -
2. Re: Hash is not a constructor
bostone Apr 23, 2008 9:19 PM (in response to bostone)If anyone interested - It seems that simply providing a namespace for richfaces is not enough to load JS files. My stuff started working again after I:
1. Removed old script tag that was loading prototype.js
2. Placed at least one richfaces tag onto page (like rich:panel)
Voila - my old scripts came back to life -
3. Re: Hash is not a constructor
sergeysmirnov Apr 23, 2008 9:40 PM (in response to bostone)Richfaces loads script on-demand. No components to use it, no loading.
However, you load the script explicitly if needs.
See: http://livedemo.exadel.com/richfaces-demo/richfaces/script.jsf
Try src="resource://prototype.js" -
4. Re: Hash is not a constructor
bostone Apr 23, 2008 9:51 PM (in response to bostone)Thanks, I was looking at that. But since I'm planing on adding rich components to all my pages this shouldn't be an issue anyway