11 Replies Latest reply on Jan 14, 2009 4:51 AM by oichris

    DropdownMenu error

      Dear All,

      I am trying to use the Richfaces Dropdown menu, I follow exactly the same as the livedemo, but it failed to generate correctly. After checking with the source code generated, I found some weird code generated :

      in Firefox 2:
      $('j_id1:j_id11:icon').className='dr-menu-icon dr-me�u-icon-selected rich-menu-item-icon rich-menu-item-icon-selected ';

      in IE 7:
      $('j_id1:j_id13:icon').className='dr-menu-icon dr-me u-icon-selected rich-menu-item-icon rich-menu-item-icon-selected ';

      the strange character makes firefox failed to generate the page. But in IE, it simply ignore it because it is just a weird class name. This code is generated using Richfaces 3.3.0 GA (The latest version).
      With Richfaces 3.2.2 GA, similar problem but the strange character appeared in the
      " lement.addClassName($('j_id1:j_id13:anchor'), 'rich-menu-item-label-selected');"

      Sometimes the 'E' character of "Element", sometimes the 'a' character of "addClass" become the weird character and thus generating JS exception in IE and failed to render the page in FF.

      Any idea on what's happening?

      Thanks.
      [/img]

        • 1. Re: DropdownMenu error

          After some more testings,
          I found the problem is most probably lie in the generation of < rich:menuItem>. As I tried to create the 'simplest' one without any item, it finally success to display in Firefox :

          < h:form>
          < rich:toolBar>
          < rich:dropDownMenu>
          < f:facet name="label">
          < h:panelGroup>
          < h:graphicImage value="/common/images/icons/copy.gif" styleClass="pic" />
          < h:outputText value="File" />
          < /h:panelGroup>
          < /f:facet>
          < /rich:dropDownMenu>
          < /rich:toolBar>
          < /h:form>

          but if I add a simple menuItem inside the dropDownMenu :
          < rich:menuItem value="New"/>
          it generates weird character.

          • 2. Re: DropdownMenu error

            Look like a famous problem of JSF RI 1.2_08.
            What the JSF implementation version you use?

            • 3. Re: DropdownMenu error

              Thanks for your reply.
              I have no idea about the famous problem, could you please kindly provide some sort of link for me to reference? Thanks a lot.

              My JSF version is : 1.2_08-b06-FCS

              • 4. Re: DropdownMenu error

                I got the solution on web. Thanks.
                Upgrading to 1.2_09 solves the weird character problem. But still, in firefox the dropdownmenu does not work~ the dropdown menu does not appear, but fine in IE. Any idea ?

                • 5. Re: DropdownMenu error

                  Further test shows that only Firefox3 successfully display the dropdownMenu. Firefox2 fails.

                  Is it a known bug? Any workaround?

                  Thanks a lot.

                  • 6. Re: DropdownMenu error
                    antoine_h

                    Hello,

                    I wish also the DropDownMenu works on Firefox 2.

                    nice specification and tracking of the bug : may be open a JIRA ?
                    (If not yet in it : did you looked at the jira ?).

                    Thanks,

                    • 7. Re: DropdownMenu error

                      Yea ~~
                      I have finally figured that out ~~~
                      It teaches me a good habit to stick STRICTLY to the HTML standard ~~~

                      You MUST have a "< body>" tag wrapped as the parent of DropdownMenu to make it work under Firefox2.

                      • 8. Re: DropdownMenu error
                        ilya_shaikovsky

                        I've just opened live richfaces-demo and the menu works fine in FF2 :/

                        • 9. Re: DropdownMenu error

                          I know the live demo works fine in FF2~~
                          As I mentioned in my previous post ~
                          it doesn't specify that we must have a < body> tag to make it work ~~ (because the live demo already contained it~!)

                          And normally I expect it to work correctly if I simply copy and paste the provided source into my page~~ but it is not the case.
                          BODY!!!BODY!!!!BODY!!!!!

                          • 10. Re: DropdownMenu error
                            ilya_shaikovsky

                            sorry :) I've open the page to answer before you made a post but posted after you already done with the answer ;)

                            • 11. Re: DropdownMenu error

                              No problem~!

                              Thanks for your attention indeed.