-
15. Re: Any experiences with the Tomahawk components?
bfo81 Sep 5, 2006 4:48 AM (in response to smokingapipe)It would be nicer if the taglib file would be integrated in the jar (like ajax4jsf or others have it), but for some reason the Tomahawk team decided to put that "burden" on you (though it's a light one).
However, your step-by-step-howto works perfectly - and that's the important thing ;). -
16. Re: Any experiences with the Tomahawk components?
patrick.antivackis Sep 15, 2006 11:24 AM (in response to smokingapipe)In fact the taglib is already in the jar file.
So for me the installation was quite painless :
App server : JBOSS 4.0.4 GA JEMS
1) place tomahawk-1.1.3.jar, tomahawk-sandbox-xxx-SNAPSHOT.jar, commons-lang-2.1.jar and commons-fileupload-1.1.1.jar in your project resources\WEB-INF\lib directory
2) add<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> <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages --> <filter-mapping> <filter-name>MyFacesExtensionsFilter</filter-name> <url-pattern>*.jsf</url-pattern> </filter-mapping>
in your project web.xml file.
3) Add<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%> <%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
in all the jsp files using tomahawk or sandbox tags.
4) build & deploy. Don't forget to specify or override the resources\WEB-INF\lib directory in your build.xml such as<zipfileset id="example.war.webinf.lib" prefix="WEB-INF/lib" dir="resources/WEB-INF/lib"> <include name="*.jar"/> </zipfileset>
That's it, the tomahawk components work, the sandbox too, and you can also use the DOJO AJAX library with the adequate sandbox jsf tag. For example :<h:panelGroup> <s:dojoInitializer require="dojo.widget.Editor"/> <h:form id="myForm"> <h:inputTextarea id="editarea2" styleClass="dojo-Editor" value="hello world"> </h:inputTextarea> <h:commandLink action="submitted" id="submitted" value="[Submit]"/> <%/* Alternate way to do it */%> <h:inputTextarea id="myInputTextarea" value="Customized Toolbars"/> <f:verbatim> <script type="text/javascript"><!-- var editorArgs = { items: ["textGroup", "blockGroup", "justifyGroup", "colorGroup", "listGroup", "indentGroup", "linkGroup"] }; var editor = dojo.widget.createWidget("Editor", editorArgs, dojo.byId("myForm:myInputTextarea")); //--></script> </f:verbatim> </h:form> </h:panelGroup>
Next step is to make communicate DOJO directly with SEAM framework.
I not yet to try the direct DOJO/remote Seam communication, but i will let you know the results. -
17. Re: Any experiences with the Tomahawk components?
bfo81 Sep 15, 2006 12:21 PM (in response to smokingapipe)Sorry, but if you use JSP this might be correct. But for Facelets you do defintely need an extra *.taglib.xml file plus an entry in the web.xml referencing that file.
-
18. Re: Any experiences with the Tomahawk components?
hispeedsurfer Sep 17, 2006 12:42 PM (in response to smokingapipe)Hello bfo81,
can you tell me set up JBoss AS + Seam to use the dojoInitializer.
A already followed the instructions here:
JBoss.com-Wiki-SeamFileUpload -> http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamFileUpload
and here
JBoss.com - Wiki - JBossWithIntegratedMyFaces -> http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWithIntegratedMyFaces
With xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:s="http://myfaces.apache.org/sandbox"
i have access to <s:graphicImageAjax but not to dojoInitializer
Any idea?
Thanks
Andreas -
19. Re: Any experiences with the Tomahawk components?
bfo81 Sep 18, 2006 5:43 AM (in response to smokingapipe)I must confess I don't know exactly what this tag does *g*. Do you have an entry for dojoInitializer in your tomahawk-sandbox(or a name like that).taglib.xml?
-
20. Re: Any experiences with the Tomahawk components?
hispeedsurfer Sep 18, 2006 6:34 AM (in response to smokingapipe)Yes, there is a entry in the corresponding taglib.xml that I have placed in WEB-INF folder and registerd in web.xml
-
21. Re: Any experiences with the Tomahawk components?
bfo81 Sep 18, 2006 6:39 AM (in response to smokingapipe)Is there an exception? Or does just nothing happen?
-
22. Re: Any experiences with the Tomahawk components?
hispeedsurfer Sep 19, 2006 5:30 AM (in response to smokingapipe)No exception or anything else. The page result is a plain website, no debug information or whatever.
-
23. Re: Any experiences with the Tomahawk components?
bfo81 Sep 19, 2006 5:43 AM (in response to smokingapipe)And the logfile? Nothing? I had a similar situation, but I think with something else (Tobago maybe).
-
24. Re: Any experiences with the Tomahawk components?
patrick.antivackis Sep 19, 2006 9:59 AM (in response to smokingapipe)Hispeedsurfer, are you using facelets ?
-
25. Re: Any experiences with the Tomahawk components?
hispeedsurfer Sep 19, 2006 10:22 AM (in response to smokingapipe)Hello, yes I'm using Facelets. Should it not work with Facelets?
Thanks
Andreas -
26. Re: Any experiences with the Tomahawk components?
bfo81 Sep 19, 2006 2:55 PM (in response to smokingapipe)It works. That's what this thread is about. Maybe you should open a new one and explain your problem in detail.
-
27. Re: Any experiences with the Tomahawk components?
icebearoz Sep 29, 2006 4:27 PM (in response to smokingapipe)Hi Together,
maybe someone of you lucky guys can give me little hint.
I am trying to run tomahawk but it does not work.
What I have:
JBoss 4.0.4-GA JEMS with the MyFaces installation as it comes with JBoss.
I did it as nhpvti and some of you other guys said:
I placed tomahawk-1.1.3.jar , commons-fileupload-1.1.1.jar , commons-lang-2.1.jar into $JBOSS_HOME/server/default/deploy/tomcat55.sar/jsf-libs
Then I altered the web.xml in $JBOSS_HOME/server/default/deploy/tomcat55.sar/conf
Now it looks like:<?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <!-- ======================== Introduction ============================== --> <!-- This document defines default values for *all* web applications --> <!-- loaded into this instance of Tomcat. As each application is --> <!-- deployed, this file is processed, followed by the --> <!-- "/WEB-INF/web.xml" deployment descriptor from your own --> <!-- applications. --> <!-- --> <!-- WARNING: Do not configure application-specific resources here! --> <!-- They should go in the "/WEB-INF/web.xml" file in your application. --> <!-- ================== Common filter Configuration ==================== --> <filter> <filter-name>CommonHeadersFilter</filter-name> <filter-class>org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class> <init-param> <param-name>X-Powered-By</param-name> <param-value>Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5</param-value> </init-param> </filter> <filter-mapping> <filter-name>CommonHeadersFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <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> <url-pattern>*.jsf</url-pattern> </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> <!-- ================== Common Listener Configuration ==================== --> <listener> ...... .... ..
After that I declared the taglib in my web.xml file in my project in:
web/WEB-INF/
Here how it looks now:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <!-- Einbinden des JSF Controller-Servlets --> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- Binden des Servlets an alle URL mit der Endung *.faces --> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> <context-param> <param-name>facelets.LIBRARIES</param-name> <param-value>/WEB-INF/tomahawk.taglib.xml</param-value> </context-param> </web-app>
And finally I create the tomahawk.taglib.xml in /WEB/INF folder of my project.
JBoss starts without any error-messages. And everything looks fine.
When I try to deploy my project everything is still fine.
As soon as I start my browser and access the project the page is displayed but JBoss throws the following errors:21:59:59,945 INFO [[/syncbaker-war]] No state saving method defined, assuming default server state saving 22:00:01,930 INFO [BaseBean] Accessing login service: successful 22:00:01,945 INFO [BaseBean] Accessing executer: successful 22:00:01,976 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true 22:00:01,976 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true 22:00:01,976 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false 22:00:01,976 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false 22:00:02,055 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception java.lang.NoSuchMethodError: org.apache.myfaces.renderkit.html.util.DummyFormUtils.isWriteDummyForm(Ljavax/faces/context/FacesContext;)Z at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.writeCodeBeforeBodyEnd(ExtensionsPhaseListener.java:110) at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.getCodeBeforeBodyEnd(ExtensionsPhaseListener.java:96) at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.renderCodeBeforeBodyEnd(ExtensionsPhaseListener.java:86) at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.afterPhase(ExtensionsPhaseListener.java:66) at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter(LifecycleImpl.java:536) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:359) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595)
The project does not have any tomahawk tags yet. Only standard jsf-tags. It worked fine before (with the plain installation shiped with JBoss).
Any ideas what I am doing wrong?
Tanks for your help in advance. I really appreciate it.
Regards -
28. Re: Any experiences with the Tomahawk components?
nhpvti Oct 2, 2006 4:10 PM (in response to smokingapipe)java.lang.NoSuchMethodError: org.apache.myfaces.renderkit.html.util.DummyFormUtils.isWriteDummyForm(
As far as I remember I had the same error when running Tomahawk with myfaces from the JBoss distribution.
Then I've replaced myfaces with the version 1.1.3 from http://www.myfaces.org. -
29. Re: Any experiences with the Tomahawk components?
bfo81 Oct 5, 2006 8:16 AM (in response to smokingapipe)Tomahawk has (as well as Sandbox) dependencies on MyFaces. So it's mandatory to have a up to date version.
I even had to upgrade both Sandbox and Tomahawk to 1.1.5 in order to make the schedule component work.