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.

SummaryRow/HeaderRow: conflict with PanelGridBodyColumnRenderer

See original GitHub issue

Describe the defect When <p:dataTable><p:summaryRow><p:column> is nested in <p:panelGrid><p:row><p:column> then the ColumnRenderer of <p:summaryRow><p:column> incorrectly delegates to PanelGridBodyColumnRenderer as “helper renderer”, causing a rendering of a double-nested <td> element.

Reproducer

<p:panelGrid>
	<p:row>
		<p:column>
			<p:dataTable id="table" value="#{[
				{'id':1,'group':'odd'},
				{'id':3,'group':'odd'},
				{'id':5,'group':'odd'},
				{'id':2,'group':'even'},
				{'id':4,'group':'even'}
			]}" var="item" sortBy="#{item.group}">
				<p:column headerText="id">
					#{item.id}
				</p:column>
				<p:column headerText="group">
					#{item.group}
				</p:column>
				<p:summaryRow>
					<p:column>
						#{item.group} ids
					</p:column>
					<p:column>
						#{item.group} summary
					</p:column>
				</p:summaryRow>
			</p:dataTable>
		</p:column>
	</p:row>
</p:panelGrid>

Environment:

  • PF Version: 8.0
  • JSF + version: Mojarra 2.3.15
  • Affected browsers: ALL

To Reproduce Steps to reproduce the behavior:

  1. Copy paste above XHTML snippet into <h:body> of empty template (no bean needed)
  2. Open page in webbrowser
  3. Observe following output (Chrome)

image

Expected behavior No double-nested <td> cells in summary row image

Work around Remove Constants.HELPER_RENDERER attribute from context. This can be achieved by editing the example XHTML as follows

<p:summaryRow listener="#{facesContext.attributes.remove('org.primefaces.HELPER_RENDERER')}">

Solution Probably in SummaryRowRenderer#encodeXxx(). Remove that attribute, render, then put back that attribute.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
mellowarecommented, May 6, 2021

Yeah we have about 300+ tests so far and growing as we add scenarios. Runs against Mojarra and Myfaces. And against Firefox, Chrome, and Safari.

1reaction
mellowarecommented, May 6, 2021

OK I updated my PR. I had to do the same fix in HeaderRow if you are using both a Summary Row and and Header Row. Now its all working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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