简体   繁体   中英

rich:effect not working when a rich:panelMenu element is used elsewhere in the page

We have a Seam application that uses rich:effects in several places. They all worked fine until we decided to replace our old school menus with rich:panelMenu components.

At that point all the effects stopped working. It's clear that the inclusion of the rich:panelMenu items is the culprit, as the effects come back to life if we remove the menus from the header file (included in the main template, above the place where the body is inserted).

We're using Seam 2.2.0 GA with richfaces 3.3.2.SR1 and both rich:effect and rich:panelMenu seem to come from the same library. In both cases, the relevant javascript files seem to be included in the same order (judging by the script tags at the top of the page), and the only notable difference seems to be some additional local javascript segments the menu tags introduce.

The javascript error I get is this: Effect[A.type] is not a constructor

Thanks in advance for any suggestions/pointers.

Are there other RichFaces componentes in that page? When you insert rich:panelMenu, it will trigger to load jQuery/Prototype over that page. Are you using another version of jQuery/Prototype for your old school menus?

Check which jQuery version are you using. Open Firefug console (Firebug is an extension to Firefox) and write this (with and without rich:panelMenu):

jQuery().jquery

Another option: maybe your JavaScript's menu is overriding some JavaScript from jQuery/Prototype (used by rich:panelMenu).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM