6 Replies Latest reply on Oct 19, 2007 12:26 PM by mduc

    URL in dropDownMenu

    gledson.rabelo

      Is possible use a url like "http://www...." in the dropdownmenu component from the CVS?

      Thanks in Advance



        • 1. Re: URL in dropDownMenu

          You can define the "label" facet for menu option and use regular h:outputLink there.

          • 2. Re: URL in dropDownMenu

            I have realized that I answered not your question above.

            If you want to use URL in the menuItem, you can do the following:

            <rich:menuItem value="My Site" mode="none" onclick="document.location.href='http://www.....'" />


            You also can add h:outputLink to be more friendly for Search Engines such as Google:

            <rich:menuItem mode="none" onclick="document.location.href='http://www.....'">
             <h:outputLink value="http://www.....">
             <h:outputText value="My Site" />
             </h:outputLink>
            </rich:menuItem>
            


            • 3. Re: URL in dropDownMenu
              krica

              Hi,

              Can you tell me how to add a seam link (s:link)? I need links with conversation propagation "end". I took the sample and simply added the following for the first dropdownmenu defined:

               <rich:menuItem id="menuItem99" value="">
               <s:link view="/xxx/yyy.xhtml" propagation="end" value="Some Title"/>
               </rich:menuItem>
              


              But nothing happens when i click on the menuItem. I did not add the onclick event to the menuItem because I need seam to provide the conversation id in the link.

              • 4. Re: URL in dropDownMenu

                Pay attention on attribute 'mode'. It should be set to "none" to make a internal link workable.

                Only problem with link without 'onclick' is an active zone. Only the link itself will be clickable.

                P.S. 'mode' should be renamed to 'submitMode' in the final 3.0.1 (according to Func Spec)

                • 5. Re: URL in dropDownMenu
                  gledson.rabelo

                  Sergey, Thanks for your reply.

                  • 6. Re: URL in dropDownMenu
                    mduc

                     

                    Pay attention on attribute 'mode'. It should be set to "none" to make a internal link workable.

                    Only problem with link without 'onclick' is an active zone. Only the link itself will be clickable.

                    P.S. 'mode' should be renamed to 'submitMode' in the final 3.0.1 (according to Func Spec)


                    Is it likely that in the future, we will be able to have the 'full' active zone with an s:link? I have a lot of menuItems in my app. and most of them are simple url navigation but I have a few where I need to pass EL parameters which as far as I know cant be done using the 'onclick' approach. The result is just what you stated, I have a few menuItems where you must click the actual link for the redirection to work. I know this is a detail but somehow users always point it out to me.

                    Thanks for any help.