advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

TreeviewServlet




Configuration of Treeview Servlet File

There are two files you need to configure:

Configuring the treeview.properties

Configuration of the file connection

The file connection property defines the url to your nodes.txt file which stores the tree information.
The nodes.txt can be stored everywhere on the net. It just has to be accessible via http.

# ------------------------------------------------------------
# Your file connection to the tree data
#

file.InputFileURL=http://www.yourdomain.com/tree/nodes.txt

# ------------------------------------------------------------

Configuration of the linking

The servlet needs to know the how it can make requests to itself. You define the URL to
the Treeview Servlet by defining the
link.node.UrlLeftStart property.

You can also use a jsp file as the standard linkling file. The file can then include the TreeView
Servlet. Just have a look at our online examples.

# ------------------------------------------------------------
# Linking option
#

link.node.UrlLeftStart = <a href='STreeViewServlet20?NodeId=
link.node.UrlLeftEnd = '>
link.node.UrlEnd = </a>

# ------------------------------------------------------------

Configuration of the GUI

The response HTML code of the treeview servlet can be configured within the
gui properties section of the treeview.properties file.

There's on important property in this section called "gui.node.PicPathStart". With this
property you can define the location of your tree icons:

gui.node.PicPathStart = <img src='http://www.yourdomain.com/images/icons/

# ------------------------------------------------------------
# GUI of the TreeView
#
gui.html.Head = <html><head><title>TreeView Servlet</title>
	</head><body bgcolor=white link=black vlink=black alink=black>
	<br><font face='Verdana, Arial, arial' size=2>
	<b>TreeView Servlet Demo</b></font><br><br>
gui.html.Style = <STYLE TYPE='text/css'> a:hover {color: rgb(255,33,33);
	text-decoration: underline;} td {font-size: 10px;
	font-family: Verdana, Arial,Arial; } </style>
gui.html.Bottom = </body></html>
gui.html.Font = <font face='Verdana, Arial, Arial' size=-2>

gui.node.Table = <table cellspacing=0 cellpadding=0 border=0>
gui.node.Table_ = </table>
gui.node.TR = <tr>
gui.node.TR_ = </tr>
gui.node.TD = <td>
gui.node.TD_ = </td>

gui.node.linked.TD = <td bgcolor=darkblue>
gui.node.linked.Font = <font color=white><b>

gui.node.PicPathStart = <img src='http://www.www.yourdomain.com/images/nav_icons/
gui.node.PicPathEnd = ' border=0 width=16 height=16>

# ------------------------------------------------------------

Back to top



Configuring the nodes.txt

Please first have a look at our demonstration file:

/***********************************************************
1,0,1,1,1,Open Folder,-

12,1,2,0,1,Closed child Folder,-
121,12,3,0,0,child,-
122,12,3,0,0,child,-
123,12,3,0,0,child,-

13,1,2,0,0,child,-
14,1,2,0,0,child,-
15,1,2,0,0,special icon,net.gif

16,0,1,0,1,Search Engines,-
161,16,2,0,0,Yahoo,-,http://www.yahoo.com,main
162,16,2,0,0,Metacrawler,-,http://www.metacrawler.com,main
163,16,2,0,0,Bluewindow,-,http://www.sear.ch,main

17,0,1,0,0,Contact,mail.gif,mailto:treeview@swissource.ch,main

/*******************************************************

Each line defines a one node. A node is structured like this:

Id, ParentId, LevelNr, IsOpen, IsFolder, Text, additionalPicture, linkURL, targetFrame

Id: Integer The identification number of the node. This number has to be a unique number.
ParentId: Integer If the node is a childnode you have to define the parents id. Type here 0 if its a root node.
LevelNr: Integer The number of the level. The tree root starts at level 1. The deeper a node is nested the higher is the levelNr.
IsOpen: Boolean (1/0) 1 = Folder is open, 0 = Folder is closed
IsFolder: Boolean (1/0) 1 = Node is a folder and can have childs, 0 = Node isn't a folder
Text: String The nodes name which will be displayed.
additionalPicture: String You can define a separate picture for each node. The pictures have to be stored in the gui.node.PicPathStart path.

the following parameters only need to be defined when you set the link.linkingOption to 1

linkURL: String The URL which the servlet will link to when an user clicks the node.
targetFrame: String The target frame in which the content of the URL will appear. It has to be a valid frame name.

Important:

You have to define the whole parameter string for each node. If you don't know a parameter or you want to leave it out then put a "-" on it's place (Not working for Id, Parentid, LevelNr, IsOpen, IsFolder).

Linking of a node:

When you define a link for a node the link only gets active when the node gets clicked. The servlet returns a javascript piece of code which proceeds the linking. If the defined target is not valid then the javascript will fire an error message.

 

Back to top




Back to the TreeviewServlet page

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 DevX Skillbuilding from IBM developerWorks
 RIA Run Contest: Build Next-Gen Apps in Microsoft Silverlight 2
 Avaya DevConnect Center
 Intel Go Parallel Portal
 Internet.com eBook Library
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 53
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Alfresco's Latest ECM: Prying Open a Sector?
SaaS Tool Offers Custom Database Development
Microsoft’s Automated Agent: Can We Talk?
Borland Finally Sells CodeGear
Red Hat Heads for the JON 2.0
Out with the Old, in with the New at JavaOne
Trolltech Expands WebKit Footprint
Oracle: Eating its Own Open Source Food
Big Money and Open Source May Not Compute
Open Source Embrace Gives Sun New Fans

Getting Started with TBB on Windows
Moving to VoIP: Should You Go It Alone?
Introduction to the WPF Command Framework
7.0, Microsoft's Lucky Version?
Will Hyper-V Make VMware This Decade's Netscape?
Eliminate Fragmentation Frustration with Netbiscuits
Taming Trees: Building Branching Structures
Clean Up Function Syntax Mess with decltype
Sutter Speaks: The Future of Concurrency
INTEL SCAVENGER HUNT, LENOVO X300 AND APPLE IPOD TOUCH GIVEAWAY (the "Giveaway")

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES