Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mojarra 2.3 regression: Component rendered in wrong DOM level #21

Open
erickdeoliveiraleal opened this issue Aug 22, 2018 · 7 comments
Open

Comments

@erickdeoliveiraleal
Copy link

I already reported in PrimeFaces side issue 1 and issue 2 but @tandraschko said it maybe a Mojarra 2.3 problem.

Sample XHTML

<!DOCTYPE html>
<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"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">

<h:head>

</h:head>

<h:body>

	<h:form>

		<p:selectOneMenu id="presidio">

			<f:selectItem itemLabel="Nenhum" noSelectionOption="true" />

		</p:selectOneMenu>

	</h:form>

	<h:form id="form">

		<p:commandButton process="@this"
			oncomplete="PF('dlgFolha').show('#{component.clientId}')"
			value="Folha de Ponto" ajax="true" />

	</h:form>

	<p:overlayPanel widgetVar="dlgPdf">
		<h:form id="dlgPdfIn">
			<p:outputPanel>
				<p:panelGrid columns="2" columnClasses="label,value">

					<p:commandButton value="Movimentações" process="@this" />

				</p:panelGrid>
			</p:outputPanel>
		</h:form>
	</p:overlayPanel>
	<p:overlayPanel widgetVar="dlgFolha">
		<h:form id="dlgfolhaIn">
			<p:outputPanel>

				<p:commandButton value="Gerar" ajax="false" />

			</p:outputPanel>
		</h:form>
	</p:overlayPanel>
</h:body>
</html>
@tandraschko
Copy link

tandraschko commented Aug 22, 2018

I also added a comment somewhere (not sure where)

somehow the second overlaypanel is rendered inside the first
maybe the responsewriter does something wrong or some characters are filtered on rendering

It didn't happen in Mojarra 2.2 and MyFaces 2.2/2.3

EDIT:
here it is: eclipse-ee4j/mojarra#4407

@erickdeoliveiraleal
Copy link
Author

erickdeoliveiraleal commented Aug 22, 2018 via email

@abelet
Copy link

abelet commented Oct 8, 2018

This error is caused partly by the panelGrid issue (primefaces/primefaces#4122) I reported before, and by the incorrect JSF implementation which I referred in #23.

The JSF development team closed the referred issue (eclipse-ee4j/mojarra#4488) despite the fact that how vulnerable JSF become to component rendering problems, but seeing the positive attitude of @arjantijms I still hope this error will be fixed.

I attached a modified version of the HtmlResponseWriter class (HtmlResponseWriter.java.txt) eliminating the elementNames stack. If you build the jboss mojarra project with this modified version, the error will dissapear. I only have done this to prove the problem with the JSF implementation.

@erickdeoliveiraleal
Copy link
Author

I think you can open an issue at wildfly side, so they can fix at wildfy https://issues.jboss.org/browse/WFLY-11147?filter=-4&jql=project%20%3D%20WFLY%20order%20by%20created%20DESC

@abelet
Copy link

abelet commented Oct 9, 2018

The wildfly issue is here: https://issues.jboss.org/browse/WFLY-11151

@erickdeoliveiraleal
Copy link
Author

fixed in primefaces/primefaces#4122 thank you for investigate it, @abelet

@abelet
Copy link

abelet commented Oct 24, 2018

@erickdeoliveiraleal, I'm happy that by solving my problem I could help you also. :)
But we are not so satisfied yet, because another wrong component can cause serious headaches again due to the mojarra bug. So far not the wildfly issue (https://issues.jboss.org/browse/WFLY-11151) received to much attention, and the mojarra case (eclipse-ee4j/mojarra#4488) has been closed. I hope someone will solve it from one of the JSF teams, and we don't have to patch our wildfly next spring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants