3 Replies Latest reply on Jul 1, 2008 3:20 PM by saravvij

    <rich:menuItem> is not working in FireFox

    saravvij

      Hi,

      I am using facelets1.2, rich-faces 3.2.1 GA and JSF RI 1.2.08 in my application. I am trying to create a top menu bar using rich faces components.

      This is my code:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html">
      
      <ui:composition>
      
       <style>
       .pic {
       margin-bottom: -4px;
       margin-right: 2px;
       }
       </style>
      <h:form>
      <rich:toolBar itemSeparator="line">
       <rich:toolBarGroup itemSeparator="none">
       <rich:dropDownMenu>
       <f:facet name="label">
       <h:panelGroup>
       <h:graphicImage value="/images/icons/copy.gif" styleClass="pic"/>
       <h:outputText value="File"/>
       </h:panelGroup>
       </f:facet>
       <rich:menuItem submitMode="ajax" value="New" ajaxSingle="true"></rich:menuItem>
       </rich:dropDownMenu>
       </rich:toolBarGroup>
      </rich:toolBar>
      </h:form>
      </ui:composition>
      </html>
      



      When I load this jsf file, It works in IE7, but, it does not work in firefox v2 and safari (Apple) browsers.

      The error in firefox is below:
      =====================

      XML Parsing Error: not well-formed
      Location: http://localhost:8080/web/templates/include/topMenu.jsf
      Line Number 15, Column 1716:<table border="0" cellpadding="0" cellspacing="0" class="dr-toolbar-ext rich-toolbar " id="j_id1:j_id2" width="100%"><tr valign="middle"><td class="dr-toolbar-int rich-toolbar-item " style=";"><div class="dr-menu-label dr-menu-label-unselect rich-ddmenu-label rich-ddmenu-label-unselect " id="j_id1:j_id4"><span class="dr-label-text-decor rich-label-text-decor"><img src="/dealsweb/images/icons/copy.gif" alt="" class="pic" />File</span><div style="margin: 0px; padding: 0px; border: 0px; position: relative; z-index: 100;"><div id="j_id1:j_id4_menu" class="dr-menu-list-border rich-menu-list-border" style="display: none; z-index: 2;"><div class="dr-menu-list-bg rich-menu-list-bg"><div class="dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled " id="j_id1:j_id8" onclick="this.className='dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled '; A4J.AJAX.Submit('_viewRoot','j_id1',event,{'parameters':{'j_id1:j_id8':'j_id1:j_id8','ajaxSingle':'j_id1:j_id8'} ,'actionUrl':'/dealsweb/templates/include/topMenu.jsf'} );" onmouseout="if (RichFaces.Menu.isWithin(event, this)) return; this.className='dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled '; $('j_id1:j_id8').style.cssText=';'; $('j_id1:j_id8:icon').className='dr-menu-icon rich-menu-item-icon '; Element.removeClassName($('j_id1:j_id8:anchor'), 'rich-menu-item-label-selected');" onmouseover="if (RichFaces.Menu.isWithin(event, this)) return; this.className='dr-menu-item dr-menu-item-hover rich-menu-item rich-menu-item-hover ';; $('j_id1:j_id8').style.cssText='; ; ;'; $('j_id1:j_id8:icon').className='dr-menu-icon dr-menu-icon-selected rich-menu-item-icon rich-menu
      ----------------------------------------------------------------------------------------------------------------------------------------
      




      The error in safari browser is below:
      =============================

      This page contains the following errors:
      error on line 15 at column 564: Char 0x0 out of allowed range
      Below is a rendering of the page up to the first error.



      I tested this page by removing the <rich:menuItem> component, it works, I am able to isolate problem with <rich:menuItem>. Could any one help me how to solve this ?

      Thanks
      Sarav