Java jsptListe V 1.60

INDEX



Description
This component is a new JSP version of tListe script/applet. With this you can build on the fly a nice treeview in html format.
tListe JSP is compatible with ASP/Perl and applet version (same data structure).
Index



Registration
jsptListe component is FreeWare for non commercial sites.
For personal use, please add a link on your site back to my Home Page (http://www.javaside.com/) and send me the URL where you wish to place the jsptListe component.
For professional / commercial use, you will need to obtain a "professional registration". With this registration you can use jsptListe with no reference to me and I will send you the complete jsptListe source code.
If you want to use jsptListe in another application, then you must obtain a "professionnal registration".
For more information about "Professional registration" : R. BERTHOU.
Index



JSP Source
Sample use
<HTML><HEAD>
<jsp:useBean id="tlisteBeanId" scope="session" class="javaside.jsptListe.tlisteBean" />
<jsp:setProperty name="tlisteBeanId" property="node" />
<% 
      // Declare base URl
      tlisteBeanId.setUrl( request.getRequestURI() );
      // Declare defaut target
      tlisteBeanId.setTarget( "_blank" );
      // Read data file
      tlisteBeanId.readFile("../tliste.txt" );
      // Build data structure
      tlisteBeanId.endData() ;
%>
<title>tListe version JSP</title></head>
<body><H1>tListe version JSP</h1><br>
     Affichage du treeview 
     <br>
     <jsp:getProperty name="tlisteBeanId" property="display" />

</body></html>
Index



Functions
This is the list of the open functions from your JSP code. Would you please read the samples to see the sequence of the calls.
NameDescription
String getImagePath() Return image Path
setImagePath(String s) Define image Path
setUrl(String s) Define current script URL
setStyle(String s) Define default style
String getNode() Return treeview state
setNode(String s) Define treeview state
String getSeparator() Return separator (for data file)
setSeparator(String s) Define le separator (default ";")
String getTarget() Return current "target" (frame target destination when you open a link in jsptListe)
setTarget(String s) Define default "target" (default "_self")
String getDisplay() return treeview string
setFile(String s) Define data file (tliste.txt ..)
readFile(String s) Read data file
readFile(boolean b) Read data file (if you use set File to define this) :
if b is true all data ares read
if b is false all data are read if there data is not already in memory
boolean startData(String s) Check if data is in memory
endData()Build treeview structure (!! mandatory !! )
int getPosition(int key)return the position of "key" item (use this if you add item with "addRow" or "addChild")
int addChild(String titre, String sUrl, int icon)Add a child item after the last row
int addChild(String titre, String sUrl, int icon, String sTarget)Add a child item after the last row
int addChild(int position, String titre, String sUrl, int icon)Add a child item after the row "position"
int addChild(int position, String titre, String sUrl, int icon, String sTarget)Add a child item after the row "position"
int addChild(int position, String titre, String sUrl, int icon, String sTarget, String sHelp)Add a child item after the row "position"
int addRow(String titre, String sUrl, int icon)Add a row after the last row
int addRow(String titre, String sUrl, int icon, String target)Add a row after the last row
int addRow(int position, String titre, String sUrl, int icon, String target)Add a row after the row "position"
int addRow(int position, int iLevel, String title, String url, String targ, int icon, String help) Add a new row at the position "position" with level "iLevel" and all other informations
Index



Data file format
ColumNameTypeDescription
1LevelIntegerItem level 0..20
2Item NamestringName of item (URL of bitmap if level 99)
3Bitmap numberIntegerItem bitmap (0..9)
Rem : MOD(2) = 0 => treenode close (if node)
MOD(2) = 1 => treenode open (if node)
2 node disable.
sample if node "0, 10,12,20,..." => node close
"1, 11,13,21,..." => node open
4Dest URLstringDest. URL ( begin "./" if local URL )
5TargetstringTarget Frame (overide default )
-Help BulletstringBegin with "?" String help display in bullet, you can define this param in 5, 6 or 7 col.
Sample tliste.txt
Index



History
In construction...

1.60Support more than 64 nodes (unlimited)...
1.55Solve a prb with addRow functions...
1.50Support more than 32 nodes...
1.00Creation...

Retour Index



Download files
jsplListe V 1.60 English jsplListe_us.zip (41 KB)      (backup)
jsptListe V 1.60 Francais jsptListe_fr.zip (41 KB)      (backup)
Index


Copyright © 1996..2001, BERTHOU. Tous droits réservés.
Dernière modification le 05 Septembre 2002 18H26