You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Schweighardt, Nicole" <Ni...@Dresdner-Bank.com> on 2006/11/16 11:36:22 UTC

Tree2 - link problem

Hello,

I have got a problem with the tree2 and links.

I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.


Here is the code:

tree.jsp

<f:subview id="mytree">
<h:form id="treeform">

<t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
		
		<f:facet name="root">
            <h:panelGroup id="rootgroup">
				<h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
            </h:panelGroup>
        </f:facet>
        <f:facet name="firstleaf">
            <h:panelGroup id="firstleafgroup">
			     <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
	      	            </h:panelGroup>
        </f:facet>
        <f:facet name="secondLeaf" >
            <h:panelGroup id="secondleafgroup">  
                <h:form id="leafform">
                <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
                	<h:outputText value="showNested"/>
               		<f:param name="docNum" value="#{node.description}"/>
                </h:commandLink>
               </h:form>
            </h:panelGroup>
        </f:facet>
    </t:tree2>
    </h:form>
    
 </f:subview>


If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!! 


TreeBean.java 

public class TreeBean {

	private TreeModelBase     _treeModel;
	private HtmlTree          _tree;

	public TreeNode getTreeData()
	 {

	        TreeNode treeData = new TreeNodeBase("root", "Process", false);

	        TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
	        treeData.getChildren().add(firstLeafNode);
	        
	        
	        //First Leaf
	        firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);

	        firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));	        
	        treeData.getChildren().add(firstLeafNode);

	        return treeData;
	 }
	 
 
	 public void showNested(){
		 
		 System.out.println("in showNested()");
	 }
...
}

Thank you for your help.
N.Schweighardt



Re: Tree2 - link problem

Posted by Matthias Wessendorf <ma...@apache.org>.
... it renders the form only when not embedded in a form...

<h:form>
<t:tabbe....>

did the trick (and removing the *nested* forms) of course



On 11/17/06, Matthias Wessendorf <ma...@apache.org> wrote:
> The issue was that tabbedPane renders a form
> so the "form" for the links of the tree are a nested html form
> java script can't access the form in that case.
>
> overhauling the page helped
>
> Thx,
> Matt
>
> On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > what is rendered for the "treeform"
> >
> > <form id="???" name="???" ...>
> >
> >
> > can you provide the complete JSPs and JavaBeans ?
> > (or a small WAR file, which contains the project?)
> >   (can send it offline to me directly)
> >
> > -M
> >
> > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > HI,
> > >
> > > yes, there is a form in the tabbedPane with a link; the same link, that was in the
> > > tree. And it works!
> > >
> > > <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> > >                         <t:panelTab id="tab1" label="Process">
> > >                                 <t:div id="treeDiv"
> > >                                         style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> > >                                         //normally here´s the insert tag for the tree.jsp
> > >
> > >                                         //This link works! It is in the first tab of the panelTabbedPane
> > >                                         <h:form>
> > >                                         <h:commandLink action="diversification">
> > >                                                         <h:outputText value="Diversification" />
> > >                                         </h:commandLink>
> > > ...
> > >
> > > Nicki
> > >
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > Matthias Wessendorf
> > > Gesendet: Donnerstag, 16. November 2006 13:46
> > > An: MyFaces Discussion
> > > Betreff: Re: Tree2 - link problem
> > >
> > >
> > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > Hi,
> > > >
> > > > yes, it works standalone.
> > >
> > > ok, that is good.
> > >
> > > now let's move to the next step.
> > >
> > > can you nest something less complex inside the tabbedPane?
> > > a damn simple form ? just for the case ?
> > >
> > >
> > >
> > > > I hope it is possible to put a tree into the tabbedPane-Tag? That is very important
> > > > for my application.
> > > >
> > > > Thank you.
> > > > Nicki
> > > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > > Matthias Wessendorf
> > > > Gesendet: Donnerstag, 16. November 2006 13:30
> > > > An: MyFaces Discussion
> > > > Betreff: Re: Tree2 - link problem
> > > >
> > > >
> > > > puh!
> > > >
> > > > that is hard to debug from here.
> > > >
> > > > Can you try to get the tree "standalone" running?
> > > > to avoid *confusion* with JS erros by tabbedPane ?
> > > >
> > > > -M
> > > >
> > > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > > Hi,
> > > > >
> > > > > yes, there is a JS-Error: "f has no properties". F ist the form:
> > > > > Here is the belonging function:
> > > > >
> > > > > 69 function clear_panelTabbedPane1_3Amytree_3Atreeform() {
> > > > > 70  var f = document.forms['panelTabbedPane1:mytree:treeform'];
> > > > > 71  f.elements['panelTabbedPane1:mytree:treeform:_link_hidden_'].value='';
> > > > > 72  f.target='';
> > > > > 73 }
> > > > >
> > > > > It seems that it is not possible to get the "treeform".
> > > > >
> > > > > It ist here in my code, wrapping the tree.
> > > > > ...
> > > > > <f:subview id="mytree">
> > > > > <h:form id="treeform">
> > > > >
> > > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > > >
> > > > >                 <f:facet name="root">
> > > > >             <h:panelGroup id="rootgroup">
> > > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > > >                                 ...
> > > > >
> > > > > But I don´t understand why "f has no properties".
> > > > >
> > > > > Nicki
> > > > >
> > > > >
> > > > > -----Ursprüngliche Nachricht-----
> > > > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > > > Matthias Wessendorf
> > > > > Gesendet: Donnerstag, 16. November 2006 13:14
> > > > > An: MyFaces Discussion
> > > > > Betreff: Re: Tree2 - link problem
> > > > >
> > > > >
> > > > > do you get js error instead (use firebug for checking that)
> > > > >
> > > > > -M
> > > > >
> > > > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > > > Hi Matthias,
> > > > > >
> > > > > > thanks, that´s right, but unfortunately it wasn´t the reason.
> > > > > >
> > > > > > That is the whole jsp, which includes the tree.jsp
> > > > > >
> > > > > > tabbedPane.jsp
> > > > > > <%@ page session="false"
> > > > > > %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> > > > > > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> > > > > > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> > > > > > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
> > > > > >  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> > > > > >
> > > > > >  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > > > > > <head>
> > > > > > <title>Prototype</title>
> > > > > >    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> > > > > > </head>
> > > > > > <body>
> > > > > > <f:view>
> > > > > >         <f:subview id="panelTabbedPane1">
> > > > > >                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> > > > > >                         <t:panelTab id="tab1" label="Process">
> > > > > >                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> > > > > >                                         <f:verbatim>
> > > > > >                                                 <tiles:insert attribute="tree" flush="false" />
> > > > > >                                         </f:verbatim>
> > > > > >
> > > > > >                                         <h:form>
> > > > > >                                                 //This commandLink works!!!
> > > > > >                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
> > > > > >                                                         <h:outputText value="showNested"/>
> > > > > >                                         </h:commandLink>
> > > > > >                                                 <f:verbatim><br></f:verbatim>
> > > > > >                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
> > > > > >                                         </h:commandLink>
> > > > > >                                         </h:form>
> > > > > >                         ...
> > > > > >
> > > > > > Any Idea?
> > > > > > Thank you very much,
> > > > > > Nicki
> > > > > >
> > > > > >
> > > > > >
> > > > > > -----Ursprüngliche Nachricht-----
> > > > > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > > > > Matthias Wessendorf
> > > > > > Gesendet: Donnerstag, 16. November 2006 12:27
> > > > > > An: MyFaces Discussion
> > > > > > Betreff: Re: Tree2 - link problem
> > > > > >
> > > > > >
> > > > > >   <context-param>
> > > > > >                 <description>
> > > > > >                         Validate managed beans, navigation rules and ensure that forms
> > > > > > are not nested.
> > > > > >                 </description>
> > > > > >         <param-name>org.apache.myfaces.VALIDATE</param-name>
> > > > > >         <param-value>true</param-value>
> > > > > >     </context-param>
> > > > > >
> > > > > > On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > > > > > > Nicole,
> > > > > > >
> > > > > > > you are using <form><form/></form>
> > > > > > >
> > > > > > > nested forms are "invalid" html.
> > > > > > >
> > > > > > > since your tree2 is already wrapped by a form, remove the *wrapper*
> > > > > > > from the tree2-link.
> > > > > > >
> > > > > > > HTH,
> > > > > > > Matthias
> > > > > > >
> > > > > > > (MyFaces should tell you that, at least it is configurable)
> > > > > > > (RI is silent there ;))
> > > > > > >
> > > > > > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > I have got a problem with the tree2 and links.
> > > > > > > >
> > > > > > > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > > > > > > >
> > > > > > > >
> > > > > > > > Here is the code:
> > > > > > > >
> > > > > > > > tree.jsp
> > > > > > > >
> > > > > > > > <f:subview id="mytree">
> > > > > > > > <h:form id="treeform">
> > > > > > > >
> > > > > > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > > > > > >
> > > > > > > >                 <f:facet name="root">
> > > > > > > >             <h:panelGroup id="rootgroup">
> > > > > > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > > > > > >             </h:panelGroup>
> > > > > > > >         </f:facet>
> > > > > > > >         <f:facet name="firstleaf">
> > > > > > > >             <h:panelGroup id="firstleafgroup">
> > > > > > > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > > > > > > >                             </h:panelGroup>
> > > > > > > >         </f:facet>
> > > > > > > >         <f:facet name="secondLeaf" >
> > > > > > > >             <h:panelGroup id="secondleafgroup">
> > > > > > > >                 <h:form id="leafform">
> > > > > > > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > > > > > > >                         <h:outputText value="showNested"/>
> > > > > > > >                         <f:param name="docNum" value="#{node.description}"/>
> > > > > > > >                 </h:commandLink>
> > > > > > > >                </h:form>
> > > > > > > >             </h:panelGroup>
> > > > > > > >         </f:facet>
> > > > > > > >     </t:tree2>
> > > > > > > >     </h:form>
> > > > > > > >
> > > > > > > >  </f:subview>
> > > > > > > >
> > > > > > > >
> > > > > > > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > > > > > > >
> > > > > > > >
> > > > > > > > TreeBean.java
> > > > > > > >
> > > > > > > > public class TreeBean {
> > > > > > > >
> > > > > > > >         private TreeModelBase     _treeModel;
> > > > > > > >         private HtmlTree          _tree;
> > > > > > > >
> > > > > > > >         public TreeNode getTreeData()
> > > > > > > >          {
> > > > > > > >
> > > > > > > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > > > > > > >
> > > > > > > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > > > > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > > > > >
> > > > > > > >
> > > > > > > >                 //First Leaf
> > > > > > > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > > > > > > >
> > > > > > > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > > > > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > > > > >
> > > > > > > >                 return treeData;
> > > > > > > >          }
> > > > > > > >
> > > > > > > >
> > > > > > > >          public void showNested(){
> > > > > > > >
> > > > > > > >                  System.out.println("in showNested()");
> > > > > > > >          }
> > > > > > > > ...
> > > > > > > > }
> > > > > > > >
> > > > > > > > Thank you for your help.
> > > > > > > > N.Schweighardt
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Matthias Wessendorf
> > > > > > > http://tinyurl.com/fmywh
> > > > > > >
> > > > > > > further stuff:
> > > > > > > blog: http://jroller.com/page/mwessendorf
> > > > > > > mail: mwessendorf-at-gmail-dot-com
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Matthias Wessendorf
> > > > > > http://tinyurl.com/fmywh
> > > > > >
> > > > > > further stuff:
> > > > > > blog: http://jroller.com/page/mwessendorf
> > > > > > mail: mwessendorf-at-gmail-dot-com
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matthias Wessendorf
> > > > > http://tinyurl.com/fmywh
> > > > >
> > > > > further stuff:
> > > > > blog: http://jroller.com/page/mwessendorf
> > > > > mail: mwessendorf-at-gmail-dot-com
> > > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > > http://tinyurl.com/fmywh
> > > >
> > > > further stuff:
> > > > blog: http://jroller.com/page/mwessendorf
> > > > mail: mwessendorf-at-gmail-dot-com
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > http://tinyurl.com/fmywh
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Tree2 - link problem

