Forums de discussion

bridge:inputFile, known issues?

thumbnail
Johann Kneringer, modifié il y a 12 années.

bridge:inputFile, known issues?

Junior Member Publications: 42 Date d'inscription: 10/11/11 Publications récentes
Hey there,

I'm developing a JSF 2.0 porlet with Icefaces 2.0.2 in Liferay 6.1 and of course portletfaces bridge...

I want to perform a simple fileupload...

I've got a few issues with the icefaces advanced component ace:fileEntry...

So I decided to use bridge:inputFile instead...

Unfortunatly this component doesn't work at all...

I am able to perform a form submit, and the HtmlInputFile is is passed to my Backing Bean, but the Attribute "Uploaded File" remains always null.

Attributes like the ID of the component and so on are working correctly, but there is no uploaded file in it...

Of course I do use dependencies like commons-io & commons-fileupload...

Is there any known issue?

Greetings from Austria,

yours sincerly,

Johann
thumbnail
Neil Griffin, modifié il y a 12 années.

RE: bridge:inputFile, known issues?

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Does bridge:inputFile work in your environment if you deploy the example JSF 2 portlet WAR found here: http://www.liferay.com/community/liferay-projects/liferay-faces/demos#jsf2-portlet

Also, the ace:fileEntry example can be found here: http://www.liferay.com/community/liferay-projects/liferay-faces/demos#icefaces3-portlet

Both are working in the examples.
thumbnail
Johann Kneringer, modifié il y a 12 années.

RE: bridge:inputFile, known issues?

Junior Member Publications: 42 Date d'inscription: 10/11/11 Publications récentes
thank you for the quick reply emoticon

It's working now...

My problem was the absolutpath in the ace:fileEntry...


I had a member in a managebean with a getter and a setter, and I wanted to update this value with the setter method...

The solution, like in the example:

private String fotouploadabsolutpath;

public String getFotouploadabsolutpath() {

if (fotouploadabsolutpath == null) {
fotouploadabsolutpath = getpath();
}
return fotouploadabsolutpath;
}

Instead of using a setter, set the value in the getter, if the value of the member is null...