Dashlet file upload

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2007 08:40 AM
Hi all,
I have created a dashlet jsp page where I need to submit a binary file with tomahawk JSF extention.
I added bean in faces-config-bean.xml and did not change web.xml
All textfields are catched by the bean except the binary file !
Any ideas?
Thanks for your help
JSP code :
Bean code :
I have created a dashlet jsp page where I need to submit a binary file with tomahawk JSF extention.
I added bean in faces-config-bean.xml and did not change web.xml
All textfields are catched by the bean except the binary file !
Any ideas?
Thanks for your help
JSP code :
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %><%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %><%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %><%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %><%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="x"%> <h:inputText id="title" value="#{MyBean.title}" /> <h:inputText id="description" value="#{MyBean.description}" /> <x:inputFileUpload id="file" value="#{MyBean.file}" storage="file"/> <h:commandButton actionListener="#{MyBean.submit}" action="submit" value="submit" />
Bean code :
import org.apache.myfaces.custom.fileupload.UploadedFile;public class MyBean { private String title; private String description; private UploadedFile file; public void submit(javax.faces.event.ActionEvent e) { // todo } public UploadedFile getFile() { return file; } public void setFile(UploadedFile file) { this.file = file; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2007 04:17 AM
I believe there are a few other steps required to get the tomahawk upload component working. I know that you need to setup a servlet filter (this is what is used to capture the file contents) so I'd suggest taking a look at the MyFaces documentation for the exact requirements.
