index.jsp

来自「jboss服务器! java开发员必备! 一般与sqlserver数据库组合」· JSP 代码 · 共 302 行 · 第 1/2 页

JSP
302
字号
<%!

   /** Left region index. */
   private static final int LEFT = 0;

   /** Center region index. */
   private static final int CENTER = 1;

   /** Right region index. */
   private static final int RIGHT = 2;

   /** Map a (region,mode) to an image path. */
   private static final Map[] MODE_IMG_PATH = new Map[]{new HashMap(),new HashMap(),new HashMap()};

   /** Map a (windowState,mode) to an image path. */
   private static final Map[] WINDOW_STATE_IMG_PATH = new Map[]{new HashMap(),new HashMap(),new HashMap()};

   static
   {
      MODE_IMG_PATH[LEFT].put("edit", "/nodesk/images/portlet_left_top/edit.gif");
      MODE_IMG_PATH[LEFT].put("view", "/nodesk/images/portlet_left_top/view.gif");
      MODE_IMG_PATH[LEFT].put("help", "/nodesk/images/portlet_left_top/help.gif");
      MODE_IMG_PATH[CENTER].put("edit", "/nodesk/images/portlet_middle_top/edit.gif");
      MODE_IMG_PATH[CENTER].put("view", "/nodesk/images/portlet_middle_top/view.gif");
      MODE_IMG_PATH[CENTER].put("help", "/nodesk/images/portlet_middle_top/help.gif");
      MODE_IMG_PATH[RIGHT].put("edit", "/nodesk/images/portlet_right_top/edit.gif");
      MODE_IMG_PATH[RIGHT].put("view", "/nodesk/images/portlet_right_top/view.gif");
      MODE_IMG_PATH[RIGHT].put("help", "/nodesk/images/portlet_right_top/help.gif");
      WINDOW_STATE_IMG_PATH[LEFT].put("normal", "/nodesk/images/portlet_left_top/normal.gif");
      WINDOW_STATE_IMG_PATH[LEFT].put("minimized", "/nodesk/images/portlet_left_top/minimize.gif");
      WINDOW_STATE_IMG_PATH[LEFT].put("maximized", "/nodesk/images/portlet_left_top/maximize.gif");
      WINDOW_STATE_IMG_PATH[CENTER].put("normal", "/nodesk/images/portlet_middle_top/normal.gif");
      WINDOW_STATE_IMG_PATH[CENTER].put("minimized", "/nodesk/images/portlet_middle_top/minimize.gif");
      WINDOW_STATE_IMG_PATH[CENTER].put("maximized", "/nodesk/images/portlet_middle_top/maximize.gif");
      WINDOW_STATE_IMG_PATH[RIGHT].put("normal", "/nodesk/images/portlet_right_top/normal.gif");
      WINDOW_STATE_IMG_PATH[RIGHT].put("minimized", "/nodesk/images/portlet_right_top/minimize.gif");
      WINDOW_STATE_IMG_PATH[RIGHT].put("maximized", "/nodesk/images/portlet_right_top/maximize.gif");
   }

%>

<%@ taglib uri="/WEB-INF/theme-basic-lib.tld" prefix="tb" %>
<%@ page
    import="java.util.Iterator,
            java.io.Writer,
            java.io.IOException,
            java.io.StringWriter,
            java.util.Map,
            java.util.HashMap,
            org.jboss.portal.server.theme.LayoutConstants"%>
<%
   String contextPath = request.getContextPath();
   int nbCol = 3;
   boolean leftIsEmpty = false;
   boolean centerIsEmpty = false;
   boolean rightIsEmpty = false;

   String left = "left";
   String center = "center";
   String right = "right";

   String layoutState = (String)request.getAttribute(LayoutConstants.PARAM_LAYOUT_STATE);
   if ("maximized".equals(layoutState))
   {
      left = "";
      center = "left,center,right";
      right = "";
      leftIsEmpty = true;
      centerIsEmpty = false;
      rightIsEmpty = true;
   }
   else
   {
      %>
      <%
   }

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%= "JBoss Portal :: 2.0 Release Candidate" %></title>
<meta http-equiv="Content-Type" content="text/html;" />
<script language="JavaScript" type="text/javascript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<link href="<%= contextPath %>/nodesk/css/portal_style.css" rel="stylesheet" type="text/css" />
<link href="/portal-forums/subSilver/styles.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="<%= contextPath %>/images/favicon.ico" />
</head>
<body>
<table width="789" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="portal-table">
 <!--DWLayoutTable-->
 <tr>
  <td height="111" colspan="<%= nbCol %>" align="center" valign="top"><img src="<%= contextPath %>/nodesk/images/portal_utils/portal_head.jpg" width="743" height="109"></td>
 </tr>
 <tr>
  <%
    if (!leftIsEmpty) {
      int index = LEFT;
    %>
  <td width="221" height="568" valign="top">
    <table border="0" align="right" cellpadding="0" cellspacing="0" background="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_background.gif">

    <tb:iterate region="<%= left %>">
   <tr>
    <td>
      <table id="left" border="0" cellpadding="0" cellspacing="0">
      <tr>
       <td><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_01.gif" width="15" height="5" alt=""></td>
       <td colspan="4"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_02.gif" width="100%" height="5" alt=""></td>
       <td rowspan="2"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_03.gif" width="14" height="21" alt=""></td>
      </tr>
      <tr>
       <td><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_04.gif" width="15" height="16" alt=""></td>
       <td width="15"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_05.gif" width="15" height="16" alt=""></td>
       <!--td><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_06.gif" width="1" height="16" alt=""></td-->
       <td nowrap height="16" valign="middle" background="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_07.gif" class="portal-left-title-white"><%= title %></td>
       <td width="4"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_08.gif" width="4" height="16" alt=""></td>
       <td background="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_07.gif" align="right" width="100%">
          <%@ include file="decoration.jsp" %>
       </td>
      </tr>
      <tr>
       <td><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_12.gif" width="15" height="7" alt=""></td>
       <td colspan="4"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_13.gif" width="100%" height="7" alt=""></td>
       <td><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_14.gif" width="14" height="7" alt=""></td>
      </tr>
      <tr>
       <td background="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_15.gif"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_15.gif" width="15" height="100%" alt=""></td>
       <td colspan="4" bgcolor="#FFFFFF"><%= content %></td>
       <td width="14" background="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_17.gif"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_17.gif" width="14" height="100%" alt=""></td>
      </tr>
      <tr>
       <td><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_18.gif" width="15" height="15" alt=""></td>
       <td colspan="4"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_19.gif" width="100%" height="15" alt=""></td>
       <td><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_20.gif" width="14" height="15" alt=""></td>
      </tr>
      <tr>
       <td colspan="6"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/portlet_left_top_21.gif" width="191" height="1" alt=""></td>
      </tr>
      <tr>
       <td colspan="6"><img src="<%= contextPath %>/nodesk/images/portlet_left_top/spacer.gif" height="1" alt=""></td>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?