title: Richfaces 4 dynamically created rich components display as text instead of menus/links
body: <p>I'm migrating from RF3.3.3, JSF1.2 and jboss 5 to JSF2/ RF4.  We have a rich toolbar group with dropdown menus that is generated from a database table.  I made the changes to web.xml, renamed the applicable components in the backing bean, but the toolbar will only show as text instead of dropdown menus and links.</p>
  
  <p>web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
   &lt;context-param&gt;
    &lt;param-name&gt;org.richfaces.enableControlSkinning&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
   &lt;/context-param&gt;
   &lt;context-param&gt;
    &lt;param-name&gt;org.richfaces.enableControlSkinningClasses&lt;/param-name&gt;
    &lt;param-value&gt;false&lt;/param-value&gt;
   &lt;/context-param&gt;
  
   &lt;context-param&gt;
    &lt;param-name&gt;org.richfaces.resourceOptimization.enabled&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
   &lt;/context-param&gt;
  
   &lt;context-param&gt;
    &lt;param-name&gt;org.richfaces.skin&lt;/param-name&gt;
    &lt;param-value&gt;blueSky&lt;/param-value&gt;
   &lt;/context-param&gt;
  </code></pre>
  
  <p>menu.xhtml - included in a template.xhtml with h:head and h:body tags:</p>
  
  <pre><code>&lt;h:form id="mnMenu"&gt;
  &lt;rich:toolbar id="tb" &gt;
      &lt;rich:toolbarGroup&gt;
      &lt;s:link id="menuHomeId" view="/home.xhtml" value="Home" propagation="none"/&gt;
      &lt;/rich:toolbarGroup&gt;
  
      &lt;rich:toolbarGroup binding="#{menuQueries.myBarGrp}" /&gt;
  
  &lt;/rich:toolbar&gt;
  &lt;!-- account for jsf bug? bug DOESN'T WORK --&gt;
      &lt;rich:toolbar rendered="false"/&gt;
      &lt;rich:toolbarGroup rendered="false"/&gt;
      &lt;rich:dropDownMenu rendered="false"/&gt;
      &lt;rich:menuGroup rendered="false"/&gt;
      &lt;rich:menuItem rendered="false"/&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>from backing bean - this method creates the toolbar group, it originally looked like this:</p>
  
  <pre><code>public HtmlToolBarGroup getMyBarGrp()
  {
       this.myBarGrp = new org.richfaces.component.html.HtmlToolBarGroup();
       for (CtsPermissionHierarchyAltV each : this.getMainMenuList()) {
            this.myBarGrp.getChildren().add(getDropDownMenu(each));
       }
  return this.myBarGrp;
  }
  </code></pre>
  
  <p>I changed it to this, both generate the same output: </p>
  
  <pre><code>public UIToolbarGroup getMyBarGrp()
  {
       FacesContext ctx = FacesContext.getCurrentInstance();
       this.myBarGrp = (UIToolbarGroup) ctx.getApplication().createComponent(ctx,     
        UIToolbarGroup.COMPONENT_TYPE, "org.richfaces.ToolbarGroupRenderer");
       this.myBarGrp.setId("dynMenuGrp");
       for (CtsPermissionHierarchyAltV each : this.getMainMenuList()) 
       {    
            this.myBarGrp.getChildren().add(getDropDownMenu(each));
       }
  }
  </code></pre>
  
  <p>the getDropDownMenu and submenu methods are coded similarly.
  I'm not getting any errors.  FF firebug output for text that should be a dropdown menu looks like this:</p>
  
  <pre><code>&lt;div id="mnMenu:Communications" class="rf-ddm-lbl rf-ddm-unsel "&gt;
  ... more stuff
  </code></pre>
  
  <p>Pre-migration it looked like this:</p>
  
  <pre><code>&lt;div id="mnMenu:Communications" class="rich-ddmenu-label rich-ddmenu-label-unselect"&gt;
  ... more stuff
  </code></pre>
  
  <p>Navigating through the firebug output I can see all the submenus - but they're all text references. 
  I see all my css files - they're showing up in body instead of head, but they're all there.
  Did I miss something?  What else can I check?</p>
  
  <p>jboss 7.1.1 Seam 2.3.0 JSF2.1 RichFaces 4.2.2</p>