I've committed a basic working version of a fileUpload tag to CVS. It doesn't
need all the additional jar files that the tomahawk component requires, and is
greatly simplified from the 17 levels of abstraction that the Apache version
implements. Usage is as such:
page:
<s:fileUpload id="picture" value="#{register.picture}"/>
web.xml:
<filter>
| <filter-name>Seam Multipart Filter</filter-name>
|
<filter-class>org.jboss.seam.servlet.SeamMultipartFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Multipart Filter</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
action class:
| @Name("register")
| public class RegisterAction implements Register
| {
| private byte[] picture;
|
| public void setPicture(byte[] picture)
| {
| this.picture = picture;
| }
|
| public byte[] getPicture()
| {
| return picture;
| }
| }
|
That's all there is to it. It doesn't do anything fancy yet such as progress
notification, etc, or for that matter even store the filename. It would be
nice though if someone could give it a try and report back any issues/feature
requests either in this thread, or on the following JIRA page:
http://jira.jboss.org/jira/browse/JBSEAM-630
Thanks!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004872#4004872
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004872
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user