Posted by Matthias Wessendorf <ma...@apache.org>.
The issue was that tabbedPane renders a form
so the "form" for the links of the tree are a nested html form
java script can't access the form in that case.

overhauling the page helped

Thx,
Matt

On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> what is rendered for the "treeform"
>
> <form id="???" name="???" ...>
>
>
> can you provide the complete JSPs and JavaBeans ?
> (or a small WAR file, which contains the project?)
>   (can send it offline to me directly)
>
> -M
>
> On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > HI,
> >
> > yes, there is a form in the tabbedPane with a link; the same link, that was in the
> > tree. And it works!
> >
> > <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> >                         <t:panelTab id="tab1" label="Process">
> >                                 <t:div id="treeDiv"
> >                                         style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> >                                         //normally here´s the insert tag for the tree.jsp
> >
> >                                         //This link works! It is in the first tab of the panelTabbedPane
> >                                         <h:form>
> >                                         <h:commandLink action="diversification">
> >                                                         <h:outputText value="Diversification" />
> >                                         </h:commandLink>
> > ...
> >
> > Nicki
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > Matthias Wessendorf
> > Gesendet: Donnerstag, 16. November 2006 13:46
> > An: MyFaces Discussion
> > Betreff: Re: Tree2 - link problem
> >
> >
> > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > Hi,
> > >
> > > yes, it works standalone.
> >
> > ok, that is good.
> >
> > now let's move to the next step.
> >
> > can you nest something less complex inside the tabbedPane?
> > a damn simple form ? just for the case ?
> >
> >
> >
> > > I hope it is possible to put a tree into the tabbedPane-Tag? That is very important
> > > for my application.
> > >
> > > Thank you.
> > > Nicki
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > Matthias Wessendorf
> > > Gesendet: Donnerstag, 16. November 2006 13:30
> > > An: MyFaces Discussion
> > > Betreff: Re: Tree2 - link problem
> > >
> > >
> > > puh!
> > >
> > > that is hard to debug from here.
> > >
> > > Can you try to get the tree "standalone" running?
> > > to avoid *confusion* with JS erros by tabbedPane ?
> > >
> > > -M
> > >
> > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > Hi,
> > > >
> > > > yes, there is a JS-Error: "f has no properties". F ist the form:
> > > > Here is the belonging function:
> > > >
> > > > 69 function clear_panelTabbedPane1_3Amytree_3Atreeform() {
> > > > 70  var f = document.forms['panelTabbedPane1:mytree:treeform'];
> > > > 71  f.elements['panelTabbedPane1:mytree:treeform:_link_hidden_'].value='';
> > > > 72  f.target='';
> > > > 73 }
> > > >
> > > > It seems that it is not possible to get the "treeform".
> > > >
> > > > It ist here in my code, wrapping the tree.
> > > > ...
> > > > <f:subview id="mytree">
> > > > <h:form id="treeform">
> > > >
> > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > >
> > > >                 <f:facet name="root">
> > > >             <h:panelGroup id="rootgroup">
> > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > >                                 ...
> > > >
> > > > But I don´t understand why "f has no properties".
> > > >
> > > > Nicki
> > > >
> > > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > > Matthias Wessendorf
> > > > Gesendet: Donnerstag, 16. November 2006 13:14
> > > > An: MyFaces Discussion
> > > > Betreff: Re: Tree2 - link problem
> > > >
> > > >
> > > > do you get js error instead (use firebug for checking that)
> > > >
> > > > -M
> > > >
> > > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > > Hi Matthias,
> > > > >
> > > > > thanks, that´s right, but unfortunately it wasn´t the reason.
> > > > >
> > > > > That is the whole jsp, which includes the tree.jsp
> > > > >
> > > > > tabbedPane.jsp
> > > > > <%@ page session="false"
> > > > > %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> > > > > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> > > > > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> > > > > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
> > > > >  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> > > > >
> > > > >  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > > > > <head>
> > > > > <title>Prototype</title>
> > > > >    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> > > > > </head>
> > > > > <body>
> > > > > <f:view>
> > > > >         <f:subview id="panelTabbedPane1">
> > > > >                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> > > > >                         <t:panelTab id="tab1" label="Process">
> > > > >                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> > > > >                                         <f:verbatim>
> > > > >                                                 <tiles:insert attribute="tree" flush="false" />
> > > > >                                         </f:verbatim>
> > > > >
> > > > >                                         <h:form>
> > > > >                                                 //This commandLink works!!!
> > > > >                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
> > > > >                                                         <h:outputText value="showNested"/>
> > > > >                                         </h:commandLink>
> > > > >                                                 <f:verbatim><br></f:verbatim>
> > > > >                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
> > > > >                                         </h:commandLink>
> > > > >                                         </h:form>
> > > > >                         ...
> > > > >
> > > > > Any Idea?
> > > > > Thank you very much,
> > > > > Nicki
> > > > >
> > > > >
> > > > >
> > > > > -----Ursprüngliche Nachricht-----
> > > > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > > > Matthias Wessendorf
> > > > > Gesendet: Donnerstag, 16. November 2006 12:27
> > > > > An: MyFaces Discussion
> > > > > Betreff: Re: Tree2 - link problem
> > > > >
> > > > >
> > > > >   <context-param>
> > > > >                 <description>
> > > > >                         Validate managed beans, navigation rules and ensure that forms
> > > > > are not nested.
> > > > >                 </description>
> > > > >         <param-name>org.apache.myfaces.VALIDATE</param-name>
> > > > >         <param-value>true</param-value>
> > > > >     </context-param>
> > > > >
> > > > > On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > > > > > Nicole,
> > > > > >
> > > > > > you are using <form><form/></form>
> > > > > >
> > > > > > nested forms are "invalid" html.
> > > > > >
> > > > > > since your tree2 is already wrapped by a form, remove the *wrapper*
> > > > > > from the tree2-link.
> > > > > >
> > > > > > HTH,
> > > > > > Matthias
> > > > > >
> > > > > > (MyFaces should tell you that, at least it is configurable)
> > > > > > (RI is silent there ;))
> > > > > >
> > > > > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > > > > Hello,
> > > > > > >
> > > > > > > I have got a problem with the tree2 and links.
> > > > > > >
> > > > > > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > > > > > >
> > > > > > >
> > > > > > > Here is the code:
> > > > > > >
> > > > > > > tree.jsp
> > > > > > >
> > > > > > > <f:subview id="mytree">
> > > > > > > <h:form id="treeform">
> > > > > > >
> > > > > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > > > > >
> > > > > > >                 <f:facet name="root">
> > > > > > >             <h:panelGroup id="rootgroup">
> > > > > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > > > > >             </h:panelGroup>
> > > > > > >         </f:facet>
> > > > > > >         <f:facet name="firstleaf">
> > > > > > >             <h:panelGroup id="firstleafgroup">
> > > > > > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > > > > > >                             </h:panelGroup>
> > > > > > >         </f:facet>
> > > > > > >         <f:facet name="secondLeaf" >
> > > > > > >             <h:panelGroup id="secondleafgroup">
> > > > > > >                 <h:form id="leafform">
> > > > > > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > > > > > >                         <h:outputText value="showNested"/>
> > > > > > >                         <f:param name="docNum" value="#{node.description}"/>
> > > > > > >                 </h:commandLink>
> > > > > > >                </h:form>
> > > > > > >             </h:panelGroup>
> > > > > > >         </f:facet>
> > > > > > >     </t:tree2>
> > > > > > >     </h:form>
> > > > > > >
> > > > > > >  </f:subview>
> > > > > > >
> > > > > > >
> > > > > > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > > > > > >
> > > > > > >
> > > > > > > TreeBean.java
> > > > > > >
> > > > > > > public class TreeBean {
> > > > > > >
> > > > > > >         private TreeModelBase     _treeModel;
> > > > > > >         private HtmlTree          _tree;
> > > > > > >
> > > > > > >         public TreeNode getTreeData()
> > > > > > >          {
> > > > > > >
> > > > > > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > > > > > >
> > > > > > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > > > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > > > >
> > > > > > >
> > > > > > >                 //First Leaf
> > > > > > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > > > > > >
> > > > > > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > > > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > > > >
> > > > > > >                 return treeData;
> > > > > > >          }
> > > > > > >
> > > > > > >
> > > > > > >          public void showNested(){
> > > > > > >
> > > > > > >                  System.out.println("in showNested()");
> > > > > > >          }
> > > > > > > ...
> > > > > > > }
> > > > > > >
> > > > > > > Thank you for your help.
> > > > > > > N.Schweighardt
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Matthias Wessendorf
> > > > > > http://tinyurl.com/fmywh
> > > > > >
> > > > > > further stuff:
> > > > > > blog: http://jroller.com/page/mwessendorf
> > > > > > mail: mwessendorf-at-gmail-dot-com
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matthias Wessendorf
> > > > > http://tinyurl.com/fmywh
> > > > >
> > > > > further stuff:
> > > > > blog: http://jroller.com/page/mwessendorf
> > > > > mail: mwessendorf-at-gmail-dot-com
> > > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > > http://tinyurl.com/fmywh
> > > >
> > > > further stuff:
> > > > blog: http://jroller.com/page/mwessendorf
> > > > mail: mwessendorf-at-gmail-dot-com
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > http://tinyurl.com/fmywh
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Tree2 - link problem

