aspose file tools*
The moose likes JSF and the fly likes How to add an icon to rich:dropDownMenu dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to add an icon to rich:dropDownMenu dynamically" Watch "How to add an icon to rich:dropDownMenu dynamically" New topic
Author

How to add an icon to rich:dropDownMenu dynamically

Akaine Harga
Ranch Hand

Joined: Nov 03, 2009
Posts: 84

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


Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
willCodeForFood("Java,PHP,C#,XML,VBS,XHTML,CSS,JavaScript,SQL"); //always looking for job opportunities in AU/NZ/US/CA/Europe :P
Akaine Harga
Ranch Hand

Joined: Nov 03, 2009
Posts: 84

anyone?
 
 
subject: How to add an icon to rich:dropDownMenu dynamically