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.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971948#3971948

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971948
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to