1 2 3 Previous Next 41 Replies Latest reply on Oct 30, 2006 10:50 AM by shundavid

    Any experiences with the Tomahawk components?

    smokingapipe

      They look great. Do they work well with Seam? I'm finally getting the hang of this whole thing and it is amazing. If I can just drop in these very nice AJAX components it will take my web application capabilities to a new level.

        • 1. Re: Any experiences with the Tomahawk components?
          bfo81

          I uses the Tomahawk calendar and it works fine :). Just follow the manual and use it ;).

          • 2. Re: Any experiences with the Tomahawk components?
            ngolovin

            Do you mean AJAX Components from the Sandbox?
            I wasn't able to use them with Seam.
            Had to write my own ones.

            • 3. Re: Any experiences with the Tomahawk components?
              ngolovin

              If you have any success in using th AJAX components, please share the experience with us!

              • 4. Re: Any experiences with the Tomahawk components?
                smokingapipe

                Yes I'm talking about the AJAX components. The calendar bfo81 is referring to is an AJAX component I assume. I'm about to give it a whirl to see what happens. It should work, right?

                • 5. Re: Any experiences with the Tomahawk components?
                  smokingapipe

                  I'm making progress on it. One major problem: there are lots of helpful examples on this site: http://www.irian.at/myfaces/home.jsf

                  The problem is that all these examples render their html head compoennt by including a file called inc/head.inc . D'ohh! The example does no good if critical work is being performed in a file which is not shown anywhere. And indeed, inc/head.inc is performing critical work. It sets up the JavaScript include elements. So I need to somehow figure out what's going on in that file. The other thing they don't tell you is that there is probably a Tomahawk servlet somewhere that is serving up the necessary JS function files. This is not mentioned anywhere but obviously none of it will work without that!

                  It would have taken someone about 3 minutes to say, "Hey this is what is in head.inc" or "you need to put this line in web.xml so the servlet will start" but it's not there.

                  • 6. Re: Any experiences with the Tomahawk components?
                    baz

                    Hello,
                    The mentioned URL is a live example of the tomahawk components.
                    You can found more infos in the myfaces wiki:
                    http://wiki.apache.org/myfaces/

                    It would have taken someone about 3 minutes to say, "Hey this is what is in head.inc" or "you need to put this line in web.xml so the servlet will start" but it's not there.

                    The mentined site is not a documentation site. Besides the live examples you have to retrieve the examples source code. I am getting this directly from the myfaces svn repository. If you need more information look here:
                    http://myfaces.apache.org/ and ask on the mailinglists.
                    Ciao,
                    Carsten

                    • 7. Re: Any experiences with the Tomahawk components?
                      smokingapipe

                      I'm making progress on it.

                      First, yes indeed, a filter is necessary (obviously), and here's the docs on how to set it up:

                      http://myfaces.apache.org/tomahawk/extensionsFilter.html

                      Cool.

                      Next problem is getting the right jar files. Alas, the jars that are distributed by Tomahawk have a mix of the TLDs, the JSF implementation, and all the Tomahawk components and support classes all in one place. I need to take those apart, remove the JSF implementation but keep the Tomahawk parts and the support stuff (filters, etc), and then get everything working together. It seems like it's doable. I'll post the results here when I get it all sorted out.

                      • 8. Re: Any experiences with the Tomahawk components?
                        smokingapipe

                        HA HA! I have it WORKING! Tomahawk components, playing nicely within JBoss with Seam.

                        Now I can go crazy with cool AJAX-style apps just by dropping in the components I want.

                        I tell you, this stuff (Seam + everything else) is HARD to set up, the configuration can be quite fragile, and documentation is in its early stages, but it does hold an amazing promise of easy-to-build object-oriented webapps.

                        • 9. Re: Any experiences with the Tomahawk components?
                          smokingapipe

                          By the way to get it working, I had to grab the Myfaces 1.1.3 dist and take apart the jar, remove all the JSF-related stuff and the .tld files and then put it back into a jar. I'll post exactly what I did, and maybe a framework with all the jars, web.xml, etc, ready to use. That's the hardest part: just getting the build env ready for use.

                          • 10. Re: Any experiences with the Tomahawk components?
                            bfo81

                            Sorry guys, I wanted to post a complete documentation some days ago. I even typed it in. But somehow I forgot to click the submit button (maybe because I went to lunch and wanted to read over it again) and due to something else I really forgot it witched the window tab and must have closed it accidently.

                            But however, you made it work yourself. I'm short of time now, so I cannot post the complete howto again, but here's the short form. You just need

                            - the tomahawk-1.1.3.jar file (place it in $JBOSS_HOME/server/default/deploy/tomcat55.sar/jsflibs) + maybe some other Apache Commons jars (watch out for NoClassDefFoundErrors and google it - I don't know anymore which ones Tomahawk needed)

                            - some entries in the /WEB-INF/web.xml of your project

                            <filter>
                             <filter-name>MyFacesExtensionsFilter</filter-name>
                             <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
                             <init-param>
                             <param-name>maxFileSize</param-name>
                             <param-value>20m</param-value>
                             <description>Set the size limit for uploaded files.
                             Format: 10 - 10 bytes
                             10k - 10 KB
                             10m - 10 MB
                             1g - 1 GB
                             </description>
                             </init-param>
                            </filter>
                            
                            <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
                            <filter-mapping>
                             <filter-name>MyFacesExtensionsFilter</filter-name>
                             <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
                             <servlet-name>Faces Servlet</servlet-name>
                            </filter-mapping>
                            
                            <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
                            <filter-mapping>
                             <filter-name>MyFacesExtensionsFilter</filter-name>
                             <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
                            </filter-mapping>
                            
                            <context-param>
                             <param-name>facelets.LIBRARIES</param-name>
                             <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
                            </context-param>
                            
                            


                            - place a file named tomahawk.taglib.xml in /WEB/INF folder of your project. Contents of this file are listed here: http://wiki.java.net/bin/view/Projects/FaceletsTaglibsMyfacesSandbox

                            - use xmlns:t="http://myfaces.apache.org/tomahawk"
                            in your jsf headers in oder to make the prefix available and to use tomahawk components ;).

                            • 11. Re: Any experiences with the Tomahawk components?
                              nhpvti

                               

                              "SmokingAPipe" wrote:
                              ... I'll post exactly what I did, and maybe a framework with all the jars, web.xml, etc, ready to use. That's the hardest part: just getting the build env ready for use.


                              for the beginning we would appreciate exact description how to alter the jars, web.xml etc.

                              • 12. Re: Any experiences with the Tomahawk components?
                                bfo81

                                I don't think it's necessary to alter jars. Have a look at the way I made it work ;).

                                • 13. Re: Any experiences with the Tomahawk components?
                                  smokingapipe

                                  Ok, I looked back in the jar again, and in fact the necessary filter is in the tomahawk jar. But it's important to get exactly the right version of that jar and put just the right thing in web.xml.

                                  I'll get all the jars and web.xml put into a simple zip file so you can try it.

                                  • 14. Re: Any experiences with the Tomahawk components?
                                    nhpvti

                                     

                                    "bfo81" wrote:
                                    I don't think it's necessary to alter jars. Have a look at the way I made it work ;).


                                    Thank you, you are right. I followed your instruction and it works at least for the standard components. I didn't try AJAX components from the Sandbox yet. Should they work as well?

                                    Here my recap:

                                    1) Place tomahawk-1.1.3.jar, commons-fileupload-1.1.1.jar, commons-lang-2.1.jar (may be some other dependencies) into $JBOSS_HOME/server/default/deploy/tomcat55.sar/jsflibs

                                    2) Alter /WEB-INF/web.xml according to
                                    http://myfaces.apache.org/tomahawk/extensionsFilter.html

                                    3) Declare the taglib in your web.xml file
                                    <context-param>
                                     <param-name>facelets.LIBRARIES</param-name>
                                     <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
                                    </context-param>


                                    4) Create tomahawk.taglib.xml in /WEB/INF folder of your project
                                    I've found list of standard tags here:
                                    http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk

                                    Question: should a standard taglib definition be better included in a some way directly in the tomahawk jar file in order to avoid steps 3 and 4?

                                    Taglib file sample for Sandbox components can be found here:
                                    http://wiki.java.net/bin/view/Projects/FaceletsTaglibsMyfacesSandbox



                                    1 2 3 Previous Next