8 Replies Latest reply on Sep 18, 2007 11:20 AM by Maksim Kaszynski

    richToolbar and redirect

    Miroslav Genov Newbie

      Hello guys,
      I have used toolBar component for my menu but I have a problem with it.
      The problem occurs when page is navigated without tag.
      This is my navigation rule.

      <navigation-case>
      <from-outcome>agreement</from-outcome>
      <to-view-id>/pages/agreement.jsf</to-view-id>
      </navigation-case>

      When user enters agreement.jsf page the toolBar component is not working correctly. The drop down menu doesn't show when mouse cursor is over it.
      This is a sample screen shot of the situation.
      http://profile.imageshack.us/user/mgenov/images/detail/#166/menudm6.jpg

      Any idea how to solve this ?

      Thanks in advance.

        • 1. Re: richToolbar and redirect
          Miroslav Genov Newbie

          In previous post I mean

          <redirect/>
          
          tag.

          I have missed it.

          PP: I'm doing a second post because I can find the edit button of my previous post.

          • 2. Re: richToolbar and redirect
            Ilya Shaikovsky Master

            show full code please.

            And if I understand you - you enter the page with DDMenu and it isn't shown if your rule is redirect?

            • 3. Re: richToolbar and redirect
              Ilya Shaikovsky Master

              Can't reproduce under 3.1.0 GA

              • 4. Re: richToolbar and redirect
                Miroslav Genov Newbie

                Hi again,

                That is the situation:

                My navigation page represents data table ( rich:table ) which displays data and also command buttons.

                <rich:column colspan="6" align="right">
                 <a4j:commandLink style="defaultLinkStyle" immediate="true" action="#{agreementView.editAgreement}" rendered="#{agr:isActionAllowed('editAgreement')}">
                <h:graphicImage value="/images/edit.gif" alt="???????????" />
                </a4j:commandLink>
                
                


                That is the action which is invoked.
                 public String editAgreement() {
                
                 Agreement agreement = (Agreement) getModel().getRowData();
                
                 setBean( "agreement", agreement );
                
                 setAddresses( agreement.getClient().getAddresses() );
                
                 log.debug( agreement.getAgreementid() );
                 return INavigationConstants.AGREEMENT_EDIT;
                 }
                

                Like INavigationConstancts.AGREEMENT_EDIT is declared in this way:

                public final static String AGREEMENT_EDIT = "agreement";
                


                And on last place but not at least the navigation rule
                <navigation-rule>
                 <from-view-id>*</from-view-id>
                 <navigation-case>
                 <from-outcome>agreement</from-outcome>
                 <to-view-id>/pages/agreement.jsf</to-view-id>
                 </navigation-case>
                ...................
                



                I hope this will help much more then previous posts.

                Thanks in advance.

                • 5. Re: richToolbar and redirect
                  Miroslav Genov Newbie

                  This is my menu which I have included in both pages.

                  <rich:toolBar id="mainMenu">
                  
                   <rich:dropDownMenu value="???????">
                   <rich:menuItem submitMode="ajax" value="????? ?? ??????????"
                   action="#{agreementView.toLoginPage}" />
                  
                   <rich:menuItem submitMode="ajax" value="?????"
                   action="#{agreementView.toLoginPage}" />
                  
                   </rich:dropDownMenu>
                  
                   <rich:dropDownMenu value="????????">
                  
                   <rich:menuItem value="?????? ???????"
                   action="#{agreementView.toNewAgreementPage}" rendered="#{agr:isActionAllowed('addAgreement')}" />
                  
                   <rich:menuItem submitMode="ajax" value="?????? ?? ??????????" action="#{agreementView.toAgreementsPage}" />
                  
                   </rich:dropDownMenu>
                  .................
                  






                  • 6. Re: richToolbar and redirect
                    Maksim Kaszynski Apprentice

                    Is this problem reproducible in any browser, or only IE?

                    • 7. Re: richToolbar and redirect
                      Miroslav Genov Newbie

                      Sorry, But I have checked it only on IE.

                      • 8. Re: richToolbar and redirect
                        Maksim Kaszynski Apprentice

                        There have been reported some problems with ajax navigation in IE.
                        Symptoms are basically the same as yours - scripts don't work as expected.
                        As a work-around I recommend you make all of your navigation menuItems submit in server mode.