2015-11-23 3 views
1

У меня есть следующий Parant вида страницы:дисплея Menubar под панелью

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" 
     xmlns:h="http://java.sun.com/jsf/html" 
     xmlns:f="http://java.sun.com/jsf/core" 
     xmlns:ui="http://java.sun.com/jsf/facelets" 
     xmlns:p="http://primefaces.org/ui" 
     xmlns:pe="http://primefaces.org/ui/extensions"> 

<f:view encoding="UTF-8" contentType="text/html"> 

    <ui:insert name="metadata"/> 

    <h:head> 
     <h:outputStylesheet name="sms.css"/> 
     <ui:insert name="header"/> 
    </h:head> 

    <h:body> 
     <ui:insert name="layout"> 
      <pe:layout id="main_layout" togglerTipClosed="Показать" togglerTipOpen="Спрятать" widgetVar="mainLayoutVar"> 
       <pe:layoutPane position="north" resizable="true" closable="false"> 
        <ui:insert name="mainMenu"> 
         <ui:include src="MenuFrame.xhtml"/> 
        </ui:insert> 
       </pe:layoutPane> 

       <pe:layoutPane id="content_body" position="center"> 
        <ui:insert name="body"/> 
        <ui:insert name="dialogs"/> 
       </pe:layoutPane> 

       <pe:layoutPane position="south" resizable="false" closable="false"> 
        <ui:include src="FooterFrame.xhtml"/> 
       </pe:layoutPane> 
      </pe:layout> 
     </ui:insert> 

     <p:growl id="msg_warn" for="arg_msg_for_warn" showDetail="true" sticky="true"/> 
     <p:growl id="msg_info" for="arg_msg_for_info" showDetail="true"/> 
     <p:growl id="msg_error" showDetail="true" autoUpdate="true" sticky="true" redisplay="false"/> 
    </h:body> 

</f:view> 

</html> 

Других страницы распространяются с этой страницы, где переопределяя блок тела. Также у меня есть по умолчанию кадр меню, которые включают в родительском представлении:

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" 
       xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" 
       xmlns:p="http://primefaces.org/ui"> 

    <h:form id="main_menu_form"> 
     <p:menubar> 
      <p:submenu label="Списки" icon="fa fa-list"> 
       <p:menuitem value="Клиенты" url="/view/client/ClientListView.xhtml" icon="fa fa-group"/> 
       <p:menuitem value="Склады" url="/view/storage/StorageListView.xhtml" icon="fa fa-archive"/> 
      </p:submenu> 
      <f:facet name="options"> 
       <p:commandButton type="button" icon="fa fa-info"/> 
      </f:facet> 
     </p:menubar> 
    </h:form> 

</ui:composition> 

Проблема заключается в том, что Subitems компоненты из Menubar отображения под центральной панелью:

enter image description here

+0

Ваш вопрос не имеет значения. Вы показываете проблему, но вы не говорите, как вы хотите ее получить. (Мы могли догадаться, но если мы ошибаемся, мы потратили наше время на нет ...) –

+0

Я добавил все, что связано с моей проблемой. В 'View.xhtml' вы можете увидеть, как размещены' layoutpane' для 'header (mainMenu)', 'body' (который переопределяет дочерние представления),' footer' .. поэтому я дал 'MainFrame.xhtml', который показывает код для меню, которое скрывается под центральной панелью. Я не знаю, что добавить еще. – HAYMbl4

+0

У моей группы было несколько проблем, подобных этим, когда я использовал pe: layout и p: layout. Cagatay Civici посоветовал нам использовать обычные старые div и css для создания наших макетов. Попробуйте без pe: layout –

ответ

0

Я нашел решение моей проблемы для меню pe:layoutPane набора необходимости следует атрибуты элемента:

#menu_panel { 
    z-index: 1 !important; 
    overflow: visible; 
} 

Finil код View.xhtml:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" 
     xmlns:h="http://java.sun.com/jsf/html" 
     xmlns:f="http://java.sun.com/jsf/core" 
     xmlns:ui="http://java.sun.com/jsf/facelets" 
     xmlns:p="http://primefaces.org/ui" 
     xmlns:pe="http://primefaces.org/ui/extensions"> 

<f:view encoding="UTF-8" contentType="text/html"> 

    <ui:insert name="metadata"/> 

    <h:head> 
     <h:outputStylesheet name="sms.css"/> 
     <ui:insert name="header"/> 
    </h:head> 

    <h:body> 
     <ui:insert name="layout"> 
      <pe:layout id="main_layout" togglerTipClosed="Показать" togglerTipOpen="Спрятать" widgetVar="mainLayoutVar"> 
       <pe:layoutPane id="menu_panel" position="north" resizable="true" closable="false"> 
        <ui:insert name="mainMenu"> 
         <ui:include src="MenuFrame.xhtml"/> 
        </ui:insert> 
       </pe:layoutPane> 

       <pe:layoutPane id="content_body" position="center"> 
        <ui:insert name="body"/> 
        <ui:insert name="dialogs"/> 
       </pe:layoutPane> 

       <pe:layoutPane position="south" resizable="false" closable="false"> 
        <ui:include src="FooterFrame.xhtml"/> 
       </pe:layoutPane> 
      </pe:layout> 
     </ui:insert> 

     <p:growl id="msg_warn" for="arg_msg_for_warn" showDetail="true" sticky="true"/> 
     <p:growl id="msg_info" for="arg_msg_for_info" showDetail="true"/> 
     <p:growl id="msg_error" showDetail="true" autoUpdate="true" sticky="true" redisplay="false"/> 
    </h:body> 

</f:view> 

</html> 

Посмотреть также: primefaces menu cant fully display out in fullpage layout

1

Вы можете установить style="zIndex: 9999" для строки меню или Подпункты? Это сделает их на вершине (в ранге 9999)

+0

Спасибо, но это не меняет ситуацию – HAYMbl4

Смежные вопросы