Posted by Matthias Wessendorf <ma...@apache.org>.
what is rendered for the "treeform"

<form id="???" name="???" ...>


can you provide the complete JSPs and JavaBeans ?
(or a small WAR file, which contains the project?)
  (can send it offline to me directly)

-M

On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> HI,
>
> yes, there is a form in the tabbedPane with a link; the same link, that was in the
> tree. And it works!
>
> <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
>                         <t:panelTab id="tab1" label="Process">
>                                 <t:div id="treeDiv"
>                                         style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
>                                         //normally here´s the insert tag for the tree.jsp
>
>                                         //This link works! It is in the first tab of the panelTabbedPane
>                                         <h:form>
>                                         <h:commandLink action="diversification">
>                                                         <h:outputText value="Diversification" />
>                                         </h:commandLink>
> ...
>
> Nicki
>
>
> -----Ursprüngliche Nachricht-----
> Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> Matthias Wessendorf
> Gesendet: Donnerstag, 16. November 2006 13:46
> An: MyFaces Discussion
> Betreff: Re: Tree2 - link problem
>
>
> On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > Hi,
> >
> > yes, it works standalone.
>
> ok, that is good.
>
> now let's move to the next step.
>
> can you nest something less complex inside the tabbedPane?
> a damn simple form ? just for the case ?
>
>
>
> > I hope it is possible to put a tree into the tabbedPane-Tag? That is very important
> > for my application.
> >
> > Thank you.
> > Nicki
> >
> > -----Ursprüngliche Nachricht-----
> > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > Matthias Wessendorf
> > Gesendet: Donnerstag, 16. November 2006 13:30
> > An: MyFaces Discussion
> > Betreff: Re: Tree2 - link problem
> >
> >
> > puh!
> >
> > that is hard to debug from here.
> >
> > Can you try to get the tree "standalone" running?
> > to avoid *confusion* with JS erros by tabbedPane ?
> >
> > -M
> >
> > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > Hi,
> > >
> > > yes, there is a JS-Error: "f has no properties". F ist the form:
> > > Here is the belonging function:
> > >
> > > 69 function clear_panelTabbedPane1_3Amytree_3Atreeform() {
> > > 70  var f = document.forms['panelTabbedPane1:mytree:treeform'];
> > > 71  f.elements['panelTabbedPane1:mytree:treeform:_link_hidden_'].value='';
> > > 72  f.target='';
> > > 73 }
> > >
> > > It seems that it is not possible to get the "treeform".
> > >
> > > It ist here in my code, wrapping the tree.
> > > ...
> > > <f:subview id="mytree">
> > > <h:form id="treeform">
> > >
> > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > >
> > >                 <f:facet name="root">
> > >             <h:panelGroup id="rootgroup">
> > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > >                                 ...
> > >
> > > But I don´t understand why "f has no properties".
> > >
> > > Nicki
> > >
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > Matthias Wessendorf
> > > Gesendet: Donnerstag, 16. November 2006 13:14
> > > An: MyFaces Discussion
> > > Betreff: Re: Tree2 - link problem
> > >
> > >
> > > do you get js error instead (use firebug for checking that)
> > >
> > > -M
> > >
> > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > Hi Matthias,
> > > >
> > > > thanks, that´s right, but unfortunately it wasn´t the reason.
> > > >
> > > > That is the whole jsp, which includes the tree.jsp
> > > >
> > > > tabbedPane.jsp
> > > > <%@ page session="false"
> > > > %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> > > > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> > > > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> > > > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
> > > >  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> > > >
> > > >  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > > > <head>
> > > > <title>Prototype</title>
> > > >    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> > > > </head>
> > > > <body>
> > > > <f:view>
> > > >         <f:subview id="panelTabbedPane1">
> > > >                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> > > >                         <t:panelTab id="tab1" label="Process">
> > > >                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> > > >                                         <f:verbatim>
> > > >                                                 <tiles:insert attribute="tree" flush="false" />
> > > >                                         </f:verbatim>
> > > >
> > > >                                         <h:form>
> > > >                                                 //This commandLink works!!!
> > > >                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
> > > >                                                         <h:outputText value="showNested"/>
> > > >                                         </h:commandLink>
> > > >                                                 <f:verbatim><br></f:verbatim>
> > > >                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
> > > >                                         </h:commandLink>
> > > >                                         </h:form>
> > > >                         ...
> > > >
> > > > Any Idea?
> > > > Thank you very much,
> > > > Nicki
> > > >
> > > >
> > > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > > Matthias Wessendorf
> > > > Gesendet: Donnerstag, 16. November 2006 12:27
> > > > An: MyFaces Discussion
> > > > Betreff: Re: Tree2 - link problem
> > > >
> > > >
> > > >   <context-param>
> > > >                 <description>
> > > >                         Validate managed beans, navigation rules and ensure that forms
> > > > are not nested.
> > > >                 </description>
> > > >         <param-name>org.apache.myfaces.VALIDATE</param-name>
> > > >         <param-value>true</param-value>
> > > >     </context-param>
> > > >
> > > > On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > > > > Nicole,
> > > > >
> > > > > you are using <form><form/></form>
> > > > >
> > > > > nested forms are "invalid" html.
> > > > >
> > > > > since your tree2 is already wrapped by a form, remove the *wrapper*
> > > > > from the tree2-link.
> > > > >
> > > > > HTH,
> > > > > Matthias
> > > > >
> > > > > (MyFaces should tell you that, at least it is configurable)
> > > > > (RI is silent there ;))
> > > > >
> > > > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > > > Hello,
> > > > > >
> > > > > > I have got a problem with the tree2 and links.
> > > > > >
> > > > > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > > > > >
> > > > > >
> > > > > > Here is the code:
> > > > > >
> > > > > > tree.jsp
> > > > > >
> > > > > > <f:subview id="mytree">
> > > > > > <h:form id="treeform">
> > > > > >
> > > > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > > > >
> > > > > >                 <f:facet name="root">
> > > > > >             <h:panelGroup id="rootgroup">
> > > > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > > > >             </h:panelGroup>
> > > > > >         </f:facet>
> > > > > >         <f:facet name="firstleaf">
> > > > > >             <h:panelGroup id="firstleafgroup">
> > > > > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > > > > >                             </h:panelGroup>
> > > > > >         </f:facet>
> > > > > >         <f:facet name="secondLeaf" >
> > > > > >             <h:panelGroup id="secondleafgroup">
> > > > > >                 <h:form id="leafform">
> > > > > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > > > > >                         <h:outputText value="showNested"/>
> > > > > >                         <f:param name="docNum" value="#{node.description}"/>
> > > > > >                 </h:commandLink>
> > > > > >                </h:form>
> > > > > >             </h:panelGroup>
> > > > > >         </f:facet>
> > > > > >     </t:tree2>
> > > > > >     </h:form>
> > > > > >
> > > > > >  </f:subview>
> > > > > >
> > > > > >
> > > > > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > > > > >
> > > > > >
> > > > > > TreeBean.java
> > > > > >
> > > > > > public class TreeBean {
> > > > > >
> > > > > >         private TreeModelBase     _treeModel;
> > > > > >         private HtmlTree          _tree;
> > > > > >
> > > > > >         public TreeNode getTreeData()
> > > > > >          {
> > > > > >
> > > > > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > > > > >
> > > > > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > > >
> > > > > >
> > > > > >                 //First Leaf
> > > > > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > > > > >
> > > > > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > > >
> > > > > >                 return treeData;
> > > > > >          }
> > > > > >
> > > > > >
> > > > > >          public void showNested(){
> > > > > >
> > > > > >                  System.out.println("in showNested()");
> > > > > >          }
> > > > > > ...
> > > > > > }
> > > > > >
> > > > > > Thank you for your help.
> > > > > > N.Schweighardt
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matthias Wessendorf
> > > > > http://tinyurl.com/fmywh
> > > > >
> > > > > further stuff:
> > > > > blog: http://jroller.com/page/mwessendorf
> > > > > mail: mwessendorf-at-gmail-dot-com
> > > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > > http://tinyurl.com/fmywh
> > > >
> > > > further stuff:
> > > > blog: http://jroller.com/page/mwessendorf
> > > > mail: mwessendorf-at-gmail-dot-com
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > http://tinyurl.com/fmywh
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

