-
1. Re: Issue with <rich:toolbar/> after migrating to Richfaces 4
bleathem Nov 24, 2011 12:30 PM (in response to marius.bogoevici)Hi Marius,
Do you get any output in the javascript error console of your browser? Any errors in the server log?
Brian
-
2. Re: Issue with <rich:toolbar/> after migrating to Richfaces 4
marius.bogoevici Nov 24, 2011 12:35 PM (in response to bleathem)Not as far as I can tell. Neither Firebug is telling me too much.
I tried to compare the generated pages with and without the toolbar, but it cannot see anything besides the javascript.
-
3. Re: Issue with <rich:toolbar/> after migrating to Richfaces 4
bleathem Nov 24, 2011 12:57 PM (in response to bleathem)Running your application, I get the error in chrome:
Uncaught TypeError: Cannot read property 'InplaceInput' of undefined
I am able to get it to work if I comment out the resource mapping in the web.xml:
<!-- <context-param> <param-name>org.richfaces.resourceMapping.enabled</param-name> <param-value>true</param-value> </context-param> -->
I wonder if one of those componentsthe resource it's looking for is not included in the mapping file. I'll dig in a bit further, and post back.
-
4. Re: Issue with <rich:toolbar/> after migrating to Richfaces 4
bleathem Nov 24, 2011 4:22 PM (in response to bleathem)Marius, you've uncovered a bug for us, thanks!
I talked through the problem with Lukas, and it turns out the problem is the toolbar is calling for it's javascript resource first (and doesn't itslef require the jsf.js resource). When resourceMapping is disabled, this works fine, as the toolbar js doesn't require jsf.js.
However, when using resourceMapping, the toolbar.js requirement brings in packed.js, which does need jsf.js. hence the error is thrown. Fixing this is rigorously is tricky, as we are limited in how we can interact with the JSF resource loader.
I'll dig in further, and post back.
-
5. Re: Issue with <rich:toolbar/> after migrating to Richfaces 4
marius.bogoevici Nov 24, 2011 4:31 PM (in response to bleathem)Thanks, Brian!
I'll avoid using <rich:toolbar/> for now - thanks for confirming where the issue actually was.
Marius
-
6. Re: Issue with <rich:toolbar/> after migrating to Richfaces 4
bleathem Nov 24, 2011 5:25 PM (in response to marius.bogoevici)Having had a good look at the hooks JSF provides into resource hadnling, we've determined a fix for this is out of scope for 4.1.0.
however, we have a workaround. If you include an ajax enabled component in your template, it will make sure the call for jsf.js occurs before the call for packed.js. I low impact component to include is something like:
<a4j:jsFunction name="_nothing"/>
Trying this out in the example appication provided resolves the problem.
-
7. Re: Issue with <rich:toolbar/> after migrating to Richfaces 4
bleathem Nov 24, 2011 9:05 PM (in response to bleathem)I created a jira to track this issue: