1 2 Previous Next 16 Replies Latest reply on Feb 16, 2007 10:22 AM by costeen21

    tomahawk extension filter and seam fileUpload

    milesif

      Hi everbody,

      In my seam application I use tomahawk components so I had to put in my web.xml the following rows


       <filter>
       <filter-name>extensionsFilter</filter-name>
       <filter-class>
       org.apache.myfaces.component.html.util.ExtensionsFilter
       </filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>extensionsFilter</filter-name>
       <url-pattern>*.seam</url-pattern>
       </filter-mapping>
      
       <filter-mapping>
       <filter-name>extensionsFilter</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       </filter-mapping>
      


      To use <s:fileUpload> I also added
       <filter>
       <filter-name>Seam Multipart Filter</filter-name>
       <filter-class>
       org.jboss.seam.servlet.SeamMultipartFilter
       </filter-class>
       <init-param>
       <param-name>createTempFiles</param-name>
       <param-value>true</param-value>
       </init-param>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Multipart Filter</filter-name>
       <url-pattern>*.seam</url-pattern>
       </filter-mapping>
      


      The problem is that seam upload seems to work fine only if I comment Tomahawk extensionFilter, but that makes unavailable some Tomahawk's components (tree2 for example) .

      I tried different ordering of filters inside my web.xml (I don't know if that makes sense....), but I could not make tomahawk components and seam fileUpload work together.

      Do you have an idea where is the problem ?

      Many Thanks in advance

      Ciao Francesco







        • 1. Re: tomahawk extension filter and seam fileUpload
          shane.bryzak

          This is because the tomahawk extensions filter wraps the request with its own request wrapper if it's a multipart request. I could get the file upload control to do some reflection gymnastics to unwrap the request if that's the case... let me see what I can do about it.

          • 2. Re: tomahawk extension filter and seam fileUpload
            shane.bryzak

            I've committed a change to CVS that should work around this issue. It would be great if you could try it out and let me know if it works or not.

            • 3. Re: tomahawk extension filter and seam fileUpload
              gavin.king

              So, Shane was being very nice and helpful, as is his nature. Unfortunately my nature is to be the guy who says "no" to things and pisses everyone off and I've nixed this change. I won't let the Seam codebase become more complex due to workarounds for problems with Tomahawk. The trouble with workarounds like this is that they break everytime Tomahawk internal implementation changes, and thus create a maintainence nightmare for us.

              Sorry.

              • 4. Re: tomahawk extension filter and seam fileUpload
                shane.bryzak

                And just to follow up, I strongly recommend that you look for some alternative to using tomahawk. As a general rule, Seam/tomahawk compatibility is not a priority and there may be other issues in the future for which there will be no easy workaround.

                • 5. Re: tomahawk extension filter and seam fileUpload
                  ffischer

                  Shane,

                  can you be a bit more precise on the alternatives on using tomahawk? What are you guys using?

                  Regards,

                  Frank

                  "shane.bryzak@jboss.com" wrote:
                  And just to follow up, I strongly recommend that you look for some alternative to using tomahawk. As a general rule, Seam/tomahawk compatibility is not a priority and there may be other issues in the future for which there will be no easy workaround.




                  • 6. Re: tomahawk extension filter and seam fileUpload
                    shane.bryzak

                    Both ADF/Trinidad and ICEFaces provide a tree control, I believe.

                    • 7. Re: tomahawk extension filter and seam fileUpload
                      seto

                      I'm trouble in it, because of the extended datatable providing the newspaper table format. Exploring the ADF and ICEFACES, I found no replacement of the extended datatable.

                      • 8. Re: (O/T) tomahawk extension filter and seam fileUpload
                        kukeltje

                        I'll switch to icefaces as soon as someone shows me a working conversation switching, theme switching, a tabswithcing that does show the tab that is selected in one workspace/conversation also in the next workspace AND correct way of configuring all this with facelets. I've had a lot more problems with icefaces than I'd like and a lot less with tomahawk. I do like you guys promoting icefaces, but make them realize that it is a major requirement to have an open issue system up and running... (it is not even on their list on how to build a community)

                        • 9. Re: tomahawk extension filter and seam fileUpload
                          gavin.king

                          The icefaces guys have told me that they will have an open JIRA installation available sometime next month.

                          For now, you can report issues in the "ICE Faces Integration" component in the Seam JIRA (which they are monitoring).

                          • 10. Re: tomahawk extension filter and seam fileUpload
                            seto

                            So to use the newspaper table, I have to change the newspaper table tag to seam to use? It's so unreasonable.

                            • 11. Re: tomahawk extension filter and seam fileUpload
                              gavin.king

                              What is "unreasonable" is that Tomahawk uses a servlet filter to accomplish things that should not require use of such a blunt instrument. There is zero reason why components like a treeview or a table should require a servlet filter to operate. Such things are perfectly able to be implemented using standard JSF mechanisms. In fact, that is exactly why the JSF specification exists!

                              So if you want to complain, please complain on the MyFaces list!

                              • 12. Re: tomahawk extension filter and seam fileUpload
                                milesif

                                Sorry for my late reply. I switched back to the tomahawk upload control. I tried to use icefaces (I really like it), but I had problems and no time to solve them.....
                                I will try them out nex time ;-) and switch to ADF/IceFaces.

                                Anyway, many thanks to everybody, especially to Shane.

                                ciao Francesco

                                PS: and many thanks to "the guy who says no" too.

                                • 13. Re: tomahawk extension filter and seam fileUpload
                                  seto

                                  Sorry for my impolite reply. I just get caught by the feature my project needed. It's the newspaper table component. Absoulutely I love Seam and I'm trying my best to make surroundings use Seam while many of Chinese use Spring. I just want the Seam to be perfect to support various feature.

                                  • 14. Re: tomahawk extension filter and seam fileUpload
                                    costeen21

                                    Gavin,

                                    I switched from Tomahawk to IceFaces partly based on your recommendation (see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=95328).

                                    Seam is an awesome product. IceFaces is a good product. Using the products together I've had to do more trial and error programming than desired. I've had some struggles, but the products work much better together with the last few releases of each product. Overall, I've been amazed at how fast Seam and IceFaces have been sending out releases.

                                    I've been waiting to implement the IceFaces file upload component until some of the issues were worked out. Seam has come out with their own file upload component. So now Seam has decided that getting the IceFaces file upload component working with Seam is not a priority (see http://jira.jboss.org/jira/browse/JBSEAM-676 ).

                                    This is great, except I can't get Seam's file upload component it to work with IceFaces which again is what you recommend (I'm trying to get Seam's file upload to work on an IceFaces Tab and/or Popup panel).

                                    I feel like if Seam is going to recommend IceFaces that either 1) Seam should work with the IceFaces file upload or 2) the file upload component that comes with Seam should work with IceFaces. At least one of these two options needs to be a priority, Otherwise, I kind of feel like you've left me out to dry. I hope I'm not coming across as ungrateful because Seam is a great product and I really appreciate all of the Seam's work and how fast you and the team respond to forum issues. I just think one of these items should be a priority.

                                    1 2 Previous Next