AW: Tree2 - link problem

Posted by "Schweighardt, Nicole" <Ni...@Dresdner-Bank.com>.
HI,

yes, there is a form in the tabbedPane with a link; the same link, that was in the 
tree. And it works!

<t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
			<t:panelTab id="tab1" label="Process">
				<t:div id="treeDiv"
					style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
					//normally here´s the insert tag for the tree.jsp
					
					//This link works! It is in the first tab of the panelTabbedPane	
					<h:form>
					<h:commandLink action="diversification">
							<h:outputText value="Diversification" />
					</h:commandLink>
...

Nicki


-----Ursprüngliche Nachricht-----
Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
Matthias Wessendorf
Gesendet: Donnerstag, 16. November 2006 13:46
An: MyFaces Discussion
Betreff: Re: Tree2 - link problem


On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> Hi,
>
> yes, it works standalone.

ok, that is good.

now let's move to the next step.

can you nest something less complex inside the tabbedPane?
a damn simple form ? just for the case ?



> I hope it is possible to put a tree into the tabbedPane-Tag? That is very important
> for my application.
>
> Thank you.
> Nicki
>
> -----Ursprüngliche Nachricht-----
> Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> Matthias Wessendorf
> Gesendet: Donnerstag, 16. November 2006 13:30
> An: MyFaces Discussion
> Betreff: Re: Tree2 - link problem
>
>
> puh!
>
> that is hard to debug from here.
>
> Can you try to get the tree "standalone" running?
> to avoid *confusion* with JS erros by tabbedPane ?
>
> -M
>
> On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > Hi,
> >
> > yes, there is a JS-Error: "f has no properties". F ist the form:
> > Here is the belonging function:
> >
> > 69 function clear_panelTabbedPane1_3Amytree_3Atreeform() {
> > 70  var f = document.forms['panelTabbedPane1:mytree:treeform'];
> > 71  f.elements['panelTabbedPane1:mytree:treeform:_link_hidden_'].value='';
> > 72  f.target='';
> > 73 }
> >
> > It seems that it is not possible to get the "treeform".
> >
> > It ist here in my code, wrapping the tree.
> > ...
> > <f:subview id="mytree">
> > <h:form id="treeform">
> >
> > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> >
> >                 <f:facet name="root">
> >             <h:panelGroup id="rootgroup">
> >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> >                                 ...
> >
> > But I don´t understand why "f has no properties".
> >
> > Nicki
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > Matthias Wessendorf
> > Gesendet: Donnerstag, 16. November 2006 13:14
> > An: MyFaces Discussion
> > Betreff: Re: Tree2 - link problem
> >
> >
> > do you get js error instead (use firebug for checking that)
> >
> > -M
> >
> > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > Hi Matthias,
> > >
> > > thanks, that´s right, but unfortunately it wasn´t the reason.
> > >
> > > That is the whole jsp, which includes the tree.jsp
> > >
> > > tabbedPane.jsp
> > > <%@ page session="false"
> > > %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> > > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> > > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> > > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
> > >  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> > >
> > >  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > > <head>
> > > <title>Prototype</title>
> > >    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> > > </head>
> > > <body>
> > > <f:view>
> > >         <f:subview id="panelTabbedPane1">
> > >                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> > >                         <t:panelTab id="tab1" label="Process">
> > >                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> > >                                         <f:verbatim>
> > >                                                 <tiles:insert attribute="tree" flush="false" />
> > >                                         </f:verbatim>
> > >
> > >                                         <h:form>
> > >                                                 //This commandLink works!!!
> > >                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
> > >                                                         <h:outputText value="showNested"/>
> > >                                         </h:commandLink>
> > >                                                 <f:verbatim><br></f:verbatim>
> > >                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
> > >                                         </h:commandLink>
> > >                                         </h:form>
> > >                         ...
> > >
> > > Any Idea?
> > > Thank you very much,
> > > Nicki
> > >
> > >
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > Matthias Wessendorf
> > > Gesendet: Donnerstag, 16. November 2006 12:27
> > > An: MyFaces Discussion
> > > Betreff: Re: Tree2 - link problem
> > >
> > >
> > >   <context-param>
> > >                 <description>
> > >                         Validate managed beans, navigation rules and ensure that forms
> > > are not nested.
> > >                 </description>
> > >         <param-name>org.apache.myfaces.VALIDATE</param-name>
> > >         <param-value>true</param-value>
> > >     </context-param>
> > >
> > > On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > > > Nicole,
> > > >
> > > > you are using <form><form/></form>
> > > >
> > > > nested forms are "invalid" html.
> > > >
> > > > since your tree2 is already wrapped by a form, remove the *wrapper*
> > > > from the tree2-link.
> > > >
> > > > HTH,
> > > > Matthias
> > > >
> > > > (MyFaces should tell you that, at least it is configurable)
> > > > (RI is silent there ;))
> > > >
> > > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > > Hello,
> > > > >
> > > > > I have got a problem with the tree2 and links.
> > > > >
> > > > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > > > >
> > > > >
> > > > > Here is the code:
> > > > >
> > > > > tree.jsp
> > > > >
> > > > > <f:subview id="mytree">
> > > > > <h:form id="treeform">
> > > > >
> > > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > > >
> > > > >                 <f:facet name="root">
> > > > >             <h:panelGroup id="rootgroup">
> > > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > > >             </h:panelGroup>
> > > > >         </f:facet>
> > > > >         <f:facet name="firstleaf">
> > > > >             <h:panelGroup id="firstleafgroup">
> > > > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > > > >                             </h:panelGroup>
> > > > >         </f:facet>
> > > > >         <f:facet name="secondLeaf" >
> > > > >             <h:panelGroup id="secondleafgroup">
> > > > >                 <h:form id="leafform">
> > > > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > > > >                         <h:outputText value="showNested"/>
> > > > >                         <f:param name="docNum" value="#{node.description}"/>
> > > > >                 </h:commandLink>
> > > > >                </h:form>
> > > > >             </h:panelGroup>
> > > > >         </f:facet>
> > > > >     </t:tree2>
> > > > >     </h:form>
> > > > >
> > > > >  </f:subview>
> > > > >
> > > > >
> > > > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > > > >
> > > > >
> > > > > TreeBean.java
> > > > >
> > > > > public class TreeBean {
> > > > >
> > > > >         private TreeModelBase     _treeModel;
> > > > >         private HtmlTree          _tree;
> > > > >
> > > > >         public TreeNode getTreeData()
> > > > >          {
> > > > >
> > > > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > > > >
> > > > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > >
> > > > >
> > > > >                 //First Leaf
> > > > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > > > >
> > > > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > >
> > > > >                 return treeData;
> > > > >          }
> > > > >
> > > > >
> > > > >          public void showNested(){
> > > > >
> > > > >                  System.out.println("in showNested()");
> > > > >          }
> > > > > ...
> > > > > }
> > > > >
> > > > > Thank you for your help.
> > > > > N.Schweighardt
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > > http://tinyurl.com/fmywh
> > > >
> > > > further stuff:
> > > > blog: http://jroller.com/page/mwessendorf
> > > > mail: mwessendorf-at-gmail-dot-com
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > http://tinyurl.com/fmywh
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Tree2 - link problem

