Main menu separator

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
pfroy
Posts: 49
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 12.0
Jakarta Faces 4.0
Oracle JDK 17
Payara 6.2023.6
Jakarta EE 10.0

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

16 Sep 2019, 10:23

Please try;

Code: Select all

.body .layout-menu-container .layout-menu li.Separator {
       border-bottom: 1px solid #d8d8dc;
       width: 100%;
} 

Post Reply

Return to “Roma - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests