![]() So the answer is, that it is not possible to set ID's for MenuItems at the moment. The Id you set in the Backend gets overwritten again in PrimeFaces Class BaseMenuRenderer, encodeEnd() with generateUniqueIds(.) Now the contextMenu will point to a which is a jsf component as required by PrimeFaces documentation for contextMenu and the contextMenu for every Menu Item appeared. I created the menu with plain old html and Īnd added the conext menu below that like Connect and share knowledge within a single location that is structured and easy to search. ![]() So i reverted back to DefaultMenuModel and added a contextMenu for everyMenuItem like: for (AuthTransactions subMenus : subTransactions)") ĬtParam("menuTransactionCode", subMenus.getTransactionCode()) ĬtOnclick("PF('statusDialog').show()") But when i added the contextmenu for attribute for those ids i kept gettingĮxception in page: Cannot find component for expression "leftmenu:sm_leftmenu_KEYSTORE_MANAGEMENT" referenced from "leftmenu:j_idt240:0:j_idt226". Currently, when I click one of the links, the center area's contents will. However, my side menu contains links that will change the contents of the center area. I tried with DynamicMenuModel as suggested and i added my own custom ids to the menu items. I'm trying to arrange them using PrimeFaces layouts as follows: Header ->North. I had the same exact problem and this is how i fixed it. ![]() In other words - I want to get this behaviour: When I change it to: uiComponent = (UIComponent) rootView This ist unimportant that I have clicked MenuItem or just Menu component. It displays context menu on whole Menu bar. UPDATE - When I add: uiComponent = (UIComponent) rootView English French German Italian Korean Spanish Catalan Dutch Portuguese Portuguese Arabic Czech Greek Persian Hindi Indonesian Croatian Japanese Hungarian Hebrew Georgian Lithuanian Latvian Norwegian Polish Romanian Russian Slovak Slovenian Serbian Swedish Turkish. Menu appears, but ContextMenu were not shown when I do right-click on MenuItem with "Redirect" label. Change the locale of the datepicker, schedule and client side validation messages. MenuItem ctxItem = new DefaultMenuItem("Remove from favorities") MenuModel ctxModel = new DefaultMenuModel() I want to programmatically create p:menu with MenuItems (it works) and each MenuItem should has p:contextMenu (it doesn't work).ĭefaultMenuItem item = new DefaultMenuItem("Redirect")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |