myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Gülke <tim.gue...@gmail.com>
Subject problem with tree2 componen
Date Mon, 30 May 2005 21:15:46 GMT
Hey list,

we wanted to use the Apache MyFaces tree2 component in a web-project.
But we experienced a problem which really drives us crazy.

We first used the tree in a single page. When the user clicked on a
link in the tree, the tree-site disappeared and the new site opened.
Everything was fine. But when we decided to use a frameset, with the
tree2-component in the left frame, the problems began: When the user
clicks on a link the first time, everything is ok, the sites opens in
the right frame, directed there through our Navigationhandler. But
when he clicks the second time, the tree does not pass it to the
NavigationHandler. Instead, it loads itself in the right (!) frame.
The next click is ok again.
It seems that every second click goes wrong. How is that possible? Did
we made some mistake in our code? The following is the tree2-part of
our ClassTree.jsp:

<x:tree2 id="serverTree" imageLocation="images"
value="#{treeBacker.treeData}" var="node" varNodeToggler="t"
clientSideToggle="false">
  <f:facet name="object"> 
      <h:panelGroup> 
          <x:commandLink action="list:faces/lists/objectList.jsp"
target="home">
              <h:graphicImage value="/images/class.gif" border="0"/> 
              <h:outputText value="#{node.description}"/> 
          </x:commandLink> 
      </h:panelGroup> 
  </f:facet> 
  <f:facet name="Person"> 
      <h:panelGroup> 
          <x:commandLink action="list:faces/lists/PersonList.jsp"
target="home">
              <h:graphicImage value="/images/class.gif" border="0"/> 
              <h:outputText value="#{node.description}"/> 
          </x:commandLink> 
      </h:panelGroup> 
  </f:facet> 
  <f:facet name="Professor"> 
      <h:panelGroup> 
          <x:commandLink action="list:faces/lists/ProfessorList.jsp"
target="home">
              <h:graphicImage value="/images/class.gif" border="0"/> 
              <h:outputText value="#{node.description}"/> 
          </x:commandLink> 
      </h:panelGroup> 
  </f:facet> 
  <f:facet name="Student"> 
      <h:panelGroup> 
          <x:commandLink action="list:faces/lists/StudentList.jsp"
target="home">
              <h:graphicImage value="/images/class.gif" border="0"/> 
              <h:outputText value="#{node.description}"/> 
          </x:commandLink> 
      </h:panelGroup> 
  </f:facet> 
</x:tree2> 


The "lists:..." in the x:commandLink components are necessary for our
NavigationHandler. Last but not least our frameset in index.jsp:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
</head>

<frameset cols="20%,80%">
<frame src="faces/classTree.jsp" name="classTree">
<frame src="faces/home.jsp" name="home">
<noframes>
Ihr Browser kann diese Seite leider nicht anzeigen!
</noframes>
</frameset>
</html>

Any help is really welcome!

Regards and greetings from Germany,

Tim Gülke

Mime
View raw message