Fórum

Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Michele Stoduto, modificado 7 Anos atrás.

Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Hi all.
I've a problem for make a application with friendly url.

My application work with bridge 3.2.5-ga6 but the friendly url not work fine with this version.

After added a friendly url i've a problem with primefaces dialog framework.

With version 3.0.0 the primefaces dialog framework work fine, bridge url work but i've a exception after commandButton action with liferay Set Event.
The exception is:

16:47:47,796 GRAVE [javax.enterprise.resource.webcontainer.jsf.application] (http-localhost-127.0.0.1-8080-1) Error Rendering View[/views/report/uso/viewPage.xhtml]: java.lang.NullPointerException: Argument Error: Parameter text is null
	at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.writeText(HtmlResponseWriter.java:911) [jsf-impl-2.1.19-jbossorg-1.jar:]
	at javax.faces.context.ResponseWriterWrapper.writeText(ResponseWriterWrapper.java:260) [jboss-jsf-api_2.1_spec-2.1.19.1.Final.jar:2.1.19.1.Final]
	at com.liferay.faces.bridge.renderkit.primefaces.internal.PrimeFacesInlineScript.encodeBegin(PrimeFacesInlineScript.java:51) [com.liferay.faces.bridge.impl.jar:3.0.0 (Aug 30, 2016 AD)]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777) [jboss-jsf-api_2.1_spec-2.1.19.1.Final.jar:2.1.19.1.Final]
	at com.liferay.faces.bridge.renderkit.html_basic.internal.BodyRendererBridgeImpl.encodeBegin(BodyRendererBridgeImpl.java:117) [com.liferay.faces.bridge.impl.jar:3.0.0 (Aug 30, 2016 AD)]
	at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:826) [jboss-jsf-api_2.1_spec-2.1.19.1.Final.jar:2.1.19.1.Final]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777) [jboss-jsf-api_2.1_spec-2.1.19.1.Final.jar:2.1.19.1.Final]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.1.19.1.Final.jar:2.1.19.1.Final]
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439) [jsf-impl-2.1.19-jbossorg-1.jar:]
	at com.liferay.faces.util.application.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:78) [com.liferay.faces.util.jar:2.0.0 (Aug 29, 2016 AD)]
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124) [jsf-impl-2.1.19-jbossorg-1.jar:]
	at com.liferay.faces.bridge.application.internal.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:125) [com.liferay.faces.bridge.impl.jar:3.0.0 (Aug 30, 2016 AD)]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) [jboss-jsf-api_2.1_spec-2.1.19.1.Final.jar:2.1.19.1.Final]
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.1.19-jbossorg-1.jar:]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.19-jbossorg-1.jar:]
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.19-jbossorg-1.jar:]




I've a tried a 3.0.1-snapshot bridge impl and api, the exception not show
but primefaces css loading not work, the primefaces components is no styled.
Into the browser console i dont have error. Similary into java log.

Into the issues site i've reading the similar (only for image) https://issues.liferay.com/browse/FACES-1200.

My application server: liferay 6.2.5-ga6 with jboss 7.1.1, jsf 2.1.19, db mysql 5.

Is my error with configuration?
How to fix it?
Thanks.
thumbnail
Kyle Joseph Stiemann, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Hi Michele,

Could you include the shortest, simplest code needed to reproduce your problem? Also please let us know your PrimeFaces version (or even post the <dependencies> section from your pom.xml file).

- Kyle
Michele Stoduto, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Thank you Kyle for reply,

the primefaces version is 6.0.0 (Community version)

the ivy file for dependencies is:

	<dependencies defaultconf="default">
		<dependency name="jboss-el" org="org.jboss.el" rev="2.0.1.GA" />
		<dependency name="jsf-api" org="com.sun.faces" rev="2.1.21" />
		<dependency name="jsf-impl" org="com.sun.faces" rev="2.1.21" />
	
	
		<dependency org="com.liferay.faces" name="com.liferay.faces.bridge.ext" rev="2.0.1-SNAPSHOT" />
		<dependency org="com.liferay.faces" name="com.liferay.faces.bridge.api" rev="3.0.1-SNAPSHOT" /> 
		<dependency org="com.liferay.faces" name="com.liferay.faces.bridge.impl" rev="3.0.1-SNAPSHOT" />
		<dependency org="com.liferay.faces" name="com.liferay.faces.util" rev="2.0.0" />
		<dependency org="com.liferay.faces" name="com.liferay.faces.portal" rev="2.0.0" />
	
		<dependency org="org.primefaces" name="primefaces" rev="6.0" />
 		<dependency org="org.primefaces.extensions" name="primefaces-extensions" rev="6.0.0" />
 		<dependency org="org.primefaces.extensions" name="resources-ckeditor" rev="6.0.0" />
 		<dependency org="org.primefaces.extensions" name="resources-codemirror" rev="6.0.0" />
	
		<dependency conf="test->default" name="arquillian-junit-container" org="org.jboss.arquillian.junit" rev="1.1.6.Final" />
		<dependency conf="test->default" name="arquillian-tomcat-remote-7" org="org.jboss.arquillian.container" rev="1.0.0.CR6" />
		<dependency conf="test->default" name="com.liferay.ant.arquillian" org="com.liferay" rev="1.0.0-SNAPSHOT" />
	</dependencies>


this file is with SNAPSHOT version, I've replaced x.x.1-SNAPSHOT with x.0.0 for released libray.

