I have this situation : -Eclipse Mars -Primefaces 6.2 -JSF 2.1 -ibm portal framework -running on websphere
When I click on the primefaces menuitem to open a new xhtml, I need this new xhtml be opened at the same webpage without loose all the another html existin components. I need just a refresh.
here it is my project :
My main page (xhtml) :
<h:body>
<div id="divMain" style="height:200px">
<ui:insert name="cabecalho">
<ui:include src="/_MF/jsf/MainMenu.xhtml"></ui:include>
</ui:insert>
<ui:insert name="conteudo">
</ui:insert>
</div>
</h:body>
MainMenu.xhtml :
<h:form id="myFormMainMenu">
<div id="mainMenu">
<p:megaMenu orientation="#{megaMenuView.orientation}" style="margin-top:20px" autoDisplay="true">
<p:submenu label="DI" icon="ui-icon-check">
<p:column>
<p:submenu label="OPTIONS">
<p:menuitem value="Listing" icon="ui-icon-document"
ajax="false" action="#{mainMenuMB.listar()}" />
</p:submenu>
</p:column>
</p:submenu>
</p:megaMenu>
</div>
</h:form>
Another form raised from menuitem listar() :
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<ui:composition template="/_MF/jsf/MainPage.xhtml">
<ui:define name="conteudo">
<div id="divListar">
<h1>User settings.....</h1>
</div>
</ui:define>
</ui:composition>
</html>