Posted by Matthias Wessendorf <ma...@apache.org>.
On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> Hi,
>
> yes, it works standalone.

ok, that is good.

now let's move to the next step.

can you nest something less complex inside the tabbedPane?
a damn simple form ? just for the case ?



> I hope it is possible to put a tree into the tabbedPane-Tag? That is very important
> for my application.
>
> Thank you.
> Nicki
>
> -----Ursprüngliche Nachricht-----
> Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> Matthias Wessendorf
> Gesendet: Donnerstag, 16. November 2006 13:30
> An: MyFaces Discussion
> Betreff: Re: Tree2 - link problem
>
>
> puh!
>
> that is hard to debug from here.
>
> Can you try to get the tree "standalone" running?
> to avoid *confusion* with JS erros by tabbedPane ?
>
> -M
>
> On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > Hi,
> >
> > yes, there is a JS-Error: "f has no properties". F ist the form:
> > Here is the belonging function:
> >
> > 69 function clear_panelTabbedPane1_3Amytree_3Atreeform() {
> > 70  var f = document.forms['panelTabbedPane1:mytree:treeform'];
> > 71  f.elements['panelTabbedPane1:mytree:treeform:_link_hidden_'].value='';
> > 72  f.target='';
> > 73 }
> >
> > It seems that it is not possible to get the "treeform".
> >
> > It ist here in my code, wrapping the tree.
> > ...
> > <f:subview id="mytree">
> > <h:form id="treeform">
> >
> > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> >
> >                 <f:facet name="root">
> >             <h:panelGroup id="rootgroup">
> >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> >                                 ...
> >
> > But I don´t understand why "f has no properties".
> >
> > Nicki
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > Matthias Wessendorf
> > Gesendet: Donnerstag, 16. November 2006 13:14
> > An: MyFaces Discussion
> > Betreff: Re: Tree2 - link problem
> >
> >
> > do you get js error instead (use firebug for checking that)
> >
> > -M
> >
> > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > Hi Matthias,
> > >
> > > thanks, that´s right, but unfortunately it wasn´t the reason.
> > >
> > > That is the whole jsp, which includes the tree.jsp
> > >
> > > tabbedPane.jsp
> > > <%@ page session="false"
> > > %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> > > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> > > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> > > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
> > >  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> > >
> > >  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > > <head>
> > > <title>Prototype</title>
> > >    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> > > </head>
> > > <body>
> > > <f:view>
> > >         <f:subview id="panelTabbedPane1">
> > >                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> > >                         <t:panelTab id="tab1" label="Process">
> > >                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> > >                                         <f:verbatim>
> > >                                                 <tiles:insert attribute="tree" flush="false" />
> > >                                         </f:verbatim>
> > >
> > >                                         <h:form>
> > >                                                 //This commandLink works!!!
> > >                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
> > >                                                         <h:outputText value="showNested"/>
> > >                                         </h:commandLink>
> > >                                                 <f:verbatim><br></f:verbatim>
> > >                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
> > >                                         </h:commandLink>
> > >                                         </h:form>
> > >                         ...
> > >
> > > Any Idea?
> > > Thank you very much,
> > > Nicki
> > >
> > >
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > > Matthias Wessendorf
> > > Gesendet: Donnerstag, 16. November 2006 12:27
> > > An: MyFaces Discussion
> > > Betreff: Re: Tree2 - link problem
> > >
> > >
> > >   <context-param>
> > >                 <description>
> > >                         Validate managed beans, navigation rules and ensure that forms
> > > are not nested.
> > >                 </description>
> > >         <param-name>org.apache.myfaces.VALIDATE</param-name>
> > >         <param-value>true</param-value>
> > >     </context-param>
> > >
> > > On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > > > Nicole,
> > > >
> > > > you are using <form><form/></form>
> > > >
> > > > nested forms are "invalid" html.
> > > >
> > > > since your tree2 is already wrapped by a form, remove the *wrapper*
> > > > from the tree2-link.
> > > >
> > > > HTH,
> > > > Matthias
> > > >
> > > > (MyFaces should tell you that, at least it is configurable)
> > > > (RI is silent there ;))
> > > >
> > > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > > Hello,
> > > > >
> > > > > I have got a problem with the tree2 and links.
> > > > >
> > > > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > > > >
> > > > >
> > > > > Here is the code:
> > > > >
> > > > > tree.jsp
> > > > >
> > > > > <f:subview id="mytree">
> > > > > <h:form id="treeform">
> > > > >
> > > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > > >
> > > > >                 <f:facet name="root">
> > > > >             <h:panelGroup id="rootgroup">
> > > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > > >             </h:panelGroup>
> > > > >         </f:facet>
> > > > >         <f:facet name="firstleaf">
> > > > >             <h:panelGroup id="firstleafgroup">
> > > > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > > > >                             </h:panelGroup>
> > > > >         </f:facet>
> > > > >         <f:facet name="secondLeaf" >
> > > > >             <h:panelGroup id="secondleafgroup">
> > > > >                 <h:form id="leafform">
> > > > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > > > >                         <h:outputText value="showNested"/>
> > > > >                         <f:param name="docNum" value="#{node.description}"/>
> > > > >                 </h:commandLink>
> > > > >                </h:form>
> > > > >             </h:panelGroup>
> > > > >         </f:facet>
> > > > >     </t:tree2>
> > > > >     </h:form>
> > > > >
> > > > >  </f:subview>
> > > > >
> > > > >
> > > > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > > > >
> > > > >
> > > > > TreeBean.java
> > > > >
> > > > > public class TreeBean {
> > > > >
> > > > >         private TreeModelBase     _treeModel;
> > > > >         private HtmlTree          _tree;
> > > > >
> > > > >         public TreeNode getTreeData()
> > > > >          {
> > > > >
> > > > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > > > >
> > > > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > >
> > > > >
> > > > >                 //First Leaf
> > > > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > > > >
> > > > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > > > >                 treeData.getChildren().add(firstLeafNode);
> > > > >
> > > > >                 return treeData;
> > > > >          }
> > > > >
> > > > >
> > > > >          public void showNested(){
> > > > >
> > > > >                  System.out.println("in showNested()");
> > > > >          }
> > > > > ...
> > > > > }
> > > > >
> > > > > Thank you for your help.
> > > > > N.Schweighardt
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > > http://tinyurl.com/fmywh
> > > >
> > > > further stuff:
> > > > blog: http://jroller.com/page/mwessendorf
> > > > mail: mwessendorf-at-gmail-dot-com
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > http://tinyurl.com/fmywh
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

AW: Tree2 - link problem

Posted by "Schweighardt, Nicole" <Ni...@Dresdner-Bank.com>.
Hi,

yes, it works standalone. 

I hope it is possible to put a tree into the tabbedPane-Tag? That is very important
for my application. 

Thank you.
Nicki

-----Ursprüngliche Nachricht-----
Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
Matthias Wessendorf
Gesendet: Donnerstag, 16. November 2006 13:30
An: MyFaces Discussion
Betreff: Re: Tree2 - link problem


puh!

that is hard to debug from here.

Can you try to get the tree "standalone" running?
to avoid *confusion* with JS erros by tabbedPane ?

-M

