Portlet File upload problem

Hi,

I have a JSF popup where i need to browse files and get the contents of the file in my backing bean and I will be saving it to the database as a Clob. I am working in aportlet environment.

The problem is that I tried using tomahawk <x:inputFileUpload>

tag which used theprivate UploadedFile myFile

; to get the contents into the backing bean. I get the browse button and the text box. But when I browse the files and try to process the file nothing happens...

Is'nt file upload possible in portlets? Is there any way I can make this work? I needed to upload local html files. Can anyone please help me solve this.

Thanks a

[726 byte] By [soorejkumara] at [2007-10-3 0:03:53]
# 1

Dear All

I have problem to get the <x:inputFileUpload> to select files - I cannot see the browse button and the text box :

<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>

...

...

<x:inputFileUpload id="myFileId"

value="#{myBean.uploadFile}"

storage="file"

required="true"/>

can someone tell me how to get the browse button and text box up please?

Thanks in advance

Mary

myJSFa at 2007-7-14 16:51:44 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

hi soorejkumar,

i asume, that you are using

org.apache.myfaces.portlet.MyFacesGenericPortlet

or in case of jetspeed2

org.apache.portals.bridges.jsf.FacesPortlet

it is not possible to bring <x:inputFileUpload> to work with one of those bridges.

4 more information on that read the api.

in jetspeed2 you can slove this problem by using the 'IFrame Prototype Portlet'.

--> deploy your jsf-webapp normally to your servlet container

--> add the 'IFrame Prototype Portlet' to your page

--> change preferences 'SRC' to 'http://myspace.com:8080/mywebapp/faces/myupload.jsp'

markus

thestomprocka at 2007-7-14 16:51:44 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...