Main menu separator

Post Reply
pfroy
Posts: 38
Joined: 09 Sep 2015, 18:20

13 Sep 2019, 17:25

Hi,

I'm not sure why I don't see menu separator in the layout main menu while I can see they in the context menu. What are the main difference between regular menu and contextual menu?

https://www.dropbox.com/s/tpqz2ksp6sq6r ... r.png?dl=0

https://www.dropbox.com/s/nby3fkcgeffhe ... r.png?dl=0

Top main code with separator

Code: Select all

 <po:menu>
                        <p:menuitem id="om_dashboard" value="#{msg['menu.dashboard']}" icon="#{ico.dashboard}" outcome="/laboratory/dashboard"/>
                        <p:submenu id="om_registration" label="#{msg['menu.registrations']}" icon="#{ico.registration}">
                            <p:menuitem id="om_registration_1" value="#{msg['menu.inspections']}" icon="#{ico.inspection}" outcome="/laboratory/inspection/index"/>
                            <p:separator/>
                            <p:menuitem id="om_registration_2" value="#{msg['menu.registrations']}" icon="#{ico.registration}" outcome="/laboratory/registration/index"/>
                            <p:menuitem id="om_registration_3" value="#{msg['menu.specifications']}" icon="#{ico.specification}" outcome="/laboratory/specification/index" rendered="#{p:ifAnyGranted('ADMIN,SYSADMIN')}"/>
                            <p:menuitem id="om_registration_4" value="#{msg['menu.specifications.profiles']}" icon="#{ico.profile}" outcome="/laboratory/profile/index"/>
                        </p:submenu>
                        
Context menu with separator

Code: Select all

                    <p:contextMenu id="ActivityDataTableContextMenu" for="datalist">  
                        <p:menuitem value="#{msg.New}" onclick="document.getElementById('ActivityListForm:createButton').click();" icon="fa fa-plus"/>
                        <p:separator/>
                        <p:menuitem value="#{msg.View}" onclick="document.getElementById('ActivityListForm:viewButton').click();" icon="fa fa-search"/>
                        <p:menuitem value="#{msg.Edit}" onclick="document.getElementById('ActivityListForm:editButton').click();" icon="fa fa-edit"/>
                        <p:menuitem value="#{msg.Delete}" onclick="document.getElementById('ActivityListForm:deleteButton').click();" icon="fa fa-trash"/>
                    </p:contextMenu>
Thanks
Primefaces 7.0
JSF 2.3
Java EE 8
Payara 5.184

Post Reply

Return to “Roma - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests