2 Replies Latest reply on Jan 22, 2008 7:46 AM by Bas Rutten

    rich:menu problem with style information

    Bas Rutten Newbie

      I have recently upgraded a web application from Seam 2.0.0 and Richfaces 3.1.1.GA to Seam 2.0.1.CR1 and Richfaces 3.1.3.GA (both versions using Facelets 1.1.14)

      This has caused my menu bar to get totally messed up. I've tried some things (using the Firefox WebDeveloper plugin) and it appears there is no CSS information associated with rich:toolBar, rich:menuItem and rich:dropDownMenu at all.

      This is the code that renders the menu bar with dropdown menus:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:s="http://jboss.com/products/seam/taglib"
       >
      <ui:composition>
      <h:form>
       <rich:toolBar>
       <rich:toolBarGroup itemSeparator="line" location="left">
       <rich:menuItem submitMode="ajax" value="Home" onclick="document.location.href='home.faces'" />
       <rich:dropDownMenu value="My investment requests" rendered="#{identity.loggedIn}" >
       <rich:menuItem submitMode="ajax" value="To be approved by me" action="#{investmentAction.searchMyApprovals}"/>
       <rich:menuItem submitMode="ajax" value="Requested by me" action="#{investmentAction.searchMyInvestmentRequests}" />
       </rich:dropDownMenu>
       <rich:menuItem submitMode="ajax" value="Search investment requests" action="#{investmentAction.searchInvestmentRequests}" rendered="#{identity.loggedIn}" />
       <rich:dropDownMenu value="Request investment" style="z-index:110" rendered="#{identity.loggedIn}" >
       <rich:menuItem submitMode="ajax" value="Investment" action="#{investmentAction.createInvestmentRequest}" />
       <rich:menuItem submitMode="ajax" value="Divestment" action="#{investmentAction.createDivestment}" />
       <rich:menuItem submitMode="ajax" value="Acquisition" action="#{investmentAction.createAcquisition}" />
       <rich:menuItem submitMode="ajax" value="Disposal" action="#{investmentAction.createDisposal}" />
       <rich:menuItem submitMode="ajax" value="IT investment" action="#{investmentAction.createItInvestment}" />
       <rich:menuItem submitMode="ajax" value="Restructuring" action="#{investmentAction.createRestructuring}" />
       <rich:menuGroup value="Real Estate" style="z-index:110">
       <rich:menuItem submitMode="ajax" style="position:relative;z-index:110" value="Investment" action="#{investmentAction.createRealEstateInvestment}" />
       <rich:menuItem submitMode="ajax" style="position:relative;z-index:110" value="Divestment" action="#{investmentAction.createRealEstateDivestment}" />
       <rich:menuItem submitMode="ajax" style="position:relative;z-index:110" value="Sale and lease back" action="#{investmentAction.createRealEstateSaleAndLease}" />
       <rich:menuItem submitMode="ajax" style="position:relative;z-index:110" value="New lease replacing previous lease" action="#{investmentAction.createRealEstateNewLease}" />
       </rich:menuGroup>
       </rich:dropDownMenu>
       <rich:dropDownMenu value="Organization" rendered="#{identity.loggedIn and authorizationAction.systemOrLevelAdmin}" >
       <rich:menuItem submitMode="ajax" value="Approval Tree" action="#{organizationalLevelAction.searchAll}" />
       <rich:menuItem submitMode="ajax" value="Search Users" action="#{userAction.searchAdvanced}" rendered="#{s:hasRole('admin')}" />
       <rich:menuItem submitMode="ajax" value="Approval Flow" action="#{organizationalLevelAction.searchOrganizationalTree}"/>
       </rich:dropDownMenu>
       <rich:dropDownMenu value="Admin" rendered="#{s:hasRole('admin')}">
       <rich:menuItem submitMode="ajax" value="Administrators" action="#{administratorAction.searchAll}" />
       <rich:menuItem submitMode="ajax" value="Keywords" action="#{configurationAction.searchAll}" />
       <rich:menuItem submitMode="ajax" value="Documentation" action="#{documentationAction.searchAll}" />
       <rich:menuItem submitMode="ajax" value="Notifications" action="#{notificationAction.searchAll}" />
       <rich:menuItem submitMode="ajax" value="Consultants" action="#{consultantAction.searchAll}" />
       <rich:menuItem submitMode="ajax" value="Garbage collect" action="#{configurationAction.garbageCollect}" />
       </rich:dropDownMenu>
       </rich:toolBarGroup>
       <rich:toolBarGroup itemSeparator="line" location="right">
       <rich:menuItem submitMode="ajax" value="Documentation" rendered="#{identity.loggedIn}" action="#{documentationAction.viewAll}" />
       <rich:menuItem submitMode="ajax" value="Logout" rendered="#{identity.loggedIn}" action="#{identityAction.logout}" />
       </rich:toolBarGroup>
       </rich:toolBar>
      </h:form>
      </ui:composition>
      </html>
      


      Let me point out that this worked like a charm under Seam 2.0.0.CR1/Richfaces 3.1.1.GA; now, however, everything is a mess. Menu items are spread out all over the screen, there is a bunchof IFrames obstructing the rest of the screen, and no backgrounds or colors are rendered.

      Only the menu stuff seems broken; the rest of the pages looks fine. I have not changed anything else with regard to packaging or libraries. Richfaces-api.jar is in the EAR and Richfaces-ui.jar and richfaces-impl.jar are in the WAR.

      Any help would be appreciated