⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a_005flayout_jsp.java

📁 应用泛型以及反射编写的单表操作框架
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
      out.write("\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td colspan=\"3\">&nbsp;</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td height=\"217\" background=\"image/layout/affiche.jpg\"><table width=\"96%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("          <tr height=\"30\">\r\n");
      out.write("            <td>&nbsp;</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td><marquee height=\"187\" direction=\"up\" scrollamount=\"1\" onmouseout=\"this.start()\" onmouseover=\"this.stop()\">\r\n");
      out.write("            <table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("              ");

              //加载公告
              List affiches=null;
              if(session.getAttribute("affiches")==null){
                String hql="from Affiche";
                affiches=hn.query(hql);
                session.setAttribute("affiches",affiches);
              }else{
                affiches=(List)session.getAttribute("affiches");
              }
              for(int i=0;i<affiches.size();i++){
                Affiche affiche=(Affiche)affiches.get(i);
              
      out.write("\r\n");
      out.write("              <tr>\r\n");
      out.write("                <td width=\"6%\">&nbsp;</td>\r\n");
      out.write("                <td width=\"88%\">\r\n");
      out.write("                  <a href=\"#\" class=\"style2\" onClick=\"controlAfficheAlign(");
      out.print(affiche.getId() );
      out.write(')');
      out.write('"');
      out.write('>');
      out.print(affiche.getTitle()+"&nbsp;"+affiche.getDates() );
      out.write("</a></td>\r\n");
      out.write("                <td width=\"6%\">&nbsp;</td></tr>\r\n");
      out.write("              <tr>\r\n");
      out.write("                <td colspan=\"3\">&nbsp;</td>\r\n");
      out.write("              </tr>\r\n");
      out.write("              ");

              }
              
      out.write("\r\n");
      out.write("            </table>\r\n");
      out.write("\t\t\t</marquee>\r\n");
      out.write("\t\t\t</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("      ");

      //搜索销售排行信息
      String hql="";
      hql="from MerchandiseSort where photo = '0'";
      List sonSortsl=(List)hn.query(hql);
      List sellFirstOfEverySort = new ArrayList();
      for(int i=0;i<sonSortsl.size();i++){
        MerchandiseSort sonSort=(MerchandiseSort)sonSortsl.get(i);
        String sql = "select merchandise_id from (select * from tb_sell_info where merchandise_id in (select id from tb_merchandise_info where sort_id=" + sonSort.getId() + ")) sortMerchandise group by sortMerchandise.merchandise_id order by sum(amount) desc";
        List idTaxis = hn.queryWithSql(sql);
        if(idTaxis.size()>0){
          String sid = idTaxis.get(0).toString();
          int id = Integer.parseInt(sid);
          hql = "from MerchandiseInfo where id=" + id;
          MerchandiseInfo info = (MerchandiseInfo) hn.queryOne(hql);
          sellFirstOfEverySort.add(info);
        }
      }
      
      out.write("\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td height=\"299\" background=\"image/layout/compositor.jpg\" valign=\"top\">\r\n");
      out.write("    <table width=\"96%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("      <tr height=\"30\">\r\n");
      out.write("        <td>&nbsp;</td>\r\n");
      out.write("      </tr>\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td><marquee height=\"266\" direction=\"up\" scrollamount=\"1\" onmouseout=\"this.start()\" onmouseover=\"this.stop()\">\r\n");
      out.write("\t\t<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\r\n");
      out.write("        ");

        for(int i=0;i<sellFirstOfEverySort.size();i++){
          MerchandiseInfo info=(MerchandiseInfo)sellFirstOfEverySort.get(i);
        
      out.write("\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td></td>\r\n");
      out.write("            <td><a href=\"merchandise_info.do?merchandiseId=");
      out.print(info.getId() );
      out.write("\" class=\"style2\">");
      out.print(info.getName()+"&nbsp;&nbsp;RMB:"+info.getPrice() );
      out.write("</a></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        ");

        }
        
      out.write("\r\n");
      out.write("        </table>\r\n");
      out.write("\t\t</marquee></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("    </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("    </table></td>\r\n");
      out.write("    <td width=\"563\" valign=\"top\"><table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td height=\"65\" valign=\"top\" background=\"image/layout/topFour.jpg\"><table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("\t\t\t  <tr>\r\n");
      out.write("\t\t\t    <td colspan=\"40\" height=\"8\"></td>\r\n");
      out.write("\t\t\t  </tr>\r\n");
      out.write("              <tr align=\"center\" height=\"29\">\r\n");
      out.write("              ");

              //加载商品类别
              hql="from MerchandiseSort where photo<>'0'";
              List fatherSorts=hn.query(hql);
              session.setAttribute("fatherSorts",fatherSorts);
              //遍例父类
              MerchandiseSort fatherSort=null;
              fatherSort=(MerchandiseSort)fatherSorts.get(0);
              
      out.write("\r\n");
      out.write("                <td rowspan=\"3\"><a href=\"fatherSort.do?fatherId=");
      out.print(fatherSort.getId() );
      out.write("&requestPage=");
      out.print(request.getServletPath() );
      out.write("\"><img src=\"image/layout/type/");
      out.print(fatherSort.getPhoto() );
      out.write("\" width=\"23\" height=\"21\"></a></td>\r\n");
      out.write("                <td><a href=\"fatherSort.do?fatherId=");
      out.print(fatherSort.getId() );
      out.write("&requestPage=");
      out.print(request.getServletPath() );
      out.write("\" class=\"style2\">");
      out.print(fatherSort.getName() );
      out.write("</a></td>\r\n");
      out.write("              ");

              for(int i=1;i<fatherSorts.size();i++){
                fatherSort=(MerchandiseSort)fatherSorts.get(i);
              
      out.write("\r\n");
      out.write("                <td rowspan=\"3\"><img src=\"image/layout/type/oneLine.jpg\"></td>\r\n");
      out.write("                <td rowspan=\"3\"><a href=\"fatherSort.do?fatherId=");
      out.print(fatherSort.getId() );
      out.write("&requestPage=");
      out.print(request.getServletPath() );
      out.write("\"><img src=\"image/layout/type/");
      out.print(fatherSort.getPhoto() );
      out.write("\" width=\"23\" height=\"21\"></a></td>\r\n");
      out.write("                <td><a href=\"fatherSort.do?fatherId=");
      out.print(fatherSort.getId() );
      out.write("&requestPage=");
      out.print(request.getServletPath() );
      out.write("\" class=\"style2\">");
      out.print(fatherSort.getName() );
      out.write("</a></td>\r\n");
      out.write("              ");

              }
              
      out.write("\r\n");
      out.write("              </tr>\r\n");
      out.write("            </table></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("\t\t\t  <tr>\r\n");
      out.write("\t\t\t    <td colspan=\"40\" height=\"1\"></td>\r\n");
      out.write("\t\t\t  </tr>\r\n");
      out.write("              <tr align=\"center\">\r\n");
      out.write("              ");

              //遍例子类
              Set sonSorts=null;
              if(request.getAttribute("sonSorts")==null){
                sonSorts=((MerchandiseSort)fatherSorts.get(0)).getSonSorts();
                session.setAttribute("sonSorts",sonSorts);
              }else if(request.getAttribute("sonSorts")!=null&&request.getAttribute("sonSorts").equals("session")){
                sonSorts=(Set)session.getAttribute("sonSorts");
              }else{
                sonSorts=(Set)request.getAttribute("sonSorts");
                session.setAttribute("sonSorts",sonSorts);
              }
              Iterator it=sonSorts.iterator();
              MerchandiseSort sonSort=null;
              while(it.hasNext()){
                sonSort=(MerchandiseSort)it.next();
              
      out.write("\r\n");
      out.write("                <td><a href=\"sonSort.do?fatherId=");
      out.print(sonSort.getId() );
      out.write("&requestPage=");
      out.print(request.getServletPath() );
      out.write("\" class=\"style2\">");
      out.print(sonSort.getName() );
      out.write("</a></td>\r\n");
      out.write("              ");

                while(it.hasNext()){
              
      out.write("\r\n");
      out.write("                <td><img src=\"image/layout/type/twoLine.jpg\"></td>\r\n");
      out.write("                ");

                  break;
                }
              }
              
      out.write("\r\n");
      out.write("              </tr>\r\n");
      out.write("            </table></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td valign=\"top\">\r\n");
      out.write("\t\t<!--内容开始-->\r\n");
      out.write("\t\t");
      if (_jspx_meth_tiles_insert_0(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("\t\t<!--内容结束-->\r\n");
      out.write("        </td>\r\n");
      out.write("      </tr>\r\n");
      out.write("    </table>\r\n");
      out.write("\t</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr valign=\"bottom\">\r\n");
      out.write("    <td colspan=\"3\" width=\"800\" height=\"101\" background=\"image/layout/bottom.jpg\">\r\n");
      out.write("\t<a href=\"#\" onClick=\"controlLandAlign()\">登录</a></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }

  private boolean _jspx_meth_tiles_insert_0(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  tiles:insert
    org.apache.struts.taglib.tiles.InsertTag _jspx_th_tiles_insert_0 = (org.apache.struts.taglib.tiles.InsertTag) _jspx_tagPool_tiles_insert_attribute_nobody.get(org.apache.struts.taglib.tiles.InsertTag.class);
    _jspx_th_tiles_insert_0.setPageContext(_jspx_page_context);
    _jspx_th_tiles_insert_0.setParent(null);
    _jspx_th_tiles_insert_0.setAttribute("content");
    int _jspx_eval_tiles_insert_0 = _jspx_th_tiles_insert_0.doStartTag();
    if (_jspx_th_tiles_insert_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
      return true;
    _jspx_tagPool_tiles_insert_attribute_nobody.reuse(_jspx_th_tiles_insert_0);
    return false;
  }
}

⌨️ 快捷键说明

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