benbenpan (奔奔) 你好:这个bean我用过的,没有问题。我现在将完整的给你发过去。你看它的example试一下。数据库也用它自带的sql,然后你再研究一下它的格式!给分 哦!
解决方案 »
- 动态生成一个带复选框的java树在B/S结构中使用,选择复选框后,点击创建一棵虚拟的新树,输入的树名为根,完成创建.实现增删改的功能!(急啊!!)
- 紧急求教高手 jstl : C标签的配置问题
- 寻软件开发工作----顶者有分
- ========100一定要解决这个问题。谢谢!=====
- JSP嵌入SQL的问题
- 关于页面立即过期的问题,以及浏览器回退问题,请高手赐教??
- 关于JSP菜单的问题
- 一个小问题,郁闷了很久了,望大虾帮忙,在线等
- 新人请高手帮忙看一小段程序!
- 我在redhat7下,安装了jdk1.2.2,tomcat,apache后运行没有报错,可就是打localhost/examples不能显示如何办?
- 统计符合条件的记录数的语句应该如何写?
- 我的javamail出了什么问题????
[email protected]
thank you very much
我的信箱:[email protected]
[email protected]
[email protected]这个发不过去
你再换个邮件吧
[email protected]
采用javabean+javascript+数据库表。实现的
真的??
那也给我一个巴
[email protected]
还有楼主你的邮件发不过去
在这贴给你把
<%@ page contentType="text/html;charset=gb2312" language="java" %>
<%
String grade =(String)session.getAttribute("grade"); if(permid==null)
{
out.println("<script Language=\"javascript\">");
out.println("alert(\"您的会话已经过期,请您重新登陆\")");
out.println("parent.window.navigate(\""+request.getContextPath()+"/index.jsp\")");
out.println("</script>");
grade="0";
}
%>
<html>
<script language="JavaScript"
src="<%=request.getContextPath()%>\script\leftframe.js"></script>
<head>
<title>search</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
body, p, div {font:menu;line-height: 150%}
.s{ font-family: 宋体; font-size: 12px; line-height: 150% }
-->
</style>
<link rel="stylesheet" href="images/test.css" type="text/css">
<script Language="javascript" src="images/js.js"></script>
<base target="main">
</head><body bgcolor="#EBF3FC" text="#000000" onselectstart="return false;" scroll=no
onkeydown="if(event.keyCode=='39') cwin();">
<table id=control width="100%" border="0" cellspacing="0" cellpadding="0"
bgcolor="#DAE8F8" >
<tr>
<td height="20" valign="middle">
<p align="center"><nobr>
信息管理</nobr></p>
</td>
<td width="20" align="center" valign="top"><img src="images/icon-expandall.gif"
width="16" height="15" class="button" onclick="expandall(this)" vspace="2"
alt="全部展开"></td></tr>
</table><div id="navi" style="position:relative; width:100%;
height:expression(body.offsetHeight-control.offsetHeight-2); z-index:1; left:
0px; top: 0px; overflow: auto">
<table width=130 border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="12"><img src="images/spacer.gif" width="12"
height="12"></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"><div id="main1" class="menu" onClick="expandIt('1'); return false"><table
width="100%" border="0" cellspacing="0" cellpadding="0">
<script>t("学校基本信息")</script>
</table>
</div>
<div id="page1" class="child" style="padding-left:5px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<script>
list("<%=request.getContextPath()%>/SchlAction.do?act=tianJia","","信息录入");
list("<%=request.getContextPath()%>/SchlAction.do?act=findAll","","信息维护");
list("<%=request.getContextPath()%>/SchlAction.do?act=search","","信息浏览");
</script>
</table>
</div><div id="main5" class="menu" onClick="expandIt('5'); return false"><table
width="100%" border="0" cellspacing="0" cellpadding="0">
<script>t("课程管理")</script>
</table>
</div>
</div>
<div id="page5" class="child" style="padding-left:5px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<script>
list("<%=request.getContextPath()%>/InfoAction.do?act=tianJia","","人员录入");
list("<%=request.getContextPath()%>/InfoAction.do?act=findAll","","人员维护");
</script>
</table>
</div>
</body>
</html>
[email protected]
[email protected]
[email protected]
数据库脚本
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Block]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Block]
GOif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[EminRight]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[EminRight]
GOCREATE TABLE [dbo].[Block] (
[BlockName] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[BlockId] [int] IDENTITY (1, 1) NOT NULL ,
[BlockFatherId] [int] NULL ,
[BlockScript] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
[BlockOrder] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GOCREATE TABLE [dbo].[EminRight] (
[BlockId] [int] NULL ,
[EminId] [varchar] (4) COLLATE Chinese_PRC_CI_AS NULL ,
[RightTag] [char] (1) COLLATE Chinese_PRC_CI_AS NULL ,
[RightId] [decimal](18, 0) IDENTITY (1, 1) NOT NULL
) ON [PRIMARY]
GO
谢谢
[email protected]
* @(#)TreeDemo.java 1.3 99/10/10
*
* Copyright (c) 1997-1999 by Sun Microsystems, Inc. All Rights Reserved.
*
* Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
* modify and redistribute this software in source and binary code form,
* provided that i) this copyright notice and license appear on all copies of
* the software; and ii) Licensee does not utilize the software in a manner
* which is disparaging to Sun.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
* IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
* LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
* OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
* LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
* INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
* CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
* OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* This software is not designed or intended for use in on-line control of
* aircraft, air traffic, aircraft navigation or aircraft communications; or in
* the design, construction, operation or maintenance of any nuclear
* facility. Licensee represents and warrants that it will not use or
* redistribute the Software for such purposes.
*/
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;
import javax.accessibility.*;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.util.*;
import java.io.*;
import java.applet.*;
import java.net.*;
/**
* JTree Demo
*
* @version 1.3 10/10/99
* @author Jeff Dinkins
*/
public class TreeDemo extends DemoModule {
/**
* main method allows us to run as a standalone demo.
*/
public static void main(String[] args) {
TreeDemo demo = new TreeDemo(null);
demo.mainImpl();
}
/**
* TreeDemo Constructor
*/
public TreeDemo(SwingSet2 swingset) {
// Set the title for this demo, and an icon used to represent this
// demo inside the SwingSet2 app.
super(swingset, "TreeDemo", "toolbar/JTree.gif");
getDemoPanel().add(createTree(), BorderLayout.CENTER);
}
public JScrollPane createTree() {
DefaultMutableTreeNode top = new DefaultMutableTreeNode(getString("TreeDemo.music"));
DefaultMutableTreeNode catagory = null ;
DefaultMutableTreeNode artist = null;
DefaultMutableTreeNode record = null;
// open tree data
URL url = getClass().getResource("/resources/tree.txt");
try {
// convert url to buffered string
InputStream is = url.openStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader reader = new BufferedReader(isr);
// read one line at a time, put into tree
String line = reader.readLine();
while(line != null) {
// System.out.println("reading in: ->" + line + "<-");
char linetype = line.charAt(0);
switch(linetype) {
case 'C':
catagory = new DefaultMutableTreeNode(line.substring(2));
top.add(catagory);
break;
case 'A':
if(catagory != null) {
catagory.add(artist = new DefaultMutableTreeNode(line.substring(2)));
}
break;
case 'R':
if(artist != null) {
artist.add(record = new DefaultMutableTreeNode(line.substring(2)));
}
break;
case 'S':
if(record != null) {
record.add(new DefaultMutableTreeNode(line.substring(2)));
}
break;
default:
break;
}
line = reader.readLine();
}
} catch (IOException e) {
}
JTree tree = new JTree(top) {
public Insets getInsets() {
return new Insets(5,5,5,5);
}
};
return new JScrollPane(tree);
}
}