Foros de discusión

PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

PortletFaces Community Member, modificado hace 12 años.

PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Regular Member Mensajes: 199 Fecha de incorporación: 3/04/12 Mensajes recientes
Hi,

I try to use RichFaces 4.2 in Liferay 6.1 with PortletFaces Bridge 2.0.1, but have problems.

Liferay uses Tomcat 7, so I use javax.servlet 3.0 and don't declare the Resource Servlet

I've added a simple portlet with a rich:calendar as attachment which builds with maven.

If you deploy it, you can see:

1. There should be a calendar-icon.png next to input field, but the ResourceServlet can't find it.

2. The calendar popup works, but curiously only when manual input is disabled.

3. The log shows NullPointerExceptions
java.lang.NullPointerException
at org.portletfaces.bridge.container.PortletContainerFactoryImpl.getPort
letContainer(PortletContainerFactoryImpl.java:58)
at org.portletfaces.bridge.application.ResourceHandlerImpl.createResourc
e(ResourceHandlerImpl.java:148)
at org.richfaces.resource.ResourceHandlerImpl.createResource(ResourceHan
dlerImpl.java:265)
at org.richfaces.resource.ResourceHandlerImpl.createResource(ResourceHan
dlerImpl.java:273)
at com.sun.faces.application.resource.ResourceHandlerImpl.handleResource
Request(ResourceHandlerImpl.java:251)
at org.portletfaces.bridge.application.ResourceHandlerImpl.handleResourc
eRequest(ResourceHandlerImpl.java:367)
at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(Reso
urceHandlerImpl.java:257)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:407)
at org.richfaces.webapp.ResourceServlet.httpService(ResourceServlet.java
:110)

Has anyone experience if there's a comibination of richfaces und portletfaces bridge, that works?
Are there known bugs that might be fixed in the next versions of richfaces or portletfaces bridge?

Regards, Ingo
thumbnail
Neil Griffin, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Please give it a try with Liferay 6.0 and see if the error goes away. I'd be interested to know if that works. We're adding compatibility for Liferay 6.1 in the Bridge at this time but a release won't be ready for about 2 more weeks.
PortletFaces Community Member, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Regular Member Mensajes: 199 Fecha de incorporación: 3/04/12 Mensajes recientes
I've installed Liferay 6.0.6. Because it uses Tomcat 6, I've changed the web.xml to version 2.5 and declared the org.richfaces.webapp.ResourceServlet.

calendarIcon.png can't still be found with this path
/rich-calendar-portlet-test-1.0.0/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.2.0.Final/Static/DEFAULT/org.richfaces.images/calendarIcon.png

The popup still works only when manual input is disabled.

The NullPointerException doesn't appear anymore in the log, but after reloading the paget now this Exception occurs:

10:56:12,801 ERROR [ETagFilter:136] java.lang.IllegalStateException: Die Anwendung wurde bei Systemstart nicht einwandfrei initialisiert, Factory konnte nicht gefunden werden: javax.faces.render.RenderKitFactory
java.lang.IllegalStateException: Die Anwendung wurde bei Systemstart nicht einwandfrei initialisiert, Factory konnte nicht gefunden werden: javax.faces.render.RenderKitFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:815)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:317)
at com.sun.faces.context.FacesContextImpl.<init>(FacesContextImpl.java:128)
at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:93)
at org.richfaces.context.FileUploadFacesContextFactory.getFacesContext(FileUploadFacesContextFactory.java:143)
at com.sun.faces.context.InjectionFacesContextFactory.getFacesContext(InjectionFacesContextFactory.java:121)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:399)
at org.richfaces.webapp.ResourceServlet.httpService(ResourceServlet.java:110)
at org.richfaces.webapp.ResourceServlet.service(ResourceServlet.java:105)
...

The translation of the German message is:
Application was not properly initialized at startup, could not find Factory: javax.faces.render.RenderKitFactory

I've added the changed project.
thumbnail
Neil Griffin, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
I just developed a demo RichFaces portlet using a SNAPSHOT of version 3.0 of the bridge (scheduled to be released around April 6th).

