myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathias Werlitz (JIRA)" <myfaces-...@incubator.apache.org>
Subject [jira] Commented: (MYFACES-564) tree2 node toggle is alway immediate if server side toggle is used.
Date Mon, 26 Sep 2005 14:49:51 GMT
    [ http://issues.apache.org/jira/browse/MYFACES-564?page=comments#action_12330473 ] 

Mathias Werlitz commented on MYFACES-564:
-----------------------------------------

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@page
	import="javax.faces.component.EditableValueHolder,javax.faces.event.ActionEvent,org.apache.myfaces.custom.tree2.*"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
<%!

	public TreeNode getTreeData() {
		TreeNode treeData = new TreeNodeBase("node", "Inbox", false);

		TreeNodeBase personNode = new TreeNodeBase("node", "Frank Foo", false);
		personNode.getChildren().add(
				new TreeNodeBase("node", "Requires Foo", false));
		TreeNodeBase folderNode = new TreeNodeBase("node",
				"Requires Foo Reviewer", false);
		folderNode.getChildren().add(new TreeNodeBase("node", "X050001", true));
		folderNode.getChildren().add(new TreeNodeBase("node", "X050002", true));
		folderNode.getChildren().add(new TreeNodeBase("node", "X050003", true));
		personNode.getChildren().add(folderNode);
		personNode.getChildren().add(
				new TreeNodeBase("node", "Requires Foo Recommendation", false));
		folderNode = new TreeNodeBase("node", "Requires Foo Approval", false);
		folderNode.getChildren().add(new TreeNodeBase("node", "J050001", true));
		folderNode.getChildren().add(new TreeNodeBase("node", "J050002", true));
		folderNode.getChildren().add(new TreeNodeBase("node", "J050003", true));
		folderNode.getChildren().add(new TreeNodeBase("node", "E050011", true));
		folderNode.getChildren().add(new TreeNodeBase("node", "R050002", true));
		folderNode.getChildren().add(new TreeNodeBase("node", "C050003", true));
		personNode.getChildren().add(folderNode);

		treeData.getChildren().add(personNode);

		return treeData;
	}

	// is not called
	public void loadNode(ActionEvent e) {
		System.out.println("ActionListener!");
		
		// do something with the param
	}
	
	// is not called
	public String navigate() {
		String out = "foo";
		System.out.println("Action! " + out);
		return out; 
	}

%>
<%

// put this pseudoBean into session scope
request.getSession().setAttribute("pseudoBean", this);

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test</title>
</head>
<body>
<f:view>
	<h:form>
		<x:tree2 value="#{pseudoBean.treeData}" id="classTree" var="node"
			varNodeToggler="t" showRootNode="false" clientSideToggle="false">

			<f:facet name="node">
				<h:commandLink actionListener="#{pseudoBean.loadNode}"
					action="#{pseudoBean.navigate}" target="main">
					<f:param name="data" value="#{node}" />
					<h:outputText value="bar" />
				</h:commandLink>
			</f:facet>

		</x:tree2>
	</h:form>
</f:view>
</body>
</html>


> tree2 node toggle is alway immediate if server side toggle is used.
> -------------------------------------------------------------------
>
>          Key: MYFACES-564
>          URL: http://issues.apache.org/jira/browse/MYFACES-564
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Reporter: Mathias Broekelmann
>     Assignee: Mathias Broekelmann

>
> if using an input component in a node facet, the processDecode, processValidation, processUpdate
methods of nested UIInput component gets called even if the parent node wasn´t expanded.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message