voyent
How to get uploaded file  XML
Forum Index -> Portals & Portlets
Author Message
KingDavid

Joined: 13/Oct/2010 03:56:43
Messages: 1
Offline


Hi,
I would like to retrieve the file that the user has uploaded using a tag like <input type = "file" .... />.
How can I do without using the existing custom tag?
moudatsos

Joined: 05/Sep/2011 07:10:18
Messages: 4
Offline


That's what I ve used

Code:
 <aui:field inlineLabel="left" label="#{i18n['upload-image-text']}" type="text">
 				<ace:fileEntry id="myFileEntry"
 						   label="File Entry"
 						   relativePath="/temp"
 						   useSessionSubdir="false"
 						   useOriginalFilename="true"
 						   fileEntryListener="#{myBackingBean.uploadFileListener}"
 					/>
 				<h:commandButton value="#{i18n['upload']}" />
 </aui:field>


you need to use icefaces-ace-2.0.1.jar (put your version) though (along with ice jars)

The actual job is done in fileEntryListener. Look the tag's documentation for a code sample
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team