layout height

UI Components for JSF
Post Reply
liuaiou
Posts: 9
Joined: 20 Oct 2011, 09:22

09 Nov 2011, 08:48

<p:layout id="layout" style="height:70%;" >



UI Layout Initialization Warning

The layout-container "DIV/#defaultForm\:form\:layout" has no height.

Therefore the layout is 0-height and hence 'invisible'!

spauny
Posts: 75
Joined: 10 Oct 2011, 16:42

09 Nov 2011, 08:59

You could at least try to put a question, say something not just show us the error...
Where are your layoutUnits??

liuaiou
Posts: 9
Joined: 20 Oct 2011, 09:22

09 Nov 2011, 09:17

<ui:composition 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" template="/layout/default.xhtml">
<ui:define name="content">
<h:form id="form">
<p:layout id="layout" style="height:70%;">

<p:layoutUnit position="west" size="30%" header="CodeType"
resizable="true" styleClass="nestedUnit">
<p:tree id="codeId" value="#{codeTypeBean.rootNodes}" var="node"
selectionMode="single" style="height:97%;width:95%;"
selection="#{codeTypeBean.currentSelection}">
<p:ajax event="select" update="form:CodeInfo:codeInfoTable" />
<p:treeNode expandedIcon="ui-icon ui-icon-folder-open"
collapsedIcon="ui-icon ui-icon-folder-collapsed">
<h:outputText value="#{node.name}" />
</p:treeNode>
</p:tree>
</p:layoutUnit>

<p:layoutUnit position="center" styleClass="nestedUnit"
header="CodeInfo">
<p:dataTable id="codeInfoTable" selectionMode="single"
selection="#{codeTypeBean.selectedCodeInfo}"
rowKey="#{codeInfo.id}" value="#{codeTypeBean.codeInfoItems}"
var="codeInfo" paginator="true" rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink}
{PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15">
......................................
</p:dataTable>
</p:layoutUnit>
</p:layout>
</h:form>
</ui:define>
</ui:composition>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests