Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Aniceto P Madrid
Is it possible with bridge beta2 to upload files?
November 25, 2010 10:20 AM
Answer

Aniceto P Madrid

Rank: Regular Member

Posts: 135

Join Date: May 24, 2008

Recent Posts

Hi

I've seen somewhere a tag like pf:inputFile to upload and in some other place a tag bridge:, but I don't know

- if upload works
- where is the bridge documentation, if any
- if there are two uploaders, one in portletfaces and one in bridge, which to use

I am interested in Liferay 5.2.3 and 6.0.5 support.

I've tested this
-add a second form to my portlet
<h:form id="uploaderForm" enctype="multipart/form-data">
<pf:inputFile value="#{gestor.file}" />
<h:commandButton action="#{gestor.submit}" value="Upload File" />
</h:form>

but the multipart/form-data is not processed. Later I saw that I had to add this to faces-config
<factory>
<faces-context-factory>org.edorasframework.portletfaces.bridge.sun.FacesContextFactoryImpl</faces-context-factory>
</factory>

But now the application doesn't even start. This is an excerpt from the log

17:13:15,942 INFO [PortletHotDeployListener:220] Registering portlets for consulta-empleados-0.0.1-SNAPSHOT
17:13:16,505 DEBUG [FacesConfigurationImpl:195] Instantiated BridgeRequestScopeFactory=[org.portletfaces.bridge.scope.BridgeRequestScopeFactoryImpl]
17:13:16,505 WARN [FacesConfigurationImpl:112] Unable to download publicId=[-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN], systemId=[http://java.sun.com/dtd/web-facesconfig_1_1.dtd] referenced-in=[jar:file:/G:/Inno/Liferay/bundles/liferay-portal-6.0.5/tomcat-6.0.26/webapps/consulta-empleados-0.0.1-SNAPSHOT/WEB-INF/lib/util-taglib.jar!/META-INF/faces-config.xml]
17:13:16,583 INFO [PortletHotDeployListener:374] 3 portlets for consulta-empleados-0.0.1-SNAPSHOT are available for use
25-nov-2010 17:13:18 org.apache.catalina.core.StandardContext start
GRAVE: Error listenerStart
25-nov-2010 17:13:18 org.apache.catalina.core.StandardContext start
GRAVE: Falló en arranque del Contexto [/consulta-empleados-0.0.1-SNAPSHOT] debido a errores previos
17:13:20,411 INFO [ExtHotDeployListener:205] Extension environment for consulta-empleados-0.0.1-SNAPSHOT will not be undeployed
17:13:20,411 INFO [PortletHotDeployListener:404] Unregistering portlets for consulta-empleados-0.0.1-SNAPSHOT
17:13:20,411 INFO [PortletHotDeployListener:440] 3 portlets for consulta-empleados-0.0.1-SNAPSHOT was unregistered




Thanks
Aniceto
Neil Griffin
RE: Is it possible with bridge beta2 to upload files?
April 10, 2012 3:53 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2215

Join Date: July 26, 2005

Recent Posts

The pf:inputFile component only works with JSF 1.2 and the Sun OpenPortal JSF Portlet Bridge.

For JSF 2.0 and Liferay 5.2, you'll need to use the BETA3-SNAPSHOT version of the bridge by building it from the source repository yourself. That way you can use the bridge:inputFile component. BETA3 has not been released yet.

Please see this thread for more details:
http://www.liferay.com/community/forums/-/message_boards/message/13289489

For an example of how to use it, see the source repository version of the JSF2 portlet:
https://github.com/liferay/liferay-faces/blob/master/demos/bridge/jsf2-portlet/
Aniceto P Madrid
RE: Is it possible with bridge beta2 to upload files?
November 25, 2010 12:07 PM
Answer

Aniceto P Madrid

Rank: Regular Member

Posts: 135

Join Date: May 24, 2008

Recent Posts

Neil

Is it stable enough?

Aniceto
Neil Griffin
RE: Is it possible with bridge beta2 to upload files?
November 25, 2010 1:18 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2215

Join Date: July 26, 2005

Recent Posts

The trunk currently has BETA3-SNAPSHOT status. It's fairly stable, as it is basically bug fixes and enhancements over BETA2. It's stability at any given moment can't be guaranteed of course, since the nature of a source repository is that it receives commits quite often. It's stable enough to try I would say.