How to load dynamically generated html?
<p>I develop a primefaces project. Since primefaces's dynamically generated menus are not capable of showing tooltips(or it was my fault), I tried to generate a html menu with almost 10K nodes as string and load it. However, the page was opened in almost 10 seconds.This decreased the performance too much. I basically need to have server side generated menu data, tooltips on menuitems. Is there any way to achieve this?</p>

<pre><code> @ApplicationScoped
 @ManagedBean
 public Class MenuManagedBean{

 private String htmlCode;

 public void menuHtml(){
 //here I generate all &lt;li&gt;'s and data inside it.
 }

  public void setHtmlCode(String htmlCode) {
   this.htmlCode= htmlCode
}

public String gethtmlCode() {
   return htmlCode;
}
 }
</code></pre>

<p>In xhtml page:</p>

<pre><code>  &lt;h:form&gt; &lt;p:outputLabel value=#{menuManagedBean.htmlCode} escape="false" &lt;/form&gt;
</code></pre>