Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add an icon to rich:dropDownMenu dynamically

 
Akaine Harga
Ranch Hand
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I wrote a method which generates richfaces toolbar and fills it with dropdown menus and corresponding menuitems. What I want now is to add icons to dropDownMenu elements (not to the menuItems).

In richfaces tutorials I can see that they use f:facet element as dropDownMenu's first child and then some additional JSF elements inside. I had no problems generating the last ones since they can be easily found in JSF API (javax.faces.component.html.HtmlPanelGroup, javax.faces.component.html.HtmlGraphicImage and javax.faces.component.html.HtmlInputText). The facet element has become a problem though.

So the questions are:
- Is it possible to create facet element and add the needed structure under it?
- Do I really need to do all this at all?
- Is there any other way to achieve the mentioned above goal? (maybe by playing with HtmlDropDownMenu object)

Just to explain myself better, here's an example of my toolbar generator:
Thanks in advance
 
Akaine Harga
Ranch Hand
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic