Hi All,
Write some html page to call action for tree - home.html
One moment please.
Include Struts and Extended dojo tag libraries in your web-inf/lib folder
Below is the JSP page that will execute upon success of
treesupport.action, Named that as tree2.jsp
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
Tree
dojo.event.topic.subscribe("nodeSelected", function(source) {
var selectedNode = source.node;
alert("You selected node " + selectedNode.title);
});
In Struts.xm, call the treesupport action on success return tree2.jsp
http://struts.apache.org/dtds/struts-2.0.dtd";>
/paytools2/tree2.jsp
Write a Class with TreeSupport.java and Node.java - In Node.java. include
your business logic what values you want to populate in the tree. To make
this work, you have to create a project as Web2.0 and add struts2 and
dojo-tags to the library as well as dojo tool kit.
Hope this solves in creating a dynamic tree.
Thanks & Regards
Bala T Ramanadham
NOTICE TO RECIPIENT: If you are not the intended recipient of this
e-mail, you are prohibited from sharing, copying, or otherwise using or
disclosing its contents. If you have received this e-mail in error,
please notify the sender immediately by reply e-mail and permanently
delete this e-mail and any attachments without reading, forwarding or
saving them. Thank you.
Thanks & Regards
Bala T Ramanadham
MyHR - TIME
Parsons West Annex, 7th Floor
Office: 626-381-2434
NOTICE TO RECIPIENT: If you are not the intended recipient of this
e-mail, you are prohibited from sharing, copying, or otherwise using or
disclosing its contents. If you have received this e-mail in error,
please notify the sender immediately by reply e-mail and permanently
delete this e-mail and any attachments without reading, forwarding or
saving them. Thank you.
- Forwarded by Bala T Ramanadham/CA/KAIPERM on 06/19/2009 07:39 AM
-
Bala T Ramanadham/CA/kaip...@kaiperm
06/11/2009 05:27 PM
Please respond to
"Struts Users Mailing List"
To
user@struts.apache.org
cc
Subject
Struts2 dynamic tree error
Using the below code to create a tree reading DB.
"customers"is an Array List and "customer"is an object.
Below is the error. Please help
6/11/09 17:17:01:000 PDT] 0084 runtime E
Expression stack.findValue(parameters.nodeTitleProperty) is undefined on
line 23, column 48 in template/ajax/treenode-include.ftl.
The problematic instruction:
--
==> ${stack.findValue(parameters.nodeTitleProperty)} [on line 23, column
46 in template/ajax/treenode-include.ftl]
in include "/${parameters.templateDir}/ajax/treenode-include.ftl" [on
line 124, column 5 in template/ajax/tree.ftl]
--
Java backtrace for programmers:
--
freemarker.core.InvalidReferenceException: Expression
stack.findValue(parameters.nodeTitleProperty) is undefined on line 23,
column 48 in template/ajax/treenode-include.ftl.
Thanks & Regards
Bala T Ramanadham
NOTICE TO RECIPIENT: If you are not the intended recipient of this
e-mail, you are prohibited from sharing, copying, or otherwise using or
disclosing its contents. If you have received this e-mail in error,
please notify the sender immediately by reply e-mail and permanently
delete this e-mail and any attachments without reading, forwarding or
saving them. Thank you.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org