On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> Hi,
>
> yes, there is a JS-Error: "f has no properties". F ist the form:
> Here is the belonging function:
>
> 69 function clear_panelTabbedPane1_3Amytree_3Atreeform() {
> 70  var f = document.forms['panelTabbedPane1:mytree:treeform'];
> 71  f.elements['panelTabbedPane1:mytree:treeform:_link_hidden_'].value='';
> 72  f.target='';
> 73 }
>
> It seems that it is not possible to get the "treeform".
>
> It ist here in my code, wrapping the tree.
> ...
> <f:subview id="mytree">
> <h:form id="treeform">
>
> <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
>
>                 <f:facet name="root">
>             <h:panelGroup id="rootgroup">
>                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
>                                 ...
>
> But I don´t understand why "f has no properties".
>
> Nicki
>
>
> -----Ursprüngliche Nachricht-----
> Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> Matthias Wessendorf
> Gesendet: Donnerstag, 16. November 2006 13:14
> An: MyFaces Discussion
> Betreff: Re: Tree2 - link problem
>
>
> do you get js error instead (use firebug for checking that)
>
> -M
>
> On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > Hi Matthias,
> >
> > thanks, that´s right, but unfortunately it wasn´t the reason.
> >
> > That is the whole jsp, which includes the tree.jsp
> >
> > tabbedPane.jsp
> > <%@ page session="false"
> > %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
> >  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> >
> >  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > <head>
> > <title>Prototype</title>
> >    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> > </head>
> > <body>
> > <f:view>
> >         <f:subview id="panelTabbedPane1">
> >                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> >                         <t:panelTab id="tab1" label="Process">
> >                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> >                                         <f:verbatim>
> >                                                 <tiles:insert attribute="tree" flush="false" />
> >                                         </f:verbatim>
> >
> >                                         <h:form>
> >                                                 //This commandLink works!!!
> >                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
> >                                                         <h:outputText value="showNested"/>
> >                                         </h:commandLink>
> >                                                 <f:verbatim><br></f:verbatim>
> >                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
> >                                         </h:commandLink>
> >                                         </h:form>
> >                         ...
> >
> > Any Idea?
> > Thank you very much,
> > Nicki
> >
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > Matthias Wessendorf
> > Gesendet: Donnerstag, 16. November 2006 12:27
> > An: MyFaces Discussion
> > Betreff: Re: Tree2 - link problem
> >
> >
> >   <context-param>
> >                 <description>
> >                         Validate managed beans, navigation rules and ensure that forms
> > are not nested.
> >                 </description>
> >         <param-name>org.apache.myfaces.VALIDATE</param-name>
> >         <param-value>true</param-value>
> >     </context-param>
> >
> > On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > > Nicole,
> > >
> > > you are using <form><form/></form>
> > >
> > > nested forms are "invalid" html.
> > >
> > > since your tree2 is already wrapped by a form, remove the *wrapper*
> > > from the tree2-link.
> > >
> > > HTH,
> > > Matthias
> > >
> > > (MyFaces should tell you that, at least it is configurable)
> > > (RI is silent there ;))
> > >
> > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > Hello,
> > > >
> > > > I have got a problem with the tree2 and links.
> > > >
> > > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > > >
> > > >
> > > > Here is the code:
> > > >
> > > > tree.jsp
> > > >
> > > > <f:subview id="mytree">
> > > > <h:form id="treeform">
> > > >
> > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > >
> > > >                 <f:facet name="root">
> > > >             <h:panelGroup id="rootgroup">
> > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > >             </h:panelGroup>
> > > >         </f:facet>
> > > >         <f:facet name="firstleaf">
> > > >             <h:panelGroup id="firstleafgroup">
> > > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > > >                             </h:panelGroup>
> > > >         </f:facet>
> > > >         <f:facet name="secondLeaf" >
> > > >             <h:panelGroup id="secondleafgroup">
> > > >                 <h:form id="leafform">
> > > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > > >                         <h:outputText value="showNested"/>
> > > >                         <f:param name="docNum" value="#{node.description}"/>
> > > >                 </h:commandLink>
> > > >                </h:form>
> > > >             </h:panelGroup>
> > > >         </f:facet>
> > > >     </t:tree2>
> > > >     </h:form>
> > > >
> > > >  </f:subview>
> > > >
> > > >
> > > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > > >
> > > >
> > > > TreeBean.java
> > > >
> > > > public class TreeBean {
> > > >
> > > >         private TreeModelBase     _treeModel;
> > > >         private HtmlTree          _tree;
> > > >
> > > >         public TreeNode getTreeData()
> > > >          {
> > > >
> > > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > > >
> > > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > > >                 treeData.getChildren().add(firstLeafNode);
> > > >
> > > >
> > > >                 //First Leaf
> > > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > > >
> > > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > > >                 treeData.getChildren().add(firstLeafNode);
> > > >
> > > >                 return treeData;
> > > >          }
> > > >
> > > >
> > > >          public void showNested(){
> > > >
> > > >                  System.out.println("in showNested()");
> > > >          }
> > > > ...
> > > > }
> > > >
> > > > Thank you for your help.
> > > > N.Schweighardt
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > http://tinyurl.com/fmywh
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Tree2 - link problem

Posted by Matthias Wessendorf <ma...@apache.org>.
puh!

that is hard to debug from here.

Can you try to get the tree "standalone" running?
to avoid *confusion* with JS erros by tabbedPane ?

-M

On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> Hi,
>
> yes, there is a JS-Error: "f has no properties". F ist the form:
> Here is the belonging function:
>
> 69 function clear_panelTabbedPane1_3Amytree_3Atreeform() {
> 70  var f = document.forms['panelTabbedPane1:mytree:treeform'];
> 71  f.elements['panelTabbedPane1:mytree:treeform:_link_hidden_'].value='';
> 72  f.target='';
> 73 }
>
> It seems that it is not possible to get the "treeform".
>
> It ist here in my code, wrapping the tree.
> ...
> <f:subview id="mytree">
> <h:form id="treeform">
>
> <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
>
>                 <f:facet name="root">
>             <h:panelGroup id="rootgroup">
>                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
>                                 ...
>
> But I don´t understand why "f has no properties".
>
> Nicki
>
>
> -----Ursprüngliche Nachricht-----
> Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> Matthias Wessendorf
> Gesendet: Donnerstag, 16. November 2006 13:14
> An: MyFaces Discussion
> Betreff: Re: Tree2 - link problem
>
>
> do you get js error instead (use firebug for checking that)
>
> -M
>
> On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > Hi Matthias,
> >
> > thanks, that´s right, but unfortunately it wasn´t the reason.
> >
> > That is the whole jsp, which includes the tree.jsp
> >
> > tabbedPane.jsp
> > <%@ page session="false"
> > %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> > <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
> >  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
> >
> >  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > <head>
> > <title>Prototype</title>
> >    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> > </head>
> > <body>
> > <f:view>
> >         <f:subview id="panelTabbedPane1">
> >                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
> >                         <t:panelTab id="tab1" label="Process">
> >                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
> >                                         <f:verbatim>
> >                                                 <tiles:insert attribute="tree" flush="false" />
> >                                         </f:verbatim>
> >
> >                                         <h:form>
> >                                                 //This commandLink works!!!
> >                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
> >                                                         <h:outputText value="showNested"/>
> >                                         </h:commandLink>
> >                                                 <f:verbatim><br></f:verbatim>
> >                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
> >                                         </h:commandLink>
> >                                         </h:form>
> >                         ...
> >
> > Any Idea?
> > Thank you very much,
> > Nicki
> >
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> > Matthias Wessendorf
> > Gesendet: Donnerstag, 16. November 2006 12:27
> > An: MyFaces Discussion
> > Betreff: Re: Tree2 - link problem
> >
> >
> >   <context-param>
> >                 <description>
> >                         Validate managed beans, navigation rules and ensure that forms
> > are not nested.
> >                 </description>
> >         <param-name>org.apache.myfaces.VALIDATE</param-name>
> >         <param-value>true</param-value>
> >     </context-param>
> >
> > On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > > Nicole,
> > >
> > > you are using <form><form/></form>
> > >
> > > nested forms are "invalid" html.
> > >
> > > since your tree2 is already wrapped by a form, remove the *wrapper*
> > > from the tree2-link.
> > >
> > > HTH,
> > > Matthias
> > >
> > > (MyFaces should tell you that, at least it is configurable)
> > > (RI is silent there ;))
> > >
> > > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > > Hello,
> > > >
> > > > I have got a problem with the tree2 and links.
> > > >
> > > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > > >
> > > >
> > > > Here is the code:
> > > >
> > > > tree.jsp
> > > >
> > > > <f:subview id="mytree">
> > > > <h:form id="treeform">
> > > >
> > > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > > >
> > > >                 <f:facet name="root">
> > > >             <h:panelGroup id="rootgroup">
> > > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > > >             </h:panelGroup>
> > > >         </f:facet>
> > > >         <f:facet name="firstleaf">
> > > >             <h:panelGroup id="firstleafgroup">
> > > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > > >                             </h:panelGroup>
> > > >         </f:facet>
> > > >         <f:facet name="secondLeaf" >
> > > >             <h:panelGroup id="secondleafgroup">
> > > >                 <h:form id="leafform">
> > > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > > >                         <h:outputText value="showNested"/>
> > > >                         <f:param name="docNum" value="#{node.description}"/>
> > > >                 </h:commandLink>
> > > >                </h:form>
> > > >             </h:panelGroup>
> > > >         </f:facet>
> > > >     </t:tree2>
> > > >     </h:form>
> > > >
> > > >  </f:subview>
> > > >
> > > >
> > > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > > >
> > > >
> > > > TreeBean.java
> > > >
> > > > public class TreeBean {
> > > >
> > > >         private TreeModelBase     _treeModel;
> > > >         private HtmlTree          _tree;
> > > >
> > > >         public TreeNode getTreeData()
> > > >          {
> > > >
> > > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > > >
> > > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > > >                 treeData.getChildren().add(firstLeafNode);
> > > >
> > > >
> > > >                 //First Leaf
> > > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > > >
> > > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > > >                 treeData.getChildren().add(firstLeafNode);
> > > >
> > > >                 return treeData;
> > > >          }
> > > >
> > > >
> > > >          public void showNested(){
> > > >
> > > >                  System.out.println("in showNested()");
> > > >          }
> > > > ...
> > > > }
> > > >
> > > > Thank you for your help.
> > > > N.Schweighardt
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > http://tinyurl.com/fmywh
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

