question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TreeTable: wrong column sizes when scrollable="true" and dynamic columns

See original GitHub issue

Describe the defect When we have scrollable=“true” with dynamic component generating columns in tree table, the column sizes are different from header to the body. Maybe is related to #7070

Also, don’t know why but this only works with <c:forEach/> component, when using the equivalent <ui: repeat/> nothing is displayed, which I think is another bug. Is it right?

Environment: PF Version: 10.0.0-RC2 (Was working in PF8) JSF + version: JSF 2.2.19 Affected browsers: Chrome, Safari

To Reproduce Steps to reproduce the behavior:

  1. Insert scrollable=“true” in p:treeTable
  2. Incude some dynamic columns and set their width’s
  3. See error

Expected behavior Columns in the second table ( scrollable=“true”) should match the fist one: image

Example XHTML

 <p:treeTable value="#{relatorioBean.root}"     var="item" id="tabelaItens" 
                          scrollable="true"      	  >  

           <p:column      style="width:150px;"    >  
			            <f:facet name="header">  <h:outputText value="col1"  />       </f:facet>  
			            <h:outputText value="col1"  />  
	     </p:column>  


  <c:forEach var="i" begin="0"       end="#{fn:length(relatorioBean.listaPeriodicidade) -1}" step="1"  >
	 <!--   equivalent  ui:repeat doesn't work here -->	
                       
                                            <p:column      field="#{item.listaPeriodoValor[i]}"
			                                       style="width: 100px;" width="100" > 
	                                              <!--   Apparently the width="100" param has no effect here -->		 
                                                      <f:facet name="header" >   
						               <h:outputText     value="title #{i}"  />
						       </f:facet> 
						     <h:outputText  value="#{i} value "  />
					   </p:column>
				        </c:forEach>  		      

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mellowarecommented, Mar 10, 2021

TreeTable will have a first class Exporter in PF11 so you can get rid of that lib hopefully.

0reactions
edudodacommented, Mar 10, 2021

Found it, it was due to that lib com.lapis.jsfexporter I mentioned above =x, which was requesting for PF5.1 version, and because when using -SNAPSHOT approach maven resolves to the nearest version, not newest one. Inserting <exclusion> <groupId>org.primefaces</groupId> ... in that lib solves the problem, but nice to see that it still working after so many years and versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

header not aligning with columns when scrollable enabled
In my application I'm using column groups in addition to dynamically generated columns. I assign widths to all of the respective elements to ......
Read more >
TreeTable: display an extra line in header when scrollable ...
TreeTable : display an extra line in header when scrollable="true" #7070 ... TreeTable: wrong column sizes when scrollable="true" and dynamic ...
Read more >
PrimeNG table is not taking the fixed width in Angular
Horizontal Scroll: In horizontal scrolling, it is required to give fixed widths to columns. In general when customizing the column widths of ...
Read more >
Combobox dropdown binding problem inside sap.ui.table ...
I am facing a peculiar issue when trying to use sap.m.ComboBox dropdown inside sap.ui.table.TreeTable, especially when I scroll the treetable.
Read more >
Sizing Components - Documentation - Webix
Dynamic sizing. Later on, you can dynamically resize the components. Setting Correct Size Values. The width and height of the widget must have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found