English Japanese
Scand 
Company Services Products Download News Contact
Company
Personnel
Experience
Portfolio
Workflow

Services
Virtual Office
Fixed bid
F.A.Q.

Products
AWTX
TreeTable
JTree
Vault
JNDI2R
ProSys
Megatester
Urfin
WebHelp
Flash
   FlyCharts
   VividMap

AWT eXtensions - JTree - Samples

AWTX Home | Demo | Documentation | Download | Support

Here samples of usage of the JTree applet are listed...

Simple tree:

Tree with checkboxes:

Dynamical loading - ASP code sample: zip (14 kB)

<%
parentID=Request("id")

dbDir = Server.MapPath("data.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DBQ="& dbDir &";Driver={Microsoft Access Driver (*.mdb)};FIL=MS Access;"
Set rs = Conn.Execute("select * from child where parentid=" & parentID)
do while not rs.EoF
	id=rs("childid")
	name = rs("name")
	response.write """" & name & """,""" & id & """,""1,'" & id & "'"",0"
	response.write vbCrLf
	rs.movenext
loop
rs.close
%>

Dynamical loading - JSP code sample: zip (14 kB)

<%
String parentID = request.getParameter("id");

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:jtree");
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery("select * from child where parentid=" + parentID);

while (rs.next())
{
	String id=rs.getString("childid");
	String name = rs.getString("name");
	out.println("\"" + name + "\",\"" + id + "\",\"1,'" + id + "'\",0");
}

rs.close();
st.close();
conn.close();
%>

Questions or comments? Write us, you are always welcome.
Check our other products.








New demos:
· WebQuicken
· ProSys
· UserMan
· WebDN

These demos use our awt.x components.

Copyright © Scand Ltd. 1998-2006