Problems with incorrect context rendering on a JSF page created from a template. Those. the left part and the search string are fixed in the template. But the content should be updated. I insert a table there and "very strange" works out. Page Code:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:p="http://primefaces.org/ui"> <h:head> <h:outputScript library="js" name="jsfcrud.js"/> <h:outputStylesheet library="primefaces-aristo" name="theme.css" /> <base href="#{request.contextPath}/" /> </h:head> <body> <ui:composition template="./temp.xhtml"> <ui:define name="content"> <p:growl id="growl" life="3000" /> <h:form id="SprVidOborudListForm"> <p:panel header="#{bundle.ListSprVidOborudTitle}"> <p:dataTable id="datalist" value="#{sprVidOborudController.items}" var="item" selectionMode="single" selection="#{sprVidOborudController.selected}" paginator="true" rowKey="#{item.id}" rows="10" rowsPerPageTemplate="10,20,30,40,50" > <p:ajax event="rowSelect" update="createButton viewButton editButton deleteButton"/> <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/> <f:facet name="header"> <p:commandButton id="createButton" icon="ui-icon-plus" value="#{bundle.Create}" actionListener="#{sprVidOborudController.prepareCreate}" update=":SprVidOborudCreateForm" oncomplete="PF('SprVidOborudCreateDialog').show()"/> <p:commandButton id="viewButton" icon="ui-icon-search" value="#{bundle.View}" update=":SprVidOborudViewForm" oncomplete="PF('SprVidOborudViewDialog').show()" disabled="#{empty sprVidOborudController.selected}"/> <p:commandButton id="editButton" icon="ui-icon-pencil" value="#{bundle.Edit}" update=":SprVidOborudEditForm" oncomplete="PF('SprVidOborudEditDialog').show()" disabled="#{empty sprVidOborudController.selected}"/> <p:commandButton id="deleteButton" icon="ui-icon-trash" value="#{bundle.Delete}" actionListener="#{sprVidOborudController.destroy}" update=":growl,datalist" disabled="#{empty sprVidOborudController.selected}"/> </f:facet> <p:column> <h:outputText value="#{item.id}"/> </p:column> <p:column> <f:facet name="header"> <h:outputText value="#{bundle.ListSprVidOborudTitle_nameTip}"/> </f:facet> <h:outputText value="#{item.nameTip}"/> </p:column> </p:dataTable> </p:panel> </h:form> <ui:include src="jsfpages/sprVidOborud/Create.xhtml"/> <ui:include src="jsfpages/sprVidOborud/Edit.xhtml"/> <ui:include src="jsfpages/sprVidOborud/View.xhtml"/> </ui:define> </ui:composition> </body> </html> 

Draws like this:

  • It is difficult to say what the problem is without seeing all the code (the template and the buttons), but it looks like a conflict of styles. Try to simplify this template to a minimum and see what you get and then add element by element. - Mikhail Chibel
  • Thanks, I'll try now. But I get the feeling that when using templates, when data is inserted into the '<ui: define name = "content">' section, which is redefined, it somehow mutes the styles of the faces - Evgeny Vartavanyan
  • @Mikhail Chibel. Michael, thank you very much, you were right about the imposition of styles. - Evgeny Vartavanyan

0