Hi all,

I am trying to get YUI menu bar working. I have downloaded the yui-1.4.1
jar from wicketstuff's subversion repository. I have the a createMenuBar
method in my class and html template.

---------------------------------Class Method Called From Page
Constructor---------

   private void createMenuBar(){
                menuBar = new YuiMenuBar("menuBar"){
                        @Override
                        protected String getOpts()
                        {
                                Attributes attributes = new Attributes();
                                attributes.add(new Attributes("visible", true));
                                attributes.add(new Attributes("clicktohide", 
true));
                                attributes.add(new 
Attributes("autosubmenudisplay", true));
                                attributes.add(new Attributes("hidedelay", 
5000));
                                attributes.add(new
Attributes("effect","{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25}"));
                                return attributes.toString();
                        }
                };
                menuBar.setOutputMarkupId(true);

                YuiMenuBarItem sample = menuBar.addMenu("Sample1");
                YuiMenuBarItem sampleSet = menuBar.addMenu("Sample2");
                YuiMenuBarItem batch = menuBar.addMenu("Sample3");
                YuiMenuBarItem instrument = menuBar.addMenu("Sample4");
                YuiMenuBarItem report = menuBar.addMenu("Sample5");
                YuiMenuBarItem admin = menuBar.addMenu("Sample6");

                YuiMenu subMenu = sample.newSubMenu("mb_sample");
                subMenu.addMenuItem(new TestAction("Sub Sample1"));
                subMenu.addMenuItem(new TestAction("Sub Sample2"));

                subMenu = sampleSet.newSubMenu("Test");
                subMenu.addMenuItem(new TestAction("Sub Sample3"));
                subMenu.addMenuItem(new TestAction("Sub Sample4"));

                this.add(menuBar);

        }

-----------------HTML Template ----------------------

<html>
<head><title wicket:id="pageTitle">Page Title</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
    <div wicket:id="menuBar">[Menu Bar]</div>
</body>
</html>


I get the first level of the menu bar but no submenu's clicking or
hovering on the main menu link just results in the menu item being
highlighted in yellow.

What am I missing?

regards

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to