With this demo I was able to reproduce the resource handling problems with RichFaces. I was debugging the RichFaces code trying to figure out what's going on, but I'm out of time for today. I'll pick this up again on Monday if I can.
thumbnail
Neil Griffin, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
I was able to make rich:calendar work with the following in WEB-INF/web.xml:

	<context-param>
		<param-name>org.richfaces.resourceMapping.enabled</param-name>
		<param-value>true</param-value>
	</context-param>
	<servlet>
		<servlet-name>Resource Servlet</servlet-name>
		<servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>Resource Servlet</servlet-name>
		<url-pattern>/org.richfaces.resources/*</url-pattern>
	</servlet-mapping>


And then I had to add the following to WEB-INF/liferay-plugin-package.xml:

speed-filters-enabled=false


The exception you mentioned is causes by the Liferay speed filters. When enabled, the Liferay header-filter and etag-filter will be invoked for *.png which is why the calendar icon was not rendering.
thumbnail
Neil Griffin, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Note that I tried it with the 3.0.0 version of the bridge, which is scheduled for release on or about April 5th (next week). I didn't try it with a 2.x version of the bridge.
PortletFaces Community Member, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Regular Member Mensajes: 199 Fecha de incorporación: 3/04/12 Mensajes recientes
Thank you for your help, Neil.
The IllegalStateException isn't thrown anymore, but the calendar icon still can't be loaded, although I added "speed-filters-enabled=false" to liferay-plucking-package.properties.

<img id="A9652:form:calendarPopupButton" class="rf-cal-btn " style="vertical-align: middle" src="/rich-calendar-portlet-test-1.0.0/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.2.0.Final/Packed/DEFAULT/org.richfaces.images/calendarIcon.png"

I'll try again with the new bridge as soon as it's available.
thumbnail
Neil Griffin, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Do you see any exceptions reported?
PortletFaces Community Member, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Regular Member Mensajes: 199 Fecha de incorporación: 3/04/12 Mensajes recientes
No, there aren't any exceptions reported.
thumbnail
Neil Griffin, modificado hace 12 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
OK bridge version 3.0.0-BETA1 is on schedule for release next week, around Wed April 4th or Thursday April 5th.
Ingo Schildmann, modificado hace 11 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

New Member Mensajes: 14 Fecha de incorporación: 21/12/11 Mensajes recientes
If your account at www.portletfaces.org had the same email address as your account at liferay.com then the posts you made at portletfaces.org should still be authored with your name.


Unfortunately that is not the case.
thumbnail
Neil Griffin, modificado hace 11 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Hi Ingo,

My apologies -- very sorry about that. I just updated my blog post, letting people know that portletfaces.org accounts created after January 19, 2012 would appear as "PortletFaces Community User".

Trying to get the release done by Friday so it might be next week before I can comment further on this forum post with more technical information.

Kind Regards,

Neil
thumbnail
Neil Griffin, modificado hace 11 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
For an issue related to this see FACES-263.
thumbnail
Neil Griffin, modificado hace 11 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
The 3.0.0-BETA1 release is out. The liferay.com website should be updated later today or tomorrow with the download links.

For now, you can read the description of the RichFaces4 demo portlet here:
http://www.liferay.com/community/liferay-projects/liferay-faces/demos#richfaces4-portlet

And you can download it from here:
http://www.liferay.com/community/liferay-projects/liferay-faces/demos#richfaces4-portlet
Vijayan M, modificado hace 11 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

New Member Mensajes: 11 Fecha de incorporación: 10/05/12 Mensajes recientes
Hello,
I have dowloaded richfaces4-portlet-3.1.0-BETA2.war and added below rich:extendedDataTable inside applicant.xhtml to test rich:extendedDataTable. I do not see the colors / image rendered.

<aui:layout id="extTabls">
		<rich:extendeddatatable value="#{applicantBackingBean.modelBeans}" var="modelBean" id="table" frozencolumns="1" clientrows="25" style="height:300px; width:500px;" selectionmode="none">
				<f:facet name="header">
					<h:outputtext value="Candidate List" />
				</f:facet>
				<rich:column>
					<f:facet name="header">
						<h:outputtext value="City" />
					</f:facet>
					<h:outputtext value="#{modelBean.city}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputtext value="Comments" />
					</f:facet>
					<h:outputtext value="#{modelBean.comments}" />
				</rich:column>	
				<rich:column>
					<f:facet name="header">
						<h:outputtext value="Email" />
					</f:facet>
					<h:outputtext value="#{modelBean.emailAddress}" />
				</rich:column>					
			</rich:extendeddatatable>
	</aui:layout>

	public List<applicantmodelbean> getModelBeans() {
		List<applicantmodelbean> modelBeans = new ArrayList<applicantmodelbean>();
		ApplicantModelBean modelBean = new ApplicantModelBean();
		modelBean.setCity("City");
		modelBean.setComments("Comments");
		modelBean.setEmailAddress("sdsdf@hfhf.com");
		
		ApplicantModelBean modelBean1 = new ApplicantModelBean();
		modelBean1.setCity("City 111");
		modelBean1.setComments("Comments 111");
		modelBean1.setEmailAddress("sdsdf1111@hfhf.com");
		
		ApplicantModelBean modelBean2 = new ApplicantModelBean();
		modelBean2.setCity("City 2222");
		modelBean2.setComments("Comments 2222");
		modelBean2.setEmailAddress("sdsdf222@hfhf.com");
		
		modelBeans.add(modelBean);
		return modelBeans;
	}</applicantmodelbean></applicantmodelbean></applicantmodelbean>
thumbnail
Neil Griffin, modificado hace 11 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Vijayan,

Very sorry, somehow I missed your message -- Perhaps the notification system didn't send me an email. Are you still having trouble seeing the colors/image being rendered?

Neil
thumbnail
Neil Griffin, modificado hace 11 años.

RE: PortletFaces Bridge 2.0.1, Richfaces 4.2 and Liferay 6.1.0-ce-ga1

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Just wanted to mention that in my testing of 3.0.0-BETA1, that liferay-faces-bridge is working equally well in Liferay 6.0 and Liferay 6.1, and that I am not encountering the NullPointerException in PortletContainerFactoryImpl.getPortletContainer(...) mentioned at the top of this thread. So that's good news. emoticon