8 Replies Latest reply on Feb 12, 2009 11:47 AM by Inocêncio Oliveira

    Issues with rich:menuItem

    Inocêncio Oliveira Newbie

      Hi,

      I noticed that rich:menuItem does not work as well at some browsers.

      When I use submitMode as ajax, the menu works well at W3C browsers, but begin to not work at IE browser.

      If I drop this attribute away, the menu works well at IE but appearing not working at W3C browsers.

      I used a4j:jsFunction to turn it around, but it is not the best implementation to fix it. I will be greatfull if some advice and light comes!

      Thanks all so much. Regards!

        • 1. Re: Issues with rich:menuItem
          Ilya Shaikovsky Master

          I'm sure that something with your page in general.. but not with the menu component. because :
          http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf
          works fine in any browser. (first menu in ajax mode)

          • 2. Re: Issues with rich:menuItem
            Inocêncio Oliveira Newbie

             

            "ilya_shaikovsky" wrote:
            I'm sure that something with your page in general.. but not with the menu component. because :
            http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf
            works fine in any browser. (first menu in ajax mode)


            Thanks Ilya,

            But it is very weird, I isolated the menu into another page, just with <f:view> and <h:form>, but the result is the same.

            I have no Idea why the menu behaivor is so weird.

            • 3. Re: Issues with rich:menuItem
              Ilya Shaikovsky Master

              so provide more full environment details, setting and page.. Or you could share example somewhere.

              • 4. Re: Issues with rich:menuItem
                Inocêncio Oliveira Newbie

                Following...

                the jsp root:

                <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
                 xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:c="http://java.sun.com/jstl/core"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:a4j="http://richfaces.org/a4j"
                 xmlns:rich="http://richfaces.org/rich"
                 version="2.0">
                


                the code that contain the menu... (I have setted one h:form exclusively for the menu)

                 <c:set var="administrador" value="${sistemaBean.loginAtualPerfilAdministrador}"/>
                 <c:if test="${administrador}">
                 <html>
                 <head>
                 <title><h:outputText value="#{sistemaBean.aplicacao.sigla}"/>-<h:outputText value="#{sistemaBean.aplicacao.nome}"/></title>
                 <style type="text/css">
                 td {font-size:11px;font-family:verdana}
                 </style>
                 </head>
                 <body style="border: none;" bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0">
                 <f:view>
                 <table cellspacing="0" cellpadding="0" width="100%" border="0">
                 <tr style="height:10px;">
                 <h:form>
                 <td colspan="4">
                 <rich:toolBar width="100%" style="padding:0px;padding-bottom:0px;margin_bottom:0px" styleClass="menu" itemSeparator="line">
                 <rich:toolBarGroup style="height:15px;padding:0px;padding-bottom:0px;margin_bottom:0px" widthlocation="left">
                 <rich:dropDownMenu style="height:15px;" value="Administracao" direction="bottom-right">
                 <rich:menuItem submitMode="ajax" value="Areas de Acao" action="#{areaAcaoLSTBean.listar}" />
                 <rich:menuItem submitMode="ajax" value="Fatores da Avaliacao" action="#{fatorAvaliacaoLSTBean.listar}" />
                 <rich:menuSeparator/>
                 <rich:menuItem submitMode="ajax" value="Processos de Avaliacao" action="menuProcessoAvaliacaoLST" />
                 <rich:menuItem submitMode="ajax" value="Comissoes da Avaliacao" action="menuComissaoAvaliadoraLST" />
                 </rich:dropDownMenu>
                 <rich:dropDownMenu style="height:15px;" value="Relatórios" direction="bottom-right">
                 <rich:menuItem submitMode="ajax" value="Avaliacao Individual" action="menuAvaliacaoIndividualREL"/>
                 <rich:menuItem submitMode="ajax" value="Avaliacoes" action="menuAvaliacaoREL"/>
                 <rich:menuItem submitMode="ajax" value="Comissoes Avaliadoras aguardando Aprovacao" action="menuComissaoAvaliadoraREL"/>
                 <rich:menuItem submitMode="ajax" value="Comissoes Avaliadoras Aprovadas" action="menuComissaoAvaliadoraAprovadaREL"/>
                 <rich:menuItem submitMode="ajax" value="Servidores com Lacunas de Avaliacao" action="menuServidorLacunaAvaliacaoREL"/>
                 <rich:menuItem submitMode="ajax" value="Solicitacoes por Area de Acao" action="menuSolicitacaoAreaAcaoREL"/>
                 <rich:menuItem submitMode="ajax" value="Unidades com Lacunas de Avaliacao" action="menuUnidadeLacunaAvaliacaoREL"/>
                 </rich:dropDownMenu>
                 </rich:toolBarGroup>
                 <rich:toolBarGroup location="right">
                 <h:outputText value="Versao: #{sistemaBean.versao} #{sistemaBean.ambiente}"/>
                 </rich:toolBarGroup>
                 </rich:toolBar>
                 </td>
                 </h:form>
                .
                .
                .
                


                Thank you again for patience.

                • 5. Re: Issues with rich:menuItem
                  Ilya Shaikovsky Master

                  check please the page with Tidy validator for such cases. As I know the form element can't be nested for tr element. So the generated code just invalid.

                  • 6. Re: Issues with rich:menuItem
                    Inocêncio Oliveira Newbie

                    I put the menu in another h:form without any content, the same result here.

                    I will look for this this tinty validator.

                    • 7. Re: Issues with rich:menuItem
                      Bjørn T Johansen Newbie

                      I have the same problem... Did you find out why, Grinvon?

                      BTJ

                      • 8. Re: Issues with rich:menuItem
                        Inocêncio Oliveira Newbie

                         

                        "bjorntj" wrote:
                        I have the same problem... Did you find out why, Grinvon?

                        BTJ


                        I continues looking for something to fix it.

                        I "solved" using javascript to check the browser and render each menu for corresponding browser request.

                        But I know that isn´t the best maner to handle it. If I find some tips I will post back here!