0 Replies Latest reply on Dec 3, 2007 2:50 AM by olafos

    richLtree problem

    olafos

      Hi,

      I'm using richfaces 3.1.2 in my application. I'm getting strange problem when using rich:tree component. The HTML output ends suddenly somewhere in the middle o the tree javascript code. Here's an example of what I'm gettng:

      My jsp code:

      <%@page contentType="text/html"%>
      <%@page pageEncoding="UTF-8"%>
      <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
      <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
      <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@ taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
      <%@ taglib prefix="r" uri="http://richfaces.org/rich"%>
      <%@ taglib uri="http://jsftutorials.net/htmLib" prefix="html"%>
      
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      
      <f:view>
       <h:form id="treeTest">
      
       <r:separator height="1" style="padding:10px 0" />
      
       <r:tree switchType="server" value="#{context.node}" var="node"
       nodeFace="#{node.class.name}">
       <r:treeNode type="org.pg.atp.share.value.ContainerValue">
       <h:outputText value="Container: #{node.name}" />
       </r:treeNode>
       <r:treeNode
       type="org.pg.atp.share.value.ContainerCourseRelationValue">
       <h:outputText
       value="RelationToCourse #{node.course.name}: min(#{node.semesterMin}) opt(#{node.semesterOpt} max(#{node.semesterMax}))" />
       </r:treeNode>
       <r:treeNode type="org.pg.atp.share.value.CourseValue">
       <h:outputText value="Course: #{node.name}" />
       </r:treeNode>
       <r:treeNode type="org.pg.atp.share.value.FacultyValue">
       <h:outputText value="Faculty: #{node.name}" />
       </r:treeNode>
       </r:tree>
      
      
       <r:separator height="1" style="padding:10px 0" />
      
       <h:outputText value="This text is never shown :("></h:outputText>
      
       </h:form>
      </f:view>
      
      


      And below is the html output. As you can see the script tag at the end is opened and never closed. Also the r:separator and h:outputText are not displayed at all! When I remove the rich:tree tag the page is rendered correctly.

      Can anybody help?

      Thanks,
      Olaf

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      
      
      <html xmlns="http://www.w3.org/1999/xhtml"><head><link rel='stylesheet' type='text/css' href='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/css/dragIndicator.xcss/DATB/eAEz3vGhHwAFZwJr.faces' /><link rel='stylesheet' type='text/css' href='/atp-presentation/a4j_3_1_0css/tree.xcss/DATB/eAEz3vGhHwAFZwJr.faces' /><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org.ajax4jsf.javascript.PrototypeScript.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/json/json-mini.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org.ajax4jsf.javascript.DnDScript.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/utils.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/json/json-dom.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/dnd/dnd-common.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org.ajax4jsf.javascript.AjaxScript.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/ajax4jsf/javascript/scripts/form.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/form.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/events.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/tree.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/tree-selection.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/tree-item.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/tree-item-dnd.js.faces'></script><script type='text/javascript' src='/atp-presentation/a4j_3_1_0org/richfaces/renderkit/html/scripts/drag-indicator.js.faces'></script></head><form id="treeTest" name="treeTest" method="post" action="/atp-presentation/treeTest.faces" enctype="application/x-www-form-urlencoded">
      
      <input type="hidden" name="treeTest" value="treeTest" />
      <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id3" />
      <div align="left" id="treeTest:j_id_jsp_968118562_2" style="font-size: 0px;"><div class="rich-separator " style="width: ; height: 1px; background-image: url(/atp-presentation/a4j_3_1_0org.richfaces.renderkit.html.images.SimpleSeparatorImage/DATB/eAFjYDx-.goLAAdAAnA_.faces); background-repeat: repeat-x; background-position:center; padding:10px 0"></div></div><div class="dr-tree rich-tree " id="treeTest:j_id_jsp_968118562_3" xmlns:rich="http://richfaces.ajax4jsf.org/rich" rows="0"><div id="treeTest:j_id_jsp_968118562_3:childs"><table border="0" cellpadding="0" cellspacing="0" class="dr-tree-full-width rich-tree-node" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4"><tbody><tr id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4:mainRow" onclick=" "><td class="dr-tree-h-ic rich-tree-node-handleicon dr-tree-h-ic-line-node"><div><a href="#" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4:handle" onclick="{var form = A4J.findForm(this);var params = new Object();params['treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4NodeExpanded'] = true;Richfaces.jsFormSubmit('treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4', form.id, '', params);}; return false;"><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4:handle:img:collapsed" src="/atp-presentation/a4j_3_1_0org.richfaces.renderkit.html.images.TreePlusImage/DATB/eAH7....1Tv3GRgYACS3BY4_.faces" /><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-expanded" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4:handle:img:expanded" src="/atp-presentation/a4j_3_1_0org.richfaces.renderkit.html.images.TreeMinusImage/DATB/eAH7....1Tv3GRgYACS3BY4_.faces" style="display: none;" /></a></div></td><td class="dr-tree-h-ic rich-tree-node-icon dr-tree-h-ic-line-clp" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4:icon" rich:draggableoptions="{'parameters':{'dragSourceId':'treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>\x5D:j_id_jsp_968118562_4','treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>\x5D:j_id_jsp_968118562_4':'treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>\x5D:j_id_jsp_968118562_4'} } " rich:dropzoneoptions="{} "><img class="dr-tree-h-ic-img-md dr-tree-h-ic-img" src="/atp-presentation/a4j_3_1_0images/iconFolder.gif.faces" /></td><td class="dr-tree-h-text rich-tree-node-text " id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4:text" rich:highlightedclass="dr-tree-i-hl rich-tree-node-highlighted" rich:selectedclass="dr-tree-i-sel rich-tree-node-selected">Container: NestedContainer2</td></tr></tbody></table><div id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@103a0ec[id=<null>,name=NestedContainer2,status=<null>]:j_id_jsp_968118562_4:childs" style="display: none;" class="dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-cildren dr-tree-h-ic-line"></div><p class="dr-tree-last-node-marker"></p><table border="0" cellpadding="0" cellspacing="0" class="dr-tree-full-width rich-tree-node" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4"><tbody><tr id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4:mainRow" onclick=" "><td class="dr-tree-h-ic rich-tree-node-handleicon dr-tree-h-ic-line-last"><div><a href="#" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4:handle" onclick="{var form = A4J.findForm(this);var params = new Object();params['treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4NodeExpanded'] = true;Richfaces.jsFormSubmit('treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4', form.id, '', params);}; return false;"><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4:handle:img:collapsed" src="/atp-presentation/a4j_3_1_0org.richfaces.renderkit.html.images.TreePlusImage/DATB/eAH7....1Tv3GRgYACS3BY4_.faces" /><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-expanded" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4:handle:img:expanded" src="/atp-presentation/a4j_3_1_0org.richfaces.renderkit.html.images.TreeMinusImage/DATB/eAH7....1Tv3GRgYACS3BY4_.faces" style="display: none;" /></a></div></td><td class="dr-tree-h-ic rich-tree-node-icon dr-tree-h-ic-line-clp" id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4:icon" rich:draggableoptions="{'parameters':{'dragSourceId':'treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>\x5D:j_id_jsp_968118562_4','treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>\x5D:j_id_jsp_968118562_4':'treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>\x5D:j_id_jsp_968118562_4'} } " rich:dropzoneoptions="{} "><img class="dr-tree-h-ic-img-md dr-tree-h-ic-img" src="/atp-presentation/a4j_3_1_0images/iconFolder.gif.faces" /></td><td class="dr-tree-h-text rich-tree-node-text " id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4:text" rich:highlightedclass="dr-tree-i-hl rich-tree-node-highlighted" rich:selectedclass="dr-tree-i-sel rich-tree-node-selected">Container: NestedContainer1</td></tr></tbody></table><div id="treeTest:j_id_jsp_968118562_3:org.pg.atp.share.value.ContainerValue@17247df[id=<null>,name=NestedContainer1,status=<null>]:j_id_jsp_968118562_4:childs" style="display: none;" class="dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-cildren"></div></div><input type="hidden" id="treeTest:j_id_jsp_968118562_3:input" name="treeTest:j_id_jsp_968118562_3:input" value="" /><script type="text/javascript">var Richfaces_Tree_treeTest_j_id_jsp_968118562_3 =
       new Tree("treeTest:j_id_jsp_968118562_3", "treeTest:j_id_jsp_968118562_3:input", "server",
       {
       onselect: "",
       onexpand: "",
       oncollapse: ""
       },
       function(event) {
       A4J.AJAX.Submit('j_id_jsp_968118562_0','treeTest',event,{'parameters':{'treeTest:j_id_jsp_968118562_3:selectedNode':event.selectedNode} ,'actionUrl':'/atp-presentation/treeTest.faces'} ); return false;
       },
       false,
       true
       );
       Richfaces_Tree_treeTest_j_id_jsp_968118562_3.drop = function(event,drag){var options = {'parameters':{'treeTest:j_id_jsp_968118562_3':'treeTest:j_id_jsp_968118562_3'} ,'actionUrl':'/atp-presentation/treeTest.faces'} ;options.parameters['dropTargetId'] = 'treeTest:j_id_jsp_968118562_3';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('j_id_jsp_968118562_0','treeTest',event,options);};</script><div id="treeTest:j_id_jsp_968118562_3:script"><script type="text/javascript">
      </html>