Currently we are working on the migration of Richfaces 3 to Richfaces 4.
Our project comprises of Spring MVC + Spring Webflow + JSF 2 + Richfaces 4.
We have used Richfaces version 4.1.0.Final in our project.
We are building the menus dynamically from the database and it is bound to the richfaces toolbar.
@Service
public
public UIToolbar getMenuToolbar() {
if(menuToolbar == null) {
menuToolbar = new UIToolbar();
UIDropDownMenu downMenu;
downMenu =
new UIDropDownMenu();UIOutput output =
new UIOutput();output.setValue(
"File");downMenu.getFacets().put(
"label", output);
UIMenuGroup menuGroup;
menuGroup =
new UIMenuGroup();menuGroup.setLabel(
"Save Group");
UIMenuItem item;
item =
new UIMenuItem();item.setLabel(
"Save");menuGroup.getChildren().add(item);
item =
new UIMenuItem();item.setLabel(
"Save All");menuGroup.getChildren().add(item);
downMenu.getChildren().add(menuGroup);
menuToolbar.getChildren().add(downMenu);}
return menuToolbar;}
public void setMenuToolbar(UIToolbar menuToolbar) {
this.menuToolbar = menuToolbar;}
}
class UserService {
private UIToolbar menuToolbar;
The menu is rendered to the HTML, but the java script and CSS files associated with menus are not rendered to the HTML. Hence the menu appears simply like text.
I have attached the menu layout screen shot.
Thanks in advance