myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Long Tran <lt...@xbiosystems.com>
Subject Re: Tomahawk Tree2 Javascript problem.
Date Sun, 19 Nov 2006 03:07:07 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I think I had it, since the images (+ and - icons) show up, I assume
they are rendered through the filter.<br>
<br>
Anyhow, this is the sniplet of my web.xml:<br>
<font face="Courier New, Courier, monospace"><br>
<br>
&lt;filter&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;<br>
&nbsp;&nbsp;&nbsp;
&lt;filter-class&gt;org.apache.myfaces.webapp.filter.ExtensionsFilter&lt;/filter-class&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;init-param&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;maxFileSize&lt;/param-name&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;20m&lt;/param-value&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;description&gt;Set
the size limit for uploaded files.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Format: 10 - 10 bytes<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
10k - 10 KB<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
10m - 10 MB<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1g - 1 GB<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/description&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;<br>
&lt;/filter&gt;<br>
<br>
&lt;!-- extension mapping for adding &lt;script/&gt;, &lt;link/&gt;,
and other resource tags to JSF-pages&nbsp; --&gt;<br>
&lt;filter-mapping&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;!-- servlet-name must match the name of your
javax.faces.webapp.FacesServlet entry --&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;<br>
&lt;/filter-mapping&gt;<br>
<br>
&lt;!-- extension mapping for serving page-independent resources
(javascript, stylesheets, images, etc.)&nbsp; --&gt;<br>
&lt;filter-mapping&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;filter-name&gt;MyFacesExtensionsFilter&lt;/filter-name&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;<br>
&lt;/filter-mapping&gt;<br>
<br>
&lt;servlet-mapping&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;<br>
&lt;/servlet-mapping&gt;<br>
</font><br>
<br>
Thanks,<br>
Long<br>
<br>
Simon Kitching wrote:
<blockquote cite="mid4536F88D.5030505@rhe.co.nz" type="cite">Hi,
  <br>
  <br>
Have you got the ExtensionsFilter configured?
  <br>
  <br>
<a class="moz-txt-link-freetext" href="http://myfaces.apache.org/tomahawk/extensionsFilter.html">http://myfaces.apache.org/tomahawk/extensionsFilter.html</a>
  <br>
  <br>
Regards,
  <br>
  <br>
Simon
  <br>
  <br>
Long Tran wrote:
  <br>
  <blockquote type="cite">All,
    <br>
    <br>
I've created a TreeModel and successfully rendered it on the browser,
however, when I click on the expand/collapse button, it's not working.
    <br>
    <br>
Apparently, in the HTML page generated, javascript function
"treeNavClick" was not generated, is there any tag/attribute i need to
add to the Tree2 component?
    <br>
    <br>
Tomahawk version 1.1.5.
    <br>
    <br>
Hers is my Jsp:
    <br>
    <br>
&lt;f:view&gt;
    <br>
&lt;t:tree2 id="myTree" showNav="true"
rendered="#{LovBackingBean.lovTree!=null}"
    <br>
showRootNode="false" var="node" value="#{LovBackingBean.lovTree}"
    <br>
varNodeToggler="t"&gt;
    <br>
&nbsp;&nbsp;&nbsp; &lt;f:facet name="rootNode"&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;h:panelGroup&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;h:outputText value="#{node.description}"/&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/h:panelGroup&gt;
    <br>
&nbsp;&nbsp; &lt;/f:facet&gt;
    <br>
&nbsp;&nbsp; &lt;f:facet name="topNode"&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;h:panelGroup&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;h:outputText value="#{node.description}"/&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/h:panelGroup&gt;
    <br>
&nbsp;&nbsp; &lt;/f:facet&gt;
    <br>
&nbsp;&nbsp; &lt;f:facet name="childNode"&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;h:panelGroup&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;h:outputText value="#{node.description}"/&gt;
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/h:panelGroup&gt;
    <br>
&nbsp;&nbsp; &lt;/f:facet&gt;
    <br>
&lt;/t:tree2&gt;
    <br>
&lt;/f:view&gt;
    <br>
  </blockquote>
  <br>
  <br>
  <br>
</blockquote>
</body>
</html>

Mime
View raw message