Problems with DropDownMenu
tkmyers Jun 19, 2007 1:03 PMPlease forgive my question if it seems too rudimentary. I'm just starting to use seam / JSF.
I'm having trouble implementing Drop Down menus using the example on the RichFaces demo site. I had a simple toolBar defined which was very easy. I'm running out of room so I thought Id switch to a drop down toolbar instead. But I'm getting this error:
<rich:dropDownMenu> Tag Library supports namespace: http://richfaces.ajax4jsf.org/rich, but no tag was defined for name: dropDownMenu
I have a couple of questions:
Aren't the required tags included automatically for a given JSF reference? The "rich:" tag prefix was used in the old menu so I thought it would be sufficient for the new one also. What am I missing?
On the example page, there are 2 menu items that link to Richfaces hrefs. In the menuItem definitions the URLs are listed twice, once for an onclick js method and the other in the h:outputLink. Are both of these required, or were they both specified to illustrate possible ways to accomplish actions? If both are required why is that so?
Here's the
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.ajax4jsf.org/rich"> <noscript class="noscript">You have JavaScript turned off. You MUST turn it on in order to use this application.</noscript> <div id="header" class="floating"> <a href="http://www.myCompany.com"><img src="img/masthead/companyLogo.gif"/></a> <div class="productBanner"> My Product Name </div> </div> <rich:toolBar styleClass="toolbar" itemSeparator="none" rendered="#{identity.loggedIn}"> <rich:dropDownMenu value="Top1"> <rich:menuItem submitMode="none"> <h:outputLink value="/top1Page.xhtml"> <h:outputText value="Top Page 1"> </h:outputText> </h:outputLink> </rich:menuItem> <rich:menuItem submitMode="none"> <h:outputLink value="/top2Page.xhtml"> <h:outputText value="Top Page 2"> </h:outputText> </h:outputLink> </rich:menuItem> </rich:dropDownMenu> <rich:dropDownMenu value="Top2"> <rich:menuItem submitMode="none"> <h:outputLink value="/top3Page.xhtml"> <h:outputText value="Top2 Page 1"> </h:outputText> </h:outputLink> </rich:menuItem> <rich:menuItem submitMode="none"> <h:outputLink value="/top4Page.xhtml"> <h:outputText value="Top2 Page 2"> </h:outputText> </h:outputLink> </rich:menuItem> </rich:dropDownMenu> </rich:toolBar> </ui:composition>