blank columns in dataTable within a panelGrid

UI Components for JSF
Post Reply
pjt1
Posts: 17
Joined: 11 Oct 2012, 01:12

22 Aug 2017, 20:01

For version 6.0, this issue doesn't exist. For 6.1 there are blank columns inserted within the dataTable if you have a dataTable within the column of a panelGrid.

I've submitted an issue for this:
https://github.com/primefaces/primefaces/issues/2655


Image

Code: Select all

<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">
  
  <h:head>
      <title>Primefaces example</title>
  </h:head>

  <h:form id="form">
 
    <p:panelGrid>
      <p:row>
        <p:column headerText="column1" >
          <h:outputText value="row1 col1" />
        </p:column>
        <p:column headerText="column2" >
          <h:outputText value="row1 col2" />
        </p:column>
      </p:row>
      <p:row>
        <p:column>
        <h:outputText value="row2 col1" />
        <p:dataTable var="car" value="#{basicView.cars}">
          <f:facet name="header">
            <h:outputText value="Table within a panelgrid column" />
          </f:facet>
	        <p:column headerText="Id">
	            <h:outputText value="#{car.id}" />
	        </p:column>
	     
	        <p:column headerText="Year">
	            <h:outputText value="#{car.year}" />
	        </p:column>
	     
	        <p:column headerText="Brand">
	            <h:outputText value="#{car.brand}" />
	        </p:column>
	     
	        <p:column headerText="Color">
	            <h:outputText value="#{car.color}" />
	        </p:column>
        </p:dataTable>
        
        </p:column>
        
        <p:column>
          <h:outputText value="row 2 col2" />
        </p:column>
      </p:row>
		</p:panelGrid>
		
		
		<p:dataTable var="car" value="#{basicView.cars}">
		   <f:facet name="header">
		     <h:outputText value="Same table but not within a panelgrid column" />
		   </f:facet>
       <p:column headerText="Id">
           <h:outputText value="#{car.id}" />
       </p:column>
    
       <p:column headerText="Year">
           <h:outputText value="#{car.year}" />
       </p:column>
    
       <p:column headerText="Brand">
           <h:outputText value="#{car.brand}" />
       </p:column>
    
       <p:column headerText="Color">
           <h:outputText value="#{car.color}" />
       </p:column>
     </p:dataTable>
		
  </h:form>

</html>
Primefaces 6.1

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

23 Aug 2017, 12:48

Did you check the releasenotes of the 6.1.x versions? Was fixed in one of them if I remember correctly

pjt1
Posts: 17
Joined: 11 Oct 2012, 01:12

23 Aug 2017, 20:16

Thanks kukeltje! I found the fix at 6.1.1, issue 2337.

https://github.com/primefaces/primefaces/issues/2337
Primefaces 6.1

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

24 Aug 2017, 10:16

Next time please do this upfront (even just reading the releasenotes when a new release is announced helps)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests