![]() Import įacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Open action has activiated asynchrounsly !")) Those menuitems are actually actions likewise p:commandButton, so it’s also applicable for you to ajaxify them. Menus can be created programmatically as well, this is more flexible compared to the declarative approach. You can define like that menu by using instance. ![]() Components like p:submenu, p:menuitem and p:separator have also their default implementation that are used for define programmatic menu. Live examples of the OmniFaces components and utilities can be tried out here.Ĭheck out the left side menu togglable menu behind the logo above for all of 'em! Open.Welcome to the OmniFaces Showcase application! Private MenuModel menu = new DefaultMenuModel() ĭefaultSubMenu file = new DefaultSubMenu("File") ĭefaultSubMenu help = new DefaultSubMenu("Help") ĭefaultMenuItem open = new DefaultMenuItem("Open") ĭefaultMenuItem edit = new DefaultMenuItem("Edit") ĭefaultMenuItem exit = new DefaultMenuItem("Exit") ĭefaultMenuItem about = new DefaultMenuItem("About Primefaces") ĭefaultMenuItem contact = new DefaultMenuItem("Contact Us") ĭefaultMenuItem helpMenuItem = new DefaultMenuItem("Help") Following example shows you the same business scenario that you’ve developed before, this time the menu will be rendered programmatically. Please note that OmniFaces is a JSF utility library, not a JSF UI/component library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |