-
1. Re: myfaces / tomahawk javascript code
gavin.king Jun 8, 2006 9:38 AM (in response to japplicoon)I don't find any myfaces jar in the example's ear files .... confusing to me, how do things work?
The Java EE 5 spec requires that the application server provides a JSF implementation. So MyFaces is bundled with JBoss.
I don't understand the rest of what you are talking about.
The issue tracker example uses a <t:dataList>. -
2. Re: myfaces / tomahawk javascript code
japplicoon Jun 8, 2006 9:57 AM (in response to japplicoon)Hi!
Thank you for the hint about the myfaces libs!
The problem is that in my configuration of myfaces, facelets and tomahawk, the javascript code is not generated that is needed for the onclick events of <h:commandLink>, for example.
There should be something like - copied from the booking example:
function clear__5Fid2() {
var f = document.forms['_id2'];
f.elements['_id2:_link_hidden_'].value='';
f.target='';
}
I have a faces taglib for tomahawk (and a custom one), both work fine.
My web.xml is a somehow enriched version of the booking example. I commented out the
org.apache.myfaces.webapp.filter.ExtensionsFilter needed by the tomahawk library I used to use in previous webapps.
Here it is - Something wrong ??:
<web-app version="2.4"
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">
<context-param>
<param-name>org.jboss.seam.core.init.myFacesLifecycleBug</param-name>
<param-value>@myFacesLifecycleBug@</param-value>
</context-param>
<!-- Seam -->
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
<!-- MyFaces -->
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
<!-- Propagate conversations across redirects -->
<filter-name>Seam Redirect Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
<!--
<filter-name>extensionsFilter</filter-name> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
-->
<filter-mapping>
<filter-name>Seam Redirect Filter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<context-param>
<param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
<param-value>120000</param-value>
</context-param>
<context-param>
<param-name>org.jboss.seam.core.init.jndiPattern</param-name>
<param-value>@jndiPattern@</param-value>
</context-param>
<context-param> <param-name>org.jboss.seam.core.init.componentClasses</param-name>
<param-value>@embeddedEjb@</param-value>
</context-param>
<context-param>
<param-name>org.jboss.seam.core.init.debug</param-name>
<param-value>true</param-value>
</context-param>
<!-- JSF -->
<context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>false</param-value>
</context-param>
<!--
<context-param>
<param-name>facelets.VIEW_MAPPINGS</param-name>
<param-value>*.xhtml;*.jsp;*.jsf;</param-value>
</context-param>
-->
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/facelets/taglibs/tomahawk.taglib.xml; /WEB-INF/facelets/taglibs/myfacelets.taglib.xml</param-value>
</context-param>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<!-- JSF RI -->
<!--
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
-->
</web-app> -
3. Re: myfaces / tomahawk javascript code
japplicoon Jun 8, 2006 11:20 AM (in response to japplicoon)I found the problem - and have another one ;-(
The tomahawk-1.1.2-SNAPSHOT.jar I used (that one worked best with facelets) was the reason why I didn't get the JavaScript code for commandLinks.
I now took the jar from the issue example - BUT:
In "my" version a filter was responsible for including javaScript references for the extension components (like popupCalendar).
Has anyone a hint how else to get that tomahawk JavaScript show up - with that tomahawk lib as in the issues (the scripts are packaged with the jar) ?
Thanks again!