Fórumok

Is it possible with bridge beta2 to upload files?

thumbnail
Aniceto P Madrid, módosítva 13 év-val korábban

Is it possible with bridge beta2 to upload files?

Regular Member Bejegyzések: 120 Csatlakozás dátuma: 2008.05.24. Legújabb bejegyzések
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] [BENIGN] 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
thumbnail
Neil Griffin, módosítva 13 év-val korábban

RE: Is it possible with bridge beta2 to upload files?

Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
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/
thumbnail
Aniceto P Madrid, módosítva 13 év-val korábban

RE: Is it possible with bridge beta2 to upload files?

Regular Member Bejegyzések: 120 Csatlakozás dátuma: 2008.05.24. Legújabb bejegyzések
Neil

Is it stable enough?

Aniceto
thumbnail
Neil Griffin, módosítva 13 év-val korábban

RE: Is it possible with bridge beta2 to upload files?

Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
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.