[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
petemuir wrote : You can run 1.3ALPHA on JBoss AS 4.0.5 - take a look at the documentation (end of chapter 1). You can't get the fix on 1.2.0.PATCH1 without patching the source of Seam and recompiling. Hi petemuir, Thank you for good advice. I started to integrate the source files from 1.3ALPHA and compile and add more source as needed to get the workspace to compile. Suddenly at work, new projects came in and I've been so busy and didn't have a chance to get back to this POC project but I appreciate it. It makes sense to surgically integrate the fix and it would help me understand the flow better too. So, I'm not there yet to see the result but I'll update back to the Forum when I'm there. Thanks again, landrew View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4062691#4062691 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4062691 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
[EMAIL PROTECTED] wrote : MultipartRequest now throws a FileUploadException instead of a RuntimeException, you can configure an exception handler for this in pages.xml. Shane, I'm running JBoss-4.0.5.GA and using JBoss-Seam-1.2.0.PATCH1 which are compatible and are working ok - only issue is the Multipart Request Runtime Exception. From the JIRA tracker, looks like this fix goes into Seam 1.3.0.ALPHA, and 1.3.0.ALPHA's readme file recommends install JBoss 4.2.0.GA which would need certain degree of adjustments to my workspace (e.g. jar files). I tried but saw a lot fo exceptions including faces-config.xml Digester parse error, etc. My question is what versions of JBoss and Seam would you recommend to get this fix. And if I stay with JBoss-4.0.5.GA and JBoss-Seam-1.2.0.PATCH1, what jar files should I replace to get this fix without breaking the compatibilty. Thank you. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054162#4054162 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054162 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
You can run 1.3ALPHA on JBoss AS 4.0.5 - take a look at the documentation (end of chapter 1). You can't get the fix on 1.2.0.PATCH1 without patching the source of Seam and recompiling. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4054165#4054165 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054165 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Hi Shane, How do I handle s:fileUpload issue regarding the file size exceeding a configured limit? When that happens, the page breaks with HTTP code 500 returned with the following message: java.lang.RuntimeException: Multipart request is larger than allowed size I could not find a way to catch this exception. This link mentions this issue but I don't see any solution yet: http://jira.jboss.com:8080/jira/browse/JBSEAM-1239?page=alldecorator=printable I'm using jboss-4.0.5.GA. The following is my configuration in components.xml web:multipart-filter create-temp-files=true max-request-size=1 url-pattern=*.seam / I would appreciate any advice on how to handle this exception. Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4053749#4053749 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4053749 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
MultipartRequest now throws a FileUploadException instead of a RuntimeException, you can configure an exception handler for this in pages.xml. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4053760#4053760 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4053760 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
evl123 wrote : Hi Shane, | On the s:fileUpload, now I have an issue regarding the file size exceeding a configured limit. When that happens, an HTTP code 500 returns with the following message: | java.lang.RuntimeException: Multipart request is larger than allowed size | | I could not find a way to catch this exception and customize it. I found this page (which mentions the same issue): | http://jira.jboss.com:8080/jira/browse/JBSEAM-1239?page=alldecorator=printable | | However, I have no idea how to resolve this exception. | | The following is my configuration in components.xml | web:multipart-filter create-temp-files=true | max-request-size=1 | url-pattern=*.seam / | | | I would appreciate any advice on how to handle this exception. | | Thanks again, | landrew | So is this a known bug in jboss-seam-1.2.0 or is it a JBoss Server and JBoss Seam package compatibility issue (or something else)? I'm using jboss-4.0.5.GA and jboss-seam-1.2.0.PATCH1 packages. Thanks for any thought on this issue.. - l View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4051902#4051902 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4051902 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
I tested this by adding a second s:fileUpload to the registration form in the seamspace example, and while the data for the second file wasn't null, it was partially truncated. I've created a JIRA issue for this and I'll fix it in the next day or so. http://jira.jboss.org/jira/browse/JBSEAM-1395 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4051438#4051438 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4051438 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
thanks shane, i was hoping i was that lost.. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4051530#4051530 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4051530 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
nathandennis wrote : thanks shane, | i was hoping i was that lost.. It seems like there wasn't a bug with fileUpload after all, I retested it again and no matter what I did it worked every time. Perhaps because it was late at night when I tried it the first time my brain was playing tricks on me :) Anyway, could you please try it with the latest CVS version of Seam and let me know if you still have problems. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4051578#4051578 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4051578 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Hi Shane, I'd like to report an error and apologize to user evl123. My userid is landrew but for some reason, there's a mix-up that started happening when I submitted an instant reply a few days ago. Since then, my replies were submitted in evl123 userid. I didn't really pay attention to this error (thinking that it could be a temporary alias for my postings because I just joined the forum). Until a few minutes ago when I clicked on profile of evl123 and found that the userid belongs to another user. Again, I'd like to inform this error to the forum and hope this would be corrected soon (if this reply still goes in as evl123 user's.) On the s:fileUpload, now I have an issue regarding the file size exceeding a configured limit. When that happens, an HTTP code 500 returns with the following message: java.lang.RuntimeException: Multipart request is larger than allowed size I could not find a way to catch this exception and customize it. I found this page (which mentions the same issue): http://jira.jboss.com:8080/jira/browse/JBSEAM-1239?page=alldecorator=printable However, I have no idea how to resolve this exception. The following is my configuration in components.xml web:multipart-filter create-temp-files=true max-request-size=1 url-pattern=*.seam / I would appreciate any advice on how to handle this exception. Thanks again, landrew View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4051148#4051148 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4051148 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
I?m very glad to see the topic of s:upload being discussed, because I too am having problems. I have managed to get s:upload to do exactly what I want with just one file upload box on a page. But my goal is multiple file upload boxes on the same page. What im doing is linking the data and fileName attributes directly to an entity bean that contains my getters and setters. In the getter method for a the column in my db where I want to store the name of each filename I added some code to write the file to a directory on my server then return the file name. pretty simple I thought. But running to problems I don?t understand 1. the only name I can give the fileName attribute is fileName? I know,,, sounds bazaar. But it seems to be the case 2. if I add the second upload box with different targets, the first box fileName will persist fine,, but and a blank file is written to disk,,, but content is null. Any help or criticism will be greatly appreciated. Using seam 1.2.1 and jboss 4.0.5 | | a:outputPanel id=loadresults1 | s:decorate id=photo1 template=layout/edit.xhtml | ui:define name=labelPhoto 1:/ui:define | s:fileUpload data=#{inventoryHome.instance.picture} | fileName=#{inventoryHome.instance.fileName} | accept= / | h:commandButton id=buttonpic1 value=Upload | action=#{inventoryHome.update} | rendered=#{inventoryHome.managed} reRender=loadresults1 | a:support event=onkeyup | actionListener=#{inventoryHome.update} | reRender=loadresults1 / | | /h:commandButton | h:commandButton id=delete value=Delete | action=#{inventoryHome.instance.setPhoto1(null)} | rendered=#{inventoryHome.managed}/ | /s:decorate | | h:graphicImage id=picture | value=/upLoads/#{inventoryHome.instance.photo1} / | /a:outputPanel | | a:outputPanel | | s:decorate id=photo2 template=layout/edit.xhtml | ui:define name=labelPhoto 2:/ui:define | s:fileUpload data=#{inventoryHome.instance.picture2} | fileName=#{inventoryHome.instance.fileName2} accept= / | h:commandButton id=buttonpic2 value=Upload | action=#{inventoryHome.update} | rendered=#{inventoryHome.managed} reRender=loadresults1 | a:support event=onkeyup | actionListener=#{inventoryHome.update} | reRender=loadresults2 / | /h:commandButton | h:commandButton id=delete2 value=Delete | action=#{inventoryHome.instance.setPhoto2(null)} | rendered=#{inventoryHome.managed}/ | | /s:decorate | h:graphicImage id=picture2 | value=/upLoads/#{inventoryHome.instance.photo2} / | /a:outputPanel | | | | -- | entity bean | | | @Column(name = photo1, length = 30) | @Length(max = 30) | public String getPhoto1() { | try{ | // first create dir for file - not needed ofcourse | File os = new | file(/usr/local/jboss/server/default/deploy/foo.ear/ + | foo.war/upLoads); | os.mkdirs(); | // create empty file with specified name and path | os = new file(/usr/local/jboss/server/default/deploy/ + | foo.ear/ + | foo.war/upLoads/+getFileName()); | FileOutputStream oStream =new FileOutputStream(os); | oStream.write(getPicture()); | this.photo1=getFileName(); | // this.picture=null; | }catch(Exception e){ | //e.printStackTrace(); | } | | return this.photo1; | } | | public void setPhoto1(String photo1) { | this.photo1 = photo1; | } | | @Column(name = photo2, length = 30) | @Length(max = 30) | public String getPhoto2() { | try{ | // create empty file with specified name and path | | File os2 = new File(/usr/local/jboss/server/default/deploy/ + | foo.ear/ + | crookmotors.war/upLoads/+getFileName2()); | FileOutputStream oStream
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
in my case I see a upload field with button. But the values for file, filename and contenttype in the backing bean are always null and getter/setter are never called only I comment the s:fileupload. In ohter forms in my app there is no problem with fileupload only in this one. | !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN | http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; | html xmlns=http://www.w3.org/1999/xhtml; | xmlns:ui=http://java.sun.com/jsf/facelets; | xmlns:h=http://java.sun.com/jsf/html; | xmlns:f=http://java.sun.com/jsf/core; | xmlns:s=http://jboss.com/products/seam/taglib; | xmlns:a=https://ajax4jsf.dev.java.net/ajax; | xmlns:rich=http://richfaces.ajax4jsf.org/rich; | xmlns:t=http://myfaces.apache.org/tomahawk; | head | meta http-equiv=Content-Type content=text/html; charset=UTF-8 / | titlesonderfreigabe/title | link href=./stylesheet/theme.css rel=stylesheet type=text/css / | link href=./stylesheet/date.css rel=stylesheet type=text/css / | /head | | body | div id=bodycontent | div id=north | div id=info | div id=text class=infos| Imprint | Contact | 02/23/2007/div | /div | div id=corporateID | div id=hdrLogoimg src=img/logo3.png alt=logo //div | /div | div id=bradgrum class=infos | /div | div id=status | a:status | f:facet name=start | h:graphicImage value=/img/mozilla_blu.gif/h:graphicImage | /f:facet | f:facet name=stop | h:graphicImage value=/img/connect_idle.gif/h:graphicImage | /f:facet | /a:status/div | /div | | div id=west | h:form | a:commandLink action=#{specialreleaseeditor.create} value=New Specialrelease reRender=center immediate=true/a:commandLink | /h:form | /div | | | h:panelGroup id=center | h:messages globalOnly=true styleClass=message/ | !-- this is included normally with ui:include | | div id=content | span class=errors |h:messages id=mainmassage globalOnly=true/ | /span | div id=uppercontent2 | h:form id=upperform enctype=multipart/form-data | s:validateAll | div class=formfield style=float: left; width: 100%; | | h:panelGrid id=upperPanelGrid columns=1 | | | | | s:decorate id=descriptionDecorator template=edit.xhtml | ui:define name=labelDescription:/ui:define | h:inputTextarea id=desc value=#{specialreleaseeditor.description} required=true | a:support event=onblur reRender=descriptionDecorator/ | /h:inputTextarea | br / | /s:decorate | | | | | | | | s:decorate | h:panelGrid id=fileugrid | h:outputLabel for=fileuploadFile/h:outputLabel | s:fileUpload id=fileupload data=#{specialreleaseeditor.file} accept=*/* fileName=#{specialreleaseeditor.fileName} contentType=#{specialreleaseeditor.fileContentType}/ | br / | s:message/s:message | /h:panelGrid | /s:decorate |
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
hi shane, my s:fileupload was with rendered false. and the component where i did binding was null. wiht your alteration it works ok. thank you! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4050512#4050512 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050512 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
[EMAIL PROTECTED] wrote : | There is no need for any special backing bean, you just bind whichever of the file's properties you need (data, filename, content type) directly to your component. The documentation in CVS explains which properties are available, but it seems you need data, contentType and fileName. Shane, Thank you!! It works!! Really Cool sir : ) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4050548#4050548 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050548 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
@morellon which alteration you mean? My binding is always null. Thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4050613#4050613 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050613 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
hispeedsurfer wrote : @morellon | which alteration you mean? | | My binding is always null. | | Thanks this one: http://fisheye.labs.jboss.com/changelog/JBoss/jboss-seam?cs=MAIN:sbryzak2:20070601012425 The same form is used for upload and download. The (Seam JavaBean) component used to bind values in tag was null with rendered false for tag and showing a link for dowload. Otherwise, the component is not null and upload works. Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4050629#4050629 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050629 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
evl123 wrote : | Oops, that is tomahawk. Ok, that's goofy of me. I guess what I'm trying to find out is: | 1. What jar file to download to get Seam's own upload component | 2. Is s:fileUpload correct tag to use? | You need jboss-seam-ui.jar, and yes, s:fileUpload is the correct tag. It's documented in the controls chapter of the Seam reference documentation. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049980#4049980 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049980 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Hi Shane, have updated the fileupload example in JIRA. Have tested and should explode-able on JBoss-4.2.0.GA. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4050099#4050099 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050099 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
[EMAIL PROTECTED] wrote : | | You need jboss-seam-ui.jar, and yes, s:fileUpload is the correct tag. It's documented in the controls chapter of the Seam reference documentation. Thanks Shane. Now, on the JSF Action Listener side, what class and from what jar file do I need for the uploaded file's Backing Bean to have Seam inject the uploaded file into? jboss-seam-ui.jar is for front-end tag but I still couldn't find the backend bean to catch the file. So far, I've only been successful following an example that uses primitive type byte[] with gives only size but not meta attributes like filename. I want to be able to upload in Seam in a similar way as done through Struts FormFile class. Thanks again. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4050283#4050283 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050283 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
evl123 wrote : | Now, on the JSF Action Listener side, what class and from what jar file do I need for the uploaded file's Backing Bean to have Seam inject the uploaded file into? | jboss-seam-ui.jar is for front-end tag but I still couldn't find the backend bean to catch the file. | | So far, I've only been successful following an example that uses primitive type byte[] with gives only size but not meta attributes like filename. I want to be able to upload in Seam in a similar way as done through Struts FormFile class. | | Thanks again. | There is no need for any special backing bean, you just bind whichever of the file's properties you need (data, filename, content type) directly to your component. The documentation in CVS explains which properties are available, but it seems you need data, contentType and fileName. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4050351#4050351 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050351 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
[EMAIL PROTECTED] wrote : | We recommend that you don't use the Tomahawk components. If you use the file upload control provided by Seam then you get all the things you mentioned (file name, content type, etc). Shane, Sorry but could you detail a bit more about file upload control provided by Seam? Do you mean something like this: s:fileUpload data=#{uploadAction.uploadedFile} / (..where uploadedFile is component of type org.apache.myfaces.custom.fileupload.UploadedFile) I tried this but the result is the same - null uploadedFile inside non-null uploadBean. However, if I specify uploadedFile to be byte[], it will work because it uploads byte stream instead of UploadedFile class type. With byte[], I can only get the content and the size but not other meta attributes of the file. Is there an example of how to use Seam's upload somewhere that I can take a look? Thanks, landrew View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049933#4049933 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049933 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
evl123 wrote : [EMAIL PROTECTED] wrote : | | We recommend that you don't use the Tomahawk components. If you use the file upload control provided by Seam then you get all the things you mentioned (file name, content type, etc). | | Shane, | Sorry but could you detail a bit more about file upload control provided by Seam? | Do you mean something like this: | s:fileUpload data=#{uploadAction.uploadedFile} / | (..where uploadedFile is component of type org.apache.myfaces.custom.fileupload.UploadedFile) | Oops, that is tomahawk. Ok, that's goofy of me. I guess what I'm trying to find out is: 1. What jar file to download to get Seam's own upload component 2. Is s:fileUpload correct tag to use? Thanks, landrew View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049940#4049940 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049940 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Hello Shane, have you an explanation for this problem? After press save in my example all fields should be accessed. But the fields still have null values. Hope you can help. Thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049485#4049485 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049485 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Hi Shane (or anyone), From my configuration and code snippets, can you tell what I missed or what mistakes I made that causes JSF to inject NULL into org.apache.myfaces.custom.fileupload.UploadedFile component? Any advice would be greatly appreciated. Thanks, landrew View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049127#4049127 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049127 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Hi Shane, have create a report to JIRA. http://jira.jboss.org/jira/browse/JBSEAM-1360 I never have done this before. Hope is ok. Thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049139#4049139 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049139 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
evl123 wrote : | From my code snippets, can you tell what I did wrong that resulted in null injection of org.apache.myfaces.custom.fileupload.UploadedFile component? | Could it be some incompatible issue in the jar files - tomahawk-1.1.5, commons-fileupload-1.1.jar, and commons-io-1.2.jar? | I tried switch to tomahawk (1.1.1) but it did not change the outcome. It would be very nice to see UploadedFile created so the file attributes like file name, type, etc. would be available. | Please shed some light - Thanks. | We recommend that you don't use the Tomahawk components. If you use the file upload control provided by Seam then you get all the things you mentioned (file name, content type, etc). View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4048820#4048820 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048820 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Shane, From my code snippets, can you tell what I did wrong that resulted in null injection of org.apache.myfaces.custom.fileupload.UploadedFile component? Could it be some incompatible issue in the jar files - tomahawk-1.1.5, commons-fileupload-1.1.jar, and commons-io-1.2.jar? I tried switch to tomahawk (1.1.1) but it did not change the outcome. It would be very nice to see UploadedFile created so the file attributes like file name, type, etc. would be available. Please shed some light - Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4048808#4048808 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048808 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
It's exactly the same behaviour in my app. But I use Facelets(*.xhtml). The strange thing I found out: If I comment s:fileUpload tag, the fields are entered !--s:fileUpload id=fileupload data=#{specialreleaseeditor.file} accept=*/* fileName=#{specialreleaseeditor.fileName} contentType=#{specialreleaseeditor.fileContentType}/-- Without the comment the getter/setter of the fields file, fileName and fileContentType are not called in debug mode. Use Seam 1.2.1 and have configured the app as discriped. No exception is thrown. What can I do, get this working. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4048134#4048134 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048134 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
hispeedsurfer wrote : It's exactly the same behaviour in my app. | Can you please create a minimal, working test case in JIRA so that I can reproduce this issue. I need something that I can easily deploy with minimal effort. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4048533#4048533 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048533 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
This solution of reading uploaded file thru byte[] works. Thank you for sharing. However, I wanted to use a different approach using Backing Bean wrapping org.apache.myfaces.custom.fileupload.UploadedFile component. In my attempt as stated, I found that the Backing Bean was instantiated ok, the file upload Browse and Submit buttons were generated ok but when Submit is clicked, the JSF failed to inject the multipart UploadedFile to it, so the Action listener class received Backing Bean with a null UploadedFile object. The Backing Bean is a Seam component but the UploadedFile is JSF multipart/form-data component. I would appreciate any help shed some light in this. Thanks - landrew. Code snippets as shown: fileUpload.xhtml: .. h:form enctype=multipart/form-data Browse and Pick a File t:inputFileUpload value=#{uploadBean.uploadedFile} storage=file / h:commandButton value=Submit action=#{uploader.upload} / /h:form .. UploadBean.java (Backing Bean) .. @Name(uploadBean) @Scope(SESSION) public class UploadBean { @In(required=false) private UploadedFile uploadedFile; .. UploadAction.java (Action class JSF Listener) .. @Name(uploader) @Scope(EVENT) public class UploadAction implements UploadActionIF { private final String CLAZZ = this.getClass().toString(); /** * Uploaded file wrapper object. */ @In(required = false) private UploadBean uploadBean; .. public String upload() { .. Other components: - jboss-4.0.5.GA Server - WEB-INF/tomahawk.taglib.xml - tomahawk-1.1.5.jar - jboss-seam.jar thru Seam-Version: 1.2.0.PATCH1 - jsf-facelets.jar Implementation-Version: 1.1.12 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4048021#4048021 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048021 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
yuwono wrote : Yes, it works for both SLSB and SFSB above. So, I can't use JSPs or it should be a TODO task for seam (to work along with JSP)? | | Thanks Shane. I thought JSP's would have been extinct by now, but I guess you could go ahead and raise it in JIRA :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4040126#4040126 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4040126 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Hello petemuir, I've tried the SFSB version too, no error but still the same. Can U help? package myapp; | | import javax.ejb.Remove; | import javax.ejb.Stateful; | | import org.jboss.seam.annotations.Begin; | import org.jboss.seam.annotations.Destroy; | import org.jboss.seam.annotations.End; | import org.jboss.seam.annotations.Name; | | @Stateful | @Name(admin) | public class Admin implements AdminI { | private byte[] uploadedFile; | | public void setUploadedFile(byte[] uploadedFile) | { | this.uploadedFile = uploadedFile; | } | | public byte[] getUploadedFile() | { | return uploadedFile; | } | | @Begin | public void start() | { | System.out.println(Start conversation); | } | | @End | public void parse() throws Exception | { | if(uploadedFile != null) | System.out.println(size = + uploadedFile.length); | else | System.out.println(picture is null); | } | | @Destroy @Remove | public void destroy() {} | } View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4039713#4039713 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4039713 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Does it work with a facelets page instead of a jsp? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4039802#4039802 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4039802 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
Yes, it works for both SLSB and SFSB above. So, I can't use JSPs or it should be a TODO task for seam (to work along with JSP)? Thanks Shane. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4040068#4040068 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4040068 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simplest s:fileUpload usage
This is the nature of a SLSB anonymous wrote : The contents of instance variables are not guaranteed to be preserved across method calls. or anonymous wrote : This means that everything a stateless session bean method needs to know has to be passed via the method's parameters. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4038801#4038801 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4038801 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user