AW: Tree2 - link problem

Posted by "Schweighardt, Nicole" <Ni...@Dresdner-Bank.com>.
Hi,

yes, there is a JS-Error: "f has no properties". F ist the form:
Here is the belonging function:

69 function clear_panelTabbedPane1_3Amytree_3Atreeform() {
70  var f = document.forms['panelTabbedPane1:mytree:treeform'];
71  f.elements['panelTabbedPane1:mytree:treeform:_link_hidden_'].value='';
72  f.target='';
73 }

It seems that it is not possible to get the "treeform".

It ist here in my code, wrapping the tree.
...
<f:subview id="mytree">
<h:form id="treeform">

<t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
		
		<f:facet name="root">
            <h:panelGroup id="rootgroup">
				<h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
	  			...

But I don´t understand why "f has no properties".

Nicki


-----Ursprüngliche Nachricht-----
Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
Matthias Wessendorf
Gesendet: Donnerstag, 16. November 2006 13:14
An: MyFaces Discussion
Betreff: Re: Tree2 - link problem


do you get js error instead (use firebug for checking that)

-M

On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> Hi Matthias,
>
> thanks, that´s right, but unfortunately it wasn´t the reason.
>
> That is the whole jsp, which includes the tree.jsp
>
> tabbedPane.jsp
> <%@ page session="false"
> %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
>  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
>
>  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <head>
> <title>Prototype</title>
>    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> </head>
> <body>
> <f:view>
>         <f:subview id="panelTabbedPane1">
>                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
>                         <t:panelTab id="tab1" label="Process">
>                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
>                                         <f:verbatim>
>                                                 <tiles:insert attribute="tree" flush="false" />
>                                         </f:verbatim>
>
>                                         <h:form>
>                                                 //This commandLink works!!!
>                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
>                                                         <h:outputText value="showNested"/>
>                                         </h:commandLink>
>                                                 <f:verbatim><br></f:verbatim>
>                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
>                                         </h:commandLink>
>                                         </h:form>
>                         ...
>
> Any Idea?
> Thank you very much,
> Nicki
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> Matthias Wessendorf
> Gesendet: Donnerstag, 16. November 2006 12:27
> An: MyFaces Discussion
> Betreff: Re: Tree2 - link problem
>
>
>   <context-param>
>                 <description>
>                         Validate managed beans, navigation rules and ensure that forms
> are not nested.
>                 </description>
>         <param-name>org.apache.myfaces.VALIDATE</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
> On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > Nicole,
> >
> > you are using <form><form/></form>
> >
> > nested forms are "invalid" html.
> >
> > since your tree2 is already wrapped by a form, remove the *wrapper*
> > from the tree2-link.
> >
> > HTH,
> > Matthias
> >
> > (MyFaces should tell you that, at least it is configurable)
> > (RI is silent there ;))
> >
> > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > Hello,
> > >
> > > I have got a problem with the tree2 and links.
> > >
> > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > >
> > >
> > > Here is the code:
> > >
> > > tree.jsp
> > >
> > > <f:subview id="mytree">
> > > <h:form id="treeform">
> > >
> > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > >
> > >                 <f:facet name="root">
> > >             <h:panelGroup id="rootgroup">
> > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > >             </h:panelGroup>
> > >         </f:facet>
> > >         <f:facet name="firstleaf">
> > >             <h:panelGroup id="firstleafgroup">
> > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > >                             </h:panelGroup>
> > >         </f:facet>
> > >         <f:facet name="secondLeaf" >
> > >             <h:panelGroup id="secondleafgroup">
> > >                 <h:form id="leafform">
> > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > >                         <h:outputText value="showNested"/>
> > >                         <f:param name="docNum" value="#{node.description}"/>
> > >                 </h:commandLink>
> > >                </h:form>
> > >             </h:panelGroup>
> > >         </f:facet>
> > >     </t:tree2>
> > >     </h:form>
> > >
> > >  </f:subview>
> > >
> > >
> > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > >
> > >
> > > TreeBean.java
> > >
> > > public class TreeBean {
> > >
> > >         private TreeModelBase     _treeModel;
> > >         private HtmlTree          _tree;
> > >
> > >         public TreeNode getTreeData()
> > >          {
> > >
> > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > >
> > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > >                 treeData.getChildren().add(firstLeafNode);
> > >
> > >
> > >                 //First Leaf
> > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > >
> > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > >                 treeData.getChildren().add(firstLeafNode);
> > >
> > >                 return treeData;
> > >          }
> > >
> > >
> > >          public void showNested(){
> > >
> > >                  System.out.println("in showNested()");
> > >          }
> > > ...
> > > }
> > >
> > > Thank you for your help.
> > > N.Schweighardt
> > >
> > >
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Tree2 - link problem

Posted by Matthias Wessendorf <ma...@apache.org>.
do you get js error instead (use firebug for checking that)

-M

On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> Hi Matthias,
>
> thanks, that´s right, but unfortunately it wasn´t the reason.
>
> That is the whole jsp, which includes the tree.jsp
>
> tabbedPane.jsp
> <%@ page session="false"
> %><%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
>  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
>
>  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <head>
> <title>Prototype</title>
>    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
> </head>
> <body>
> <f:view>
>         <f:subview id="panelTabbedPane1">
>                 <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
>                         <t:panelTab id="tab1" label="Process">
>                                 <t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
>                                         <f:verbatim>
>                                                 <tiles:insert attribute="tree" flush="false" />
>                                         </f:verbatim>
>
>                                         <h:form>
>                                                 //This commandLink works!!!
>                                                  <h:commandLink action="#{treeBean.showNested}" id="testlink">
>                                                         <h:outputText value="showNested"/>
>                                         </h:commandLink>
>                                                 <f:verbatim><br></f:verbatim>
>                                                 <h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
>                                         </h:commandLink>
>                                         </h:form>
>                         ...
>
> Any Idea?
> Thank you very much,
> Nicki
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
> Matthias Wessendorf
> Gesendet: Donnerstag, 16. November 2006 12:27
> An: MyFaces Discussion
> Betreff: Re: Tree2 - link problem
>
>
>   <context-param>
>                 <description>
>                         Validate managed beans, navigation rules and ensure that forms
> are not nested.
>                 </description>
>         <param-name>org.apache.myfaces.VALIDATE</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
> On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > Nicole,
> >
> > you are using <form><form/></form>
> >
> > nested forms are "invalid" html.
> >
> > since your tree2 is already wrapped by a form, remove the *wrapper*
> > from the tree2-link.
> >
> > HTH,
> > Matthias
> >
> > (MyFaces should tell you that, at least it is configurable)
> > (RI is silent there ;))
> >
> > On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > > Hello,
> > >
> > > I have got a problem with the tree2 and links.
> > >
> > > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> > >
> > >
> > > Here is the code:
> > >
> > > tree.jsp
> > >
> > > <f:subview id="mytree">
> > > <h:form id="treeform">
> > >
> > > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> > >
> > >                 <f:facet name="root">
> > >             <h:panelGroup id="rootgroup">
> > >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> > >             </h:panelGroup>
> > >         </f:facet>
> > >         <f:facet name="firstleaf">
> > >             <h:panelGroup id="firstleafgroup">
> > >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> > >                             </h:panelGroup>
> > >         </f:facet>
> > >         <f:facet name="secondLeaf" >
> > >             <h:panelGroup id="secondleafgroup">
> > >                 <h:form id="leafform">
> > >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> > >                         <h:outputText value="showNested"/>
> > >                         <f:param name="docNum" value="#{node.description}"/>
> > >                 </h:commandLink>
> > >                </h:form>
> > >             </h:panelGroup>
> > >         </f:facet>
> > >     </t:tree2>
> > >     </h:form>
> > >
> > >  </f:subview>
> > >
> > >
> > > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> > >
> > >
> > > TreeBean.java
> > >
> > > public class TreeBean {
> > >
> > >         private TreeModelBase     _treeModel;
> > >         private HtmlTree          _tree;
> > >
> > >         public TreeNode getTreeData()
> > >          {
> > >
> > >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> > >
> > >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> > >                 treeData.getChildren().add(firstLeafNode);
> > >
> > >
> > >                 //First Leaf
> > >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> > >
> > >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> > >                 treeData.getChildren().add(firstLeafNode);
> > >
> > >                 return treeData;
> > >          }
> > >
> > >
> > >          public void showNested(){
> > >
> > >                  System.out.println("in showNested()");
> > >          }
> > > ...
> > > }
> > >
> > > Thank you for your help.
> > > N.Schweighardt
> > >
> > >
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

AW: Tree2 - link problem

Posted by "Schweighardt, Nicole" <Ni...@Dresdner-Bank.com>.
Hi Matthias,

thanks, that´s right, but unfortunately it wasn´t the reason.

That is the whole jsp, which includes the tree.jsp

tabbedPane.jsp
<%@ page session="false"
%><%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
 <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>Prototype</title>
   <link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/basic.css" />
