You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ba...@kp.org on 2009/06/11 02:11:24 UTC

Struts 2 - Creating a dynamic tree

Hi All,

I am new to Struts and we are working on an application where we have to 
create a dynamic tree. In /struts-dojo-tags, there is a tree and treenode 
tags which are available to use. I have included 
struts2-dojo-plugin-2.1.6.jar in web-inf/lib folder. However, when I run 
the application, I am getting "dojo" is not identified. Is there anything 
I am missing in the configuration?  Can anybody help me with this?



Thanks
Bala Tilak.





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.

Re: Struts 2 - Creating a dynamic tree

Posted by Ba...@kp.org.
Hi Dave/Wes,

Yes, I am using <sx:head> tag. Below is the sample code.

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %> 
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<sx:head parseContent="false" />
<script type="text/javascript" src="dojo/dojo/dojo.js"
        djConfig="isDebug: false, parseOnLoad: false"></script>
<script type="text/javascript" >
dojo.require("dojo.widget.*");
dojo.require("dojo.dojo.parser");
dojo.require("dojo.dijit.Tree");
 
</script>

<style type="text/css">
@import "dojo/dojo/resources/dojo.css";
@import "dojo/dijit/themes/tundra/tundra.css";
@import "dojo/dijit/themes/dijit.css";
</style>
<title>index</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body class="tundra">
<a href="<s:url action="contract"/>">contract</a>
<sx:tree id="Contract" label="Contract" >
          <sx:treenode  id="Article0" label="<b>Article0</b>" />
              <sx:treenode  id="articles" label="Articles">
           <sx:treenode  id="section" label="Section" />
           <sx:treenode  id="paragaraph" label="Paragraph" />
          </sx:treenode>
      <sx:treenode  id="Article1" label="<b>Article1</b>" />

</sx:tree>

</body>
</html>



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.




Dave Newton <ne...@yahoo.com> 
06/10/2009 05:17 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>


To
Struts Users Mailing List <us...@struts.apache.org>
cc

Subject
Re: Struts 2 - Creating a dynamic tree






Bala.T.Ramanadham@kp.org wrote:
> I am new to Struts and we are working on an application where we have to 

> create a dynamic tree. In /struts-dojo-tags, there is a tree and 
treenode 
> tags which are available to use. I have included 
> struts2-dojo-plugin-2.1.6.jar in web-inf/lib folder. However, when I run 

> the application, I am getting "dojo" is not identified. Is there 
anything 
> I am missing in the configuration?  Can anybody help me with this?

Did you use the <sx:head/> tag?

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



Re: Struts 2 - Creating a dynamic tree

Posted by Dave Newton <ne...@yahoo.com>.
Bala.T.Ramanadham@kp.org wrote:
> I am new to Struts and we are working on an application where we have to 
> create a dynamic tree. In /struts-dojo-tags, there is a tree and treenode 
> tags which are available to use. I have included 
> struts2-dojo-plugin-2.1.6.jar in web-inf/lib folder. However, when I run 
> the application, I am getting "dojo" is not identified. Is there anything 
> I am missing in the configuration?  Can anybody help me with this?

Did you use the <sx:head/> tag?

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 - Creating a dynamic tree

Posted by Wes Wannemacher <we...@wantii.com>.
On Wednesday 10 June 2009 08:11:24 pm Bala.T.Ramanadham@kp.org wrote:
> Hi All,
>
> I am new to Struts and we are working on an application where we have to
> create a dynamic tree. In /struts-dojo-tags, there is a tree and treenode
> tags which are available to use. I have included
> struts2-dojo-plugin-2.1.6.jar in web-inf/lib folder. However, when I run
> the application, I am getting "dojo" is not identified. Is there anything
> I am missing in the configuration?  Can anybody help me with this?
>

Do you have the sx:head tag in the <head> section of your JSP?

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org