In Attachment 2 png file: nocss.png error image and css.png is worked image
chrome_log.log error when use snapshot library.
scr.zip 2 class for testing(Model and Bean),
and 1 .xhtml faces file.

I dont know if this file is simplest code.
Sorry if it is too long.

Michele.
thumbnail
Kyle Joseph Stiemann, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
After testing your project, it seems to be working well so far. Could you post your friendly-url-routes.xml and the steps to reproduce your error?

- Kyle
Michele Stoduto, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Hi Kyle,
in the latest test code not have a friendly url declaration,
but the portlet work in standard mode.

I've downloaded the liferay faces library from github but not have tested.

Monday I can try the libraries and send the friendly url files.

Thanks.

Michele
Michele Stoduto, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Hi Kyle, i've downloaded the portal 6.2 with jboss on sourgeforge and installed with standard configuration (Hypersonic, test@liferay.com etc..etc..),
after installation i've deployed the portlet with snapshot version and the result is no show css from primefaces.

In second phase i've upgraded jsf of the jboss with jsf 2.1.29 jboss version, installed and started the server.
In server.log i've a text:


GRAVE [javax.enterprise.resource.webcontainer.jsf.flash] (http-localhost-127.0.0.1-8080-5) ExternalContext org.primefaces.context.PrimeExternalContext@2710e615 does not implement isSecure().  Please implement this per the JSF 2.1 specification.


but this problem is in Primefaces 6.0. library.

I don't know other test case or how to log more errors.

thanks.

Michele.
thumbnail
Kyle Joseph Stiemann, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Hi Michele,

I reproduced your "java.lang.NullPointerException: Argument Error: Parameter text is null" error with bridge 3.0.0, but as you mentioned, upgrading to 3.0.1-SNAPSHOT fixed the issue.

However, I cannot seem to reproduce your CSS issue with the latest SNAPSHOTs of the bridge. Can you try again and see if your issue was fixed recently? Otherwise please attach a simple Ant/Ivy project which I can use to reproduce the issue.

Michele Stoduto:
In second phase i've upgraded jsf of the jboss with jsf 2.1.29 jboss version, installed and started the server.
In server.log i've a text:

GRAVE [javax.enterprise.resource.webcontainer.jsf.flash] (http-localhost-127.0.0.1-8080-5) ExternalContext org.primefaces.context.PrimeExternalContext@2710e615 does not implement isSecure().  Please implement this per the JSF 2.1 specification.

I'm pretty sure this error is unrelated. If it really bugs you, you can build and include this jar in your project to fix it: https://github.com/stiemannkj1/jsf-2.1-ExternalContextWrapper-fix.

- Kyle
Michele Stoduto, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Hi Kyle,
I.ve dowloaded bridge's source code from github, compiled and replaced the ivi dependencies with new jar files.

The error is equals.

The css generated from 3.0.0 version and 3.0.1-snapshot is changed.
example, the image's url change from
3.0.0 version:   .ui-outputpanel-loading{background:url("http://localhost:8080/web/guest/provaproduzione?p_p_id=REP3_WAR_reportportlet&amp;p_p_lifecycle=2&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_cacheability=cacheLevelPage&amp;p_p_col_id=column-1&amp;p_p_col_count=3&amp;_REP3_WAR_reportportlet_javax.faces.resource=outputpanel%2Fimages%2Floading.gif&amp;_REP3_WAR_reportportlet_ln=primefaces&amp;v=6.0") center center no-repeat;width:32px;height:32px}

to
 3.0.1-snapshot version: 
.ui-outputpanel-loading{background:url("/provat-portlet/javax.faces.resource/outputpanel/images/loading.gif?ln=primefaces&amp;v=6.0") center center no-repeat;width:32px;height:32px}

I don't know if is important but is a suspect diff.

I've downloaded your patch, installed and error not show.

Thanks.
thumbnail
Kyle Joseph Stiemann, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Hi Michele,
I'm working on this issue here: https://issues.liferay.com/browse/FACES-2954.

- Kyle
Michele Stoduto, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Thanks.
thumbnail
Kyle Joseph Stiemann, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Hi Michele,
I believe I have a solution, could you try building and running my revert-586c7d7d-Resource.getRequestPath-should-not-encode-return-value-FACES-2945-3.x branch?

git remote add stiemannkj1 \
https://github.com/stiemannkj1/liferay-faces-bridge-impl.git

git fetch stiemannkj1

git checkout \
stiemannkj1/revert-586c7d7d-Resource.getRequestPath-should-not-encode-return-value-FACES-2945-3.x

mvn clean install


Please let me know if that works.

Thanks,
- Kyle
Michele Stoduto, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Hi Kyle,
I've tested the solution
and primefaces css rendered work fine.

Many Thanks.

Michele.
thumbnail
Kyle Joseph Stiemann, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Glad it's working for you! I will comment here when the fix is merged into the official Liferay repo. Thanks for using Liferay Faces!
thumbnail
Kyle Joseph Stiemann, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Hi Michele,
The fix has been merged into the main bridge-impl repo, so you should be able to use official SNAPSHOTs instead of the jar you built from source now.

- Kyle
Michele Stoduto, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Thanks.
Michele Stoduto, modificado 7 Anos atrás.

RE: Primefaces 6.0 not load css with liferay-faces-bridge*3.0.1-SNAPSHOT

Junior Member Postagens: 42 Data de Entrada: 07/07/10 Postagens Recentes
Hi, the snapshot is get on repository
https://oss.sonatype.org/content/repositories/snapshots