</head>
<body>
<f:view>
	<f:subview id="panelTabbedPane1">
		<t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
			<t:panelTab id="tab1" label="Process">
				<t:div id="treeDiv" style="color:red;width:250px;height:400px;background-color : #666699;float:left;">
					<f:verbatim>
						<tiles:insert attribute="tree" flush="false" />
					</f:verbatim>

					<h:form>
						//This commandLink works!!!
				  		 <h:commandLink action="#{treeBean.showNested}" id="testlink">
                					<h:outputText value="showNested"/>
               			 	</h:commandLink>
						<f:verbatim><br></f:verbatim>
						<h:commandLink value="nested Tiles" action="nav_page4" id="_9" >
            	        		</h:commandLink>
					</h:form>
			...

Any Idea?
Thank you very much,
Nicki



-----Ursprüngliche Nachricht-----
Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com]Im Auftrag von
Matthias Wessendorf
Gesendet: Donnerstag, 16. November 2006 12:27
An: MyFaces Discussion
Betreff: Re: Tree2 - link problem


  <context-param>
  		<description>
  			Validate managed beans, navigation rules and ensure that forms
are not nested.
  		</description>
       	<param-name>org.apache.myfaces.VALIDATE</param-name>
       	<param-value>true</param-value>
    </context-param>

On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> Nicole,
>
> you are using <form><form/></form>
>
> nested forms are "invalid" html.
>
> since your tree2 is already wrapped by a form, remove the *wrapper*
> from the tree2-link.
>
> HTH,
> Matthias
>
> (MyFaces should tell you that, at least it is configurable)
> (RI is silent there ;))
>
> On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > Hello,
> >
> > I have got a problem with the tree2 and links.
> >
> > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> >
> >
> > Here is the code:
> >
> > tree.jsp
> >
> > <f:subview id="mytree">
> > <h:form id="treeform">
> >
> > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> >
> >                 <f:facet name="root">
> >             <h:panelGroup id="rootgroup">
> >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> >             </h:panelGroup>
> >         </f:facet>
> >         <f:facet name="firstleaf">
> >             <h:panelGroup id="firstleafgroup">
> >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> >                             </h:panelGroup>
> >         </f:facet>
> >         <f:facet name="secondLeaf" >
> >             <h:panelGroup id="secondleafgroup">
> >                 <h:form id="leafform">
> >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> >                         <h:outputText value="showNested"/>
> >                         <f:param name="docNum" value="#{node.description}"/>
> >                 </h:commandLink>
> >                </h:form>
> >             </h:panelGroup>
> >         </f:facet>
> >     </t:tree2>
> >     </h:form>
> >
> >  </f:subview>
> >
> >
> > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> >
> >
> > TreeBean.java
> >
> > public class TreeBean {
> >
> >         private TreeModelBase     _treeModel;
> >         private HtmlTree          _tree;
> >
> >         public TreeNode getTreeData()
> >          {
> >
> >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> >
> >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> >                 treeData.getChildren().add(firstLeafNode);
> >
> >
> >                 //First Leaf
> >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> >
> >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> >                 treeData.getChildren().add(firstLeafNode);
> >
> >                 return treeData;
> >          }
> >
> >
> >          public void showNested(){
> >
> >                  System.out.println("in showNested()");
> >          }
> > ...
> > }
> >
> > Thank you for your help.
> > N.Schweighardt
> >
> >
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Tree2 - link problem

Posted by Matthias Wessendorf <ma...@apache.org>.
  <context-param>
  		<description>
  			Validate managed beans, navigation rules and ensure that forms
are not nested.
  		</description>
       	<param-name>org.apache.myfaces.VALIDATE</param-name>
       	<param-value>true</param-value>
    </context-param>

On 11/16/06, Matthias Wessendorf <ma...@apache.org> wrote:
> Nicole,
>
> you are using <form><form/></form>
>
> nested forms are "invalid" html.
>
> since your tree2 is already wrapped by a form, remove the *wrapper*
> from the tree2-link.
>
> HTH,
> Matthias
>
> (MyFaces should tell you that, at least it is configurable)
> (RI is silent there ;))
>
> On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> > Hello,
> >
> > I have got a problem with the tree2 and links.
> >
> > I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
> >
> >
> > Here is the code:
> >
> > tree.jsp
> >
> > <f:subview id="mytree">
> > <h:form id="treeform">
> >
> > <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
> >
> >                 <f:facet name="root">
> >             <h:panelGroup id="rootgroup">
> >                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
> >             </h:panelGroup>
> >         </f:facet>
> >         <f:facet name="firstleaf">
> >             <h:panelGroup id="firstleafgroup">
> >                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
> >                             </h:panelGroup>
> >         </f:facet>
> >         <f:facet name="secondLeaf" >
> >             <h:panelGroup id="secondleafgroup">
> >                 <h:form id="leafform">
> >                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
> >                         <h:outputText value="showNested"/>
> >                         <f:param name="docNum" value="#{node.description}"/>
> >                 </h:commandLink>
> >                </h:form>
> >             </h:panelGroup>
> >         </f:facet>
> >     </t:tree2>
> >     </h:form>
> >
> >  </f:subview>
> >
> >
> > If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
> >
> >
> > TreeBean.java
> >
> > public class TreeBean {
> >
> >         private TreeModelBase     _treeModel;
> >         private HtmlTree          _tree;
> >
> >         public TreeNode getTreeData()
> >          {
> >
> >                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
> >
> >                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
> >                 treeData.getChildren().add(firstLeafNode);
> >
> >
> >                 //First Leaf
> >                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
> >
> >                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
> >                 treeData.getChildren().add(firstLeafNode);
> >
> >                 return treeData;
> >          }
> >
> >
> >          public void showNested(){
> >
> >                  System.out.println("in showNested()");
> >          }
> > ...
> > }
> >
> > Thank you for your help.
> > N.Schweighardt
> >
> >
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Tree2 - link problem

Posted by Matthias Wessendorf <ma...@apache.org>.
Nicole,

you are using <form><form/></form>

nested forms are "invalid" html.

since your tree2 is already wrapped by a form, remove the *wrapper*
from the tree2-link.

HTH,
Matthias

(MyFaces should tell you that, at least it is configurable)
(RI is silent there ;))

On 11/16/06, Schweighardt, Nicole <Ni...@dresdner-bank.com> wrote:
> Hello,
>
> I have got a problem with the tree2 and links.
>
> I have a tree and some nodes are links. If  someone clicks on the link I want to call a method in bean. But it does not work.
>
>
> Here is the code:
>
> tree.jsp
>
> <f:subview id="mytree">
> <h:form id="treeform">
>
> <t:tree2 id="tree" value="#{treeBean.treeData}" var="node" varNodeToggler="t">
>
>                 <f:facet name="root">
>             <h:panelGroup id="rootgroup">
>                                 <h:outputText value="#{node.description}" styleClass="nodeFolder" title="#{node.description}"/>
>             </h:panelGroup>
>         </f:facet>
>         <f:facet name="firstleaf">
>             <h:panelGroup id="firstleafgroup">
>                              <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
>                             </h:panelGroup>
>         </f:facet>
>         <f:facet name="secondLeaf" >
>             <h:panelGroup id="secondleafgroup">
>                 <h:form id="leafform">
>                 <h:commandLink id="Link" immediate="true" action="#{treeBean.showNested}" title="#{node.description}" actionListener="#{t.setNodeSelected}">
>                         <h:outputText value="showNested"/>
>                         <f:param name="docNum" value="#{node.description}"/>
>                 </h:commandLink>
>                </h:form>
>             </h:panelGroup>
>         </f:facet>
>     </t:tree2>
>     </h:form>
>
>  </f:subview>
>
>
> If I use the same link with action="#{treeBean.showNested}"  outside the tree, it works!!
>
>
> TreeBean.java
>
> public class TreeBean {
>
>         private TreeModelBase     _treeModel;
>         private HtmlTree          _tree;
>
>         public TreeNode getTreeData()
>          {
>
>                 TreeNode treeData = new TreeNodeBase("root", "Process", false);
>
>                 TreeNodeBase firstLeafNode = new TreeNodeBase("firstleaf", "Job Overview", false);
>                 treeData.getChildren().add(firstLeafNode);
>
>
>                 //First Leaf
>                 firstLeafNode = new TreeNodeBase("firstleaf", "Internal Model", false);
>
>                 firstLeafNode.getChildren().add(new TreeNodeBase("secondLeaf", "erstens","1", true));
>                 treeData.getChildren().add(firstLeafNode);
>
>                 return treeData;
>          }
>
>
>          public void showNested(){
>
>                  System.out.println("in showNested()");
>          }
> ...
> }
>
> Thank you for your help.
> N.Schweighardt
>
>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

help : url problem

Posted by Mr Arvind Pandey <ar...@yahoo.co.in>.
Hi all!

   I m using tiles with my application. everything is
fine but url of the browser always shows the previous
url. I have used meta tag with http-equi attrbute to
refresh the current page after a time interval. 
   But problem is that the url of browser contains the
url of previously accessed page and hence it refreshes
the previous page when the time interval is over. 

   Any help pls....
regards...
Arvind 



		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/