??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩中出av,中文字幕不卡在线,天天综合入口http://www.aygfsteel.com/gavinju/archive/2007/04/11/109836.htmlHandSoftHandSoftWed, 11 Apr 2007 02:40:00 GMThttp://www.aygfsteel.com/gavinju/archive/2007/04/11/109836.htmlhttp://www.aygfsteel.com/gavinju/comments/109836.htmlhttp://www.aygfsteel.com/gavinju/archive/2007/04/11/109836.html#Feedback0http://www.aygfsteel.com/gavinju/comments/commentRss/109836.htmlhttp://www.aygfsteel.com/gavinju/services/trackbacks/109836.html在Strut?实现table中复制一行的功能
line[j]是要复制的一?Action中可以获取到要复制的行的ID.
因ؓline[j]中有很多属?要是一个一个的属性去get,然后set的话,代码量会
很大,而且会出现很多冗余代码?br>q是我要复制出来的一?br>if (j == rowId && !line[j].getNewRecord()) {
     rowList.add(line[j]);
     //这一行全部复?br>    }
现在要得其中的某几个属性复制出来ؓI?br>则需要一个一个的set,get.
if (j == rowId && !line[j].getNewRecord()) {
    CreateDeliveryLineRow  cdlr = new CreateDeliveryLineRow  ();
    if(line[j].getMfgLot() != null){
         cdlr.setMfgLot = null;
   }
。。。。。?br>     rowList.add(cdlr);
     //这一行全部复?br>    }

以下是比较好的解x?
利用apache的commoncM的BeanUtils来实现对象属性的复制
if (j == rowId && !line[j].getNewRecord()) {
     
       
       CreateDeliveryLineRow row = new CreateDeliveryLineRow();
       BeanUtils.copyProperties(row,line[j]);   //复制出对象line[j],其属性赋予row
       row.setQuantity(null);                                     //在row中轻杄实现Ҏ几个属性的控制
       row.setMfgLot(null);
       row.setMiniQuantity(null);
       row.setBoxQuantity(null);
      rowList.add(row);
      //rowList.add(cdr);
    }
===================================================
CreateDeliveryForm getForm = (CreateDeliveryForm) form;
。。。。。?br>CreateDeliveryLineRow[] line = getForm.getLine();
if (line != null && line instanceof CreateDeliveryLineRow[]) {
   int size = line.length;

   for (int j = 0; j < size; j++) {
    if (!line[j].getNewRecord() && !line[j+1].getNewRecord()) {
     if (line[j].getBoxQuantity() == 0L) {
      line[j].setBoxQuantity(null);
     }
     if (line[j].getMiniQuantity() == 0L) {
      line[j].setMiniQuantity(null);
     }
     if (line[j].getQuantity() == 0D) {
      line[j].setQuantity(null);
     }
     rowList.add(line[j]);
    }
    if (j == rowId && !line[j].getNewRecord()) {
     
       
       CreateDeliveryLineRow row = new CreateDeliveryLineRow();
       BeanUtils.copyProperties(row,line[j]);
       row.setQuantity(null);
       row.setMfgLot(null);
       row.setMiniQuantity(null);
       row.setBoxQuantity(null);
       rowList.add(row);
      //rowList.add(cdr);
    }

   }
  }

。。。。。?br>request.setAttribute("results", rowList);

HandSoft 2007-04-11 10:40 发表评论
]]>
Dwr---examplehttp://www.aygfsteel.com/gavinju/archive/2007/01/21/95188.htmlHandSoftHandSoftSun, 21 Jan 2007 15:35:00 GMThttp://www.aygfsteel.com/gavinju/archive/2007/01/21/95188.htmlhttp://www.aygfsteel.com/gavinju/comments/95188.htmlhttp://www.aygfsteel.com/gavinju/archive/2007/01/21/95188.html#Feedback0http://www.aygfsteel.com/gavinju/comments/commentRss/95188.htmlhttp://www.aygfsteel.com/gavinju/services/trackbacks/95188.html 1. 在web.xml文g中注册dwr
   <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <display-name>DWR Servlet</display-name>
    <description>Direct Web Remoter Servlet</description>
    <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
    <init-param>
        <param-name>debug</param-name>
        <param-value>true</param-value>
    </init-param>
 </servlet>
 <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
 </servlet-mapping>

 <welcome-file-list>
    <welcome-file>search.jsp</welcome-file>
 </welcome-file-list>

2.dwr.xml
 <dwr>
    <allow><convert convert="bean"  match="dwr.sample.Apartment"/>
    <create>
           <creator="new" javascript="ApartmentDAO" class="dwr.sample.ApartmentDAO">
                  <include method="findApartments"/>
                  <include method="countApartments"/>
           </creator>
    </create>
    </allow>
</dwr>
3.DB
CREATE TABLE APARTMENTS (id INTEGER, bedrooms INTEGER, bathrooms INTEGER, price INTEGER, address VARCHAR, city VARCHAR, province VARCHAR);
INSERT INTO APARTMENTS VALUES (16001, 1, 1, 850, '123 King St. East', 'Toronto', 'ON');
INSERT INTO APARTMENTS VALUES (16002, 2, 1, 1000, '1023 Yonge Ave.', 'Toronto', 'ON');
INSERT INTO APARTMENTS VALUES (16003, 2, 2, 1050, '27 Winchester St.', 'Toronto', 'ON');
4.Apertment.java
普通的javabean
5.DBUtils.java
   数据库链接类
   public class DBUtils {

 /*
  * Creates the sample data (table and records).
  */
 public static void setupDatabase(BufferedReader reader) {
  Connection c = null;
  Statement stmt = null;
  try {
   c = openConnection();
   stmt = c.createStatement();
   // reads the file with the SQL statements
   String line;
   while ((line = reader.readLine()) != null) {
    stmt.execute(line);
   }
   stmt.close();
   c.close();
  } catch (IOException e) {
   e.printStackTrace();
  } catch (SQLException e) {
   e.printStackTrace();
  } finally {
   try {
    stmt.close();
    c.close();
   } catch (SQLException e) {
    e.printStackTrace();
   }
  }
 }
 
 /*
  * Opens a database connection.
  */
 public static Connection openConnection() throws SQLException {
  Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:dwr-sample", "sa", "");
  return c;
 }
 
}

6.ContextListener.java
   实现了ServletContextListerer接口的类
   public class ContextListener implements javax.servlet.ServletContextListener {

 /**
  * This method is invoked when the Web Application has been removed and is
  * no longer able to accept requests.
  * @param event
  */
 public void contextDestroyed(ServletContextEvent event) {
 }

 /**
  * This method is invoked when the Web Application is ready to service requests.
  * @param event
  */
 public void contextInitialized(ServletContextEvent event) {
  try {
   // load the driver
   Class.forName("org.hsqldb.jdbcDriver");
   // create the table and add sample data
   InputStreamReader in = new InputStreamReader(getClass().getClassLoader().getResourceAsStream("db.sql"));
   BufferedReader reader = new BufferedReader(in);
   DBUtils.setupDatabase(reader);
  } catch (ClassNotFoundException e) {
   e.printStackTrace();
  }
  
 }

}
7.ApartmentDAO.java
   业务逻辑?br />   public class ApartmentDAO {
 
 /**
  * Returns the available apartments based on the search criteria.
  * @param bedrooms minimum number of bedrooms
  * @param bathrooms minimum number of bathrooms
  * @param price maximum price to be paid
  * @return
  */
 public Collection findApartments(int bedrooms, int bathrooms, int price) {
  Collection list = new Vector();
  String sql = "select * from APARTMENTS" +
    createSearchWhereClause(bedrooms, bathrooms, price) +
    "order by bedrooms, bathrooms, price";

  // define db variables
  Connection c = null;
  Statement stmt = null;
  try {
   c = DBUtils.openConnection();
   stmt = c.createStatement();
   // just run the sql statement
   ResultSet rs = stmt.executeQuery(sql);
   while(rs.next()) {
    Apartment apartment = this.getApartment(rs);
    list.add(apartment);
   }
  } catch (SQLException e) {
   e.printStackTrace();
  } finally {
   try {
    stmt.close();
    c.close();
   } catch (SQLException e) {
    e.printStackTrace();
   }
  }

  return list;
 }
 
 /**
  * Returns the number of available apartments based on the search criteria.
  * @param bedrooms minimum number of bedrooms
  * @param bathrooms minimum number of bathrooms
  * @param price maximum price to be paid
  * @return
  */
 public int countApartments(int bedrooms, int bathrooms, int price) {
  String sql = "select count(*) as total from APARTMENTS" + createSearchWhereClause(bedrooms, bathrooms, price);
  int numberApartments = -1;
  // define db variables
  Connection c = null;
  Statement stmt = null;
  try {
   c = DBUtils.openConnection();
   stmt = c.createStatement();
   // just run the sql statement
   ResultSet rs = stmt.executeQuery(sql);
   if (rs.next()) {
    numberApartments = rs.getInt("total");
   }
  } catch (SQLException e) {
   e.printStackTrace();
  } finally {
   try {
    stmt.close();
    c.close();
   } catch (SQLException e) {
    e.printStackTrace();
   }
  }
  
  return numberApartments;
 }
 
 /**
  * Creates a Unit object from the database.
  * @param rs
  * @return
  * @throws SQLException
  */
 private Apartment getApartment(ResultSet rs) throws SQLException {
  Apartment ap = new Apartment();
  ap.setId(rs.getInt("id"));
  ap.setAddress(rs.getString("address"));
  ap.setBedrooms(rs.getInt("bedrooms"));
  ap.setBathrooms(rs.getInt("bathrooms"));
  ap.setPrice(rs.getInt("price"));
  ap.setCity(rs.getString("city"));
  ap.setProvince(rs.getString("province"));
  return ap;
 }
 
 
 /**
  * Creates the where clause for the search SQL statement.
  * @param bedrooms
  * @param bathrooms
  * @param price
  * @return
  */
 private String createSearchWhereClause(int bedrooms, int bathrooms, int price) {
  String where = " where bedrooms >= " + bedrooms +
    " and bathrooms >= " + bathrooms +
    " and price < " + price;
  return where;
 }

}
8. search.jsp
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <title>DWR Example</title>

   <style type="text/css" media="screen">
       @import url( style.css );
   </style> 
 
  <script src='dwr/interface/ApartmentDAO.js'></script>
  <script src='dwr/engine.js'></script>
  <script src='dwr/util.js'></script>
  <script>
 
  function updateTotal() {
    $("resultTable").style.display = 'none';
    var bedrooms = document.getElementById("bedrooms").value;
    var bathrooms = document.getElementById("bathrooms").value;
    var price = document.getElementById("price").value;
    ApartmentDAO.countApartments(loadTotal, bedrooms, bathrooms, price);
  }

  function updateResults() {
    DWRUtil.removeAllRows("apartmentsbody");
    var bedrooms = document.getElementById("bedrooms").value;
    var bathrooms = document.getElementById("bathrooms").value;
    var price = document.getElementById("price").value;
    ApartmentDAO.findApartments(fillTable, bedrooms, bathrooms, price);
    $("resultTable").style.display = '';
  }
 
  var getId = function(unit) { return unit.id };
  var getAddress = function(unit) { return unit.address };
  var getBedrooms = function(unit) { return unit.bedrooms };
  var getBathrooms = function(unit) { return unit.bathrooms };
  var getPrice = function(unit) { return unit.price };
   
  function loadTotal(data) {
    document.getElementById("totalRecords").innerHTML = data;
  }
 
  function fillTable(apartment) {
    DWRUtil.addRows("apartmentsbody", apartment, [ getId, getAddress, getBedrooms, getBathrooms, getPrice ]);
  }
 
</script>

</head>

<body onload="updateTotal();">

<h2>Find an apartment to rent</h2>

<table border="0">
<form name="rentalForm">
  <tr width="400">
   <td width="100">City</td>
   <td width="300">Toronto</td>
  </tr>
  <tr>
   <td>Beds</td>
   <td>
    <select id="bedrooms" onchange="updateTotal()">
     <option value="1">1 or more</option>
     <option value="2">2 or more</option>
     <option value="3">3 or more</option>
     <option value="4">4 or more</option>
    </select>
   </td>
  </tr>

  <tr>
   <td>Baths</td>
   <td>
    <select id="bathrooms" onchange="updateTotal()">
     <option value="1">1 or more</option>
     <option value="2">2 or more</option>
     <option value="3">3 or more</option>
     <option value="4">4 or more</option>
    </select>
   </td>
  </tr>

  <tr>
   <td>Price</td>
   <td>
    <select id="price" onchange="updateTotal()">
     <option value="800">under $800</option>
     <option value="1000">under $1,000</option>
     <option value="1250">under $1,250</option>
     <option value="1500" selected="selected">under $1,500</option>
     <option value="1800">under $1,800</option>
     <option value="2000">under $2,000</option>
    </select>
   </td>
  </tr>

  <tr>
   <td colspan="2">
    <blockquote>
     Available apartments: <span id="totalRecords" style="font-weight:bold;"></span>
    </blockquote>
   </td>
  </tr>

</form>
</table>

<p><input type="button" value="Show results!" onClick="updateResults();"></p>

<div id="resultTable">

<h2>Results</h2>

 <table border="1">
  <thead>
    <tr>
      <th width="40">Id</th>
      <th width="180">Address</th>
      <th width="60">Beds</th>
      <th width="60">Baths</th>
      <th width="60">Price</th>
    </tr>
  </thead>
  <tbody id="apartmentsbody">

  </tbody>
 </table>
</div>

</body>
</html>

׃目需?需在我们现有的struts、hibernate工程上集成ajax功能.目l决定用Dwr.
刚开始研IDwr.觉得真的很不? 只需很少量的代码,p在现有的工程上集成ajax技? 期待Dwr有更辉煌的明天!
喜欢Dwr技术的IT界朋友可以与本h联系Q望提出好的意见与徏?



HandSoft 2007-01-21 23:35 发表评论
]]>
eclipse增加内存http://www.aygfsteel.com/gavinju/archive/2006/12/26/90074.htmlHandSoftHandSoftTue, 26 Dec 2006 04:42:00 GMThttp://www.aygfsteel.com/gavinju/archive/2006/12/26/90074.htmlhttp://www.aygfsteel.com/gavinju/comments/90074.htmlhttp://www.aygfsteel.com/gavinju/archive/2006/12/26/90074.html#Feedback0http://www.aygfsteel.com/gavinju/comments/commentRss/90074.htmlhttp://www.aygfsteel.com/gavinju/services/trackbacks/90074.htmlBy default, Eclipse will allocate up to 256 megabytes of Java heap memory. This should be ample for all typical development tasks. However, depending on the JRE that you are running, the number of additional plug-ins you are using, and the number of files you will be working with, you could conceivably have to increase this amount. Eclipse allows you to pass arguments directly to the Java VM using the -vmargs command line argument, which must follow all other Eclipse specific arguments. Thus, to increase the available heap memory, you would typically use:

eclipse -vmargs -Xmx<memory size>

with the <memory size> value set to greater than "256M" (256 megabytes -- the default).

When using a Sun VM, you may also need to increase the size of the permanent generation memory. The default maximum is 64 megabytes, but more may be needed depending on your plug-in configuration and use. The maximum permanent generation size is increased using the -XX:MaxPermSize=<memory size> argument:

eclipse -vmargs -XX:MaxPermSize=<memory size>

This argument may not be available for all VM versions and platforms; consult your VM documentation for more details.

Note that setting memory sizes to be larger than the amount of available physical memory on your machine will cause Java to "thrash" as it copies objects back and forth to virtual memory, which will severely degrade your performance.

在eclipse安装根目录下Q用此命?    eclipse.exe -vmargs -Xms256M -Xmx512M



HandSoft 2006-12-26 12:42 发表评论
]]>
Struts+Hibernate实现分页http://www.aygfsteel.com/gavinju/archive/2006/12/08/86218.htmlHandSoftHandSoftThu, 07 Dec 2006 16:53:00 GMThttp://www.aygfsteel.com/gavinju/archive/2006/12/08/86218.htmlhttp://www.aygfsteel.com/gavinju/comments/86218.htmlhttp://www.aygfsteel.com/gavinju/archive/2006/12/08/86218.html#Feedback0http://www.aygfsteel.com/gavinju/comments/commentRss/86218.htmlhttp://www.aygfsteel.com/gavinju/services/trackbacks/86218.html1.  视图昄(select.jsp)Q首?  上一? 下一?/  N ${requestScope.page} / ${requestScope.pagecount}  / 转到
2.  面逻辑:
     <%@ page language="java"%>
<%@ taglib uri=" prefix="bean"%>
<%@ taglib uri="
 prefix="html"%>
<
%@taglib uri="<%@taglib uri="
 
<html>
 <head>
  <title>JSP for SelectActionForm form</title>
  <script type="javaScript">
function submitForm()
{
 if(document.form1.selectValue.value=="")
        {
           alert("误入查扑օ键字");
           document.form1.selectValue.focus();
           return false;
        }else
        {
          return true;
        }
}
function toPage()
{
  if(document.form1.pageText.value=="")
  {
            alert("误入要前往的页?);
           document.form1.pageText.focus();
           return false;
  }else
        {
          a=document.form1.pageText.value;
          if(a<=0||a>=${requestScope.pagecount})
             a=${requestScope.page}
          document.form1.action = "selectAction.do?page="+a+"&selectValue=${requestScope.selectValue}";
          return true;
        }
}
</script>
 
 </head>
 <body>
  <center>
   <form name="form1" action="selectAction.do" method="POST">
    <table>
     <tr>
      <td>
       please input:
      </td>
      <td>
       <input type="text" name="selectValue"
        value="${requestScope.selectValue}" />
      </td>
      <td>
       <input type="submit" onclick="submitForm()" value="search" />
      </td>
     </tr>
    </table>
    <c:if test="${not empty sessionScope.selectList}">
     <table border="1" cellpadding="3" cellspacing="3">
      <tr>
       <th>
        ID
       </th>
       <th>
        Name
       </th>
       <th>
        DESC
       </th>
       <th>
        Date
       </th>
       <th>
        CreateBy
       </th>
 
      </tr>
      <c:forEach var="cddate" items="${sessionScope.selectList}">
       <tr>
        <td>
         ${cddate.pageCategoryId}
        </td>
        <td>
         ${cddate.pageItemName}
        </td>
        <td>
         ${cddate.pageItemDesc}
        </td>
        <td>
         ${cddate.pageItemDate}
        </td>
        <td>
         ${cddate.pageItemBy}
        </td>
 
       </tr>
      </c:forEach>
     </table>
     <table>
      <tr>
       <td>
        <a
         href="selectAction.do?action=frist&selectValue=${requestScope.selectValue}">MainPage</a>
       </td>
       <td>
        <c:if test="${requestScope.page==1}">lastPage</c:if>
        <c:if test="${requestScope.page!=1}">
         <a
          href="selectAction.do?action=back&page=${requestScope.page}&selectValue=${requestScope.selectValue}">lastPage</a>
        </c:if>
       </td>
       <td>
        <c:if test="${requestScope.page==requestScope.pagecount}">nextPage</c:if>
        <c:if test="${requestScope.page!=requestScope.pagecount}">
         <a
          href="selectAction.do?action=next&page=${requestScope.page}&selectValue=${requestScope.selectValue}">nextPage</a>
        </c:if>
       </td>
       <td>
        <a
         href="selectAction.do?action=end&selectValue=${requestScope.selectValue}">endPage</a>
       </td>
       <td>
        ${requestScope.page} / ${requestScope.pagecount}
       </td>
       <td>
        changeTo
        <input type="text" size="2" name="pageText"
         onkeyup="value=value.replace(/[^\d]/g,'') "
         onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
         value="${requestScope.page}" />
        <input type="submit" onclick="toPage()" value="GO" />
       </td>
      </tr>
     </table>
    </c:if>
   </form>
  </center>
 </body>
</html>
 

3 . struts-config.xml文g
     <global-forwards>
            <forward name="select" path="/select.jsp" />
     </global-forwards>
     <form-beans>
            <form-bean name="selectActionForm" type="SelectActionForm" />
    </form-beans>
     <action-mappings>
             <action input="/select.jsp" name="selectActionForm" path="/selectAction" scope="request" type="SelectAction" validate="true" />
     </action-mappings>
4. SelectActionForm.java
    import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
 
public class SelectActionForm
    extends ActionForm
{
     private String pageText;          //面~码   
     private String selectValue;       //查询条g关键?br />     public String getPageText()     //跌{到的面
     {
         return pageText;            
     }
 
     public void setPageText(String pageText)
     {
         this.pageText = pageText;
     }
 
     public void setSelectValue(String selectValue)
     {
         this.selectValue = selectValue;
     }
 
     public String getSelectValue()
     {
         return selectValue;
     }
 
     public ActionErrors validate(ActionMapping actionMapping,
                                 HttpServletRequest httpServletRequest)
     { /** @todo: finish this method, this is just the skeleton.*/
         return null;
     }
 
     public void reset(ActionMapping actionMapping,
                      HttpServletRequest servletRequest)
     {
     }
}
5. SelectAction.java
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.Action;
import com.wang.business.BusinessManage;
import com.wang.module.*;
import java.util.*;
 
public class SelectAction
    extends Action
{
    public ActionForward execute(ActionMapping mapping, ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
    {
        SelectActionForm selectForm = (SelectActionForm) form;
        BusinessManage bm = new BusinessManage();
        int page = 1;    //初始化ؓW一?/div>
 
        if (selectForm.getSelectValue() != null)
        {
            // if(request.getParameter("action")!=null)
            if (request.getParameter("page") == null)
            {
                page = 1;
            }
            else
            {
 
                page = Integer.parseInt(request.getParameter("page"));
            }
 
            if (selectForm.getPageText() != null)
            {
                page = Integer.parseInt(selectForm.getPageText());
            }
            if (request.getParameter("action") != null)
            {
                if (request.getParameter("action").equals("frist"))                 {   //跌{到首?br />                    page = 1;
                }
                else if (request.getParameter("action").equals("end"))                //跌{到尾?br />                {
                    page = bm.PAGECOUNT;
                }
                else if (request.getParameter("action").equals("back"))              //跌{C一?br />                {
                    page -= 1;
                }
                else if (request.getParameter("action").equals("next"))                //跌{C一?br />                {
                    page += 1;
                }
            }
 
            List list = bm.selectCDBean(selectForm.getSelectValue(), page, 5);   //面传递三个参?取得的值存放于一个list列表?br />            // ArrayList list1 = new ArrayList(list);
            request.getSession().setAttribute("selectList", list);     //页码集合变量存放于字符串变量selectList?存放于session范围?br />            int pagecount = bm.PAGECOUNT;                         //面L
            request.setAttribute("pagecount", pagecount);
            request.getSession().removeAttribute("selectList");
            request.getSession().setAttribute("selectList", list);
            request.setAttribute("selectValue", selectForm.getSelectValue());
            request.setAttribute("page", page);
            request.setAttribute("pagecount", pagecount);
 
        }
        else
        {
            request.getSession().removeAttribute("selectList");
        }
        bm.close();
        return mapping.findForward("select");
    }
}

6. 业务逻辑
BusinessManage.java
package com.wang.business;
 
import org.hibernate.*;
import org.hibernate.cfg.*;
import com.wang.module.*;
import java.util.*;
 
public class BusinessManage
{
    private SessionFactory sf = null;
    private Session s = null;
    private Transaction ts = null;
    private Query query = null;
    public static int PAGECOUNT;
    public BusinessManage()
    {
        sf = new Configuration().configure().buildSessionFactory();
        s = sf.openSession();
        ts = s.beginTransaction();
    }
 
    public void openSession()
    {
        s = sf.openSession();
    }
 
   
    public List selectCDBean(String value, int page, int count)
    {
        List list = null;
        int pagelast = 0;
        try
        {
            query = s.createQuery("from ViewPage cd where cd.pageItemName like '%"
     + value + "%'");
 
            if (query.list().size() / count == 0)   //|为偶?br />            {
                PAGECOUNT = query.list().size() / count;  //面L
            }
            else
            {
                PAGECOUNT = query.list().size() / count + 1;   //|为基?br />                pagelast = query.list().size() / count;
            }
            int begin = page * count - count;   //count为每|C的U录?
            int end = page * count;
            if (page == PAGECOUNT)
            {
                end = query.list().size();
            }
            list = query.list().subList(begin, end);
        }
        catch (Exception ex)
        {
            list = null;
            ex.printStackTrace();
        }
        return list;
    }
   
    public void close()
    {
        s.close();
    }
}


 
 


HandSoft 2006-12-08 00:53 发表评论
]]>U以人重U亦重,ZU传人可?/title><link>http://www.aygfsteel.com/gavinju/archive/2006/09/27/72295.html</link><dc:creator>HandSoft</dc:creator><author>HandSoft</author><pubDate>Wed, 27 Sep 2006 06:16:00 GMT</pubDate><guid>http://www.aygfsteel.com/gavinju/archive/2006/09/27/72295.html</guid><wfw:comment>http://www.aygfsteel.com/gavinju/comments/72295.html</wfw:comment><comments>http://www.aygfsteel.com/gavinju/archive/2006/09/27/72295.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/gavinju/comments/commentRss/72295.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/gavinju/services/trackbacks/72295.html</trackback:ping><description><![CDATA[ <p>        本h毕业于西安电子科技大学Q本U。热pY件开发,_NJAVA .熟悉Struts,Spring,Hibernate,Jboss,Eclipse{多U开源技术?br />C要从事于Oracle相关产品的开发。有着ERP,CRM,MESpȝ的开发经验,目前正着手于Struts与Ajax技术的集成pȝ的开发,<br />官方l出的AjaxTags也只是测试版Q此技术正处于h阶段。望Ҏ技术有研究的朋友与我联p,l出指点?br />真诚l交IT届同仁,共同学习Q共同交。构建和谐社会?br />QQ: 541638655<br />MSN: <a href="mailto:jucracker@hotmail.com">jucracker@hotmail.com</a><br />Phone: 13817080595</p> <img src ="http://www.aygfsteel.com/gavinju/aggbug/72295.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/gavinju/" target="_blank">HandSoft</a> 2006-09-27 14:16 <a href="http://www.aygfsteel.com/gavinju/archive/2006/09/27/72295.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java API中文版下?/title><link>http://www.aygfsteel.com/gavinju/archive/2006/07/28/60472.html</link><dc:creator>HandSoft</dc:creator><author>HandSoft</author><pubDate>Fri, 28 Jul 2006 01:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/gavinju/archive/2006/07/28/60472.html</guid><wfw:comment>http://www.aygfsteel.com/gavinju/comments/60472.html</wfw:comment><comments>http://www.aygfsteel.com/gavinju/archive/2006/07/28/60472.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.aygfsteel.com/gavinju/comments/commentRss/60472.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/gavinju/services/trackbacks/60472.html</trackback:ping><description><![CDATA[ <h2> <font style="BACKGROUND-COLOR: #0000ff">引言:</font> </h2> <p> <font style="BACKGROUND-COLOR: #0000ff">         如果说我q两q在Sun公司作了哪些对中国开发h员有益的事的话,我想Java API文中文版毫无疑问的应该第一个。我非常清楚仍然有众多开发h员坚持认Z个好的程序员应该完全参考英文版的文,但是我坚信该文的中文版有其存在的意义,因ؓ Java作ؓ一U程序设计语aQ我们希望能够有更多的开发h员——而不仅仅是那些能够熟l阅读英语的清华北大毕业生——来使用它,掌握它,_N它?/font> </p> <p> <font style="BACKGROUND-COLOR: #0000ff">也可以这么说QJava语言的前途,更多取决于草根,而不是精英?/font> </p> <p align="right"> <a > <font style="BACKGROUND-COLOR: #0000ff" color="#002c99">——Sun中国技术社区总负责hQ蒋清野</font> </a> </p> <br /> <font style="BACKGROUND-COLOR: #0000ff">         Java API Docs是学习和使用Java语言中最l常使用的参考资料之一Q完整的Java API文档中文版文共包括32个类库。但是长期以来此文档只有英文版和日文版,对于中国地区的Java开发者来说相当的不便。通过Sun公司的翻译团?0个月的不懈努力以及广大网友的热心支持QJava API中文文的翻译工作如期完成,呈现C国广大的Java用户和学习者面?br /><br /><a >http://java.csdn.net/subject/Java%20API/index.html</a></font> <img src ="http://www.aygfsteel.com/gavinju/aggbug/60472.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/gavinju/" target="_blank">HandSoft</a> 2006-07-28 09:33 <a href="http://www.aygfsteel.com/gavinju/archive/2006/07/28/60472.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Open Workbenchhttp://www.aygfsteel.com/gavinju/archive/2006/07/28/60469.htmlHandSoftHandSoftFri, 28 Jul 2006 01:28:00 GMThttp://www.aygfsteel.com/gavinju/archive/2006/07/28/60469.htmlhttp://www.aygfsteel.com/gavinju/comments/60469.htmlhttp://www.aygfsteel.com/gavinju/archive/2006/07/28/60469.html#Feedback0http://www.aygfsteel.com/gavinju/comments/commentRss/60469.htmlhttp://www.aygfsteel.com/gavinju/services/trackbacks/60469.html Open WorkbenchQMS Project的杀?br />来自开源社区的Open Workbench有着与Microsoft Project相匹敌的丰富功能。虽然它q不能像Microsoft Project那样Q提供支持C/Sl构下的企业U多人协作的目理模式。但在单Z用的情况下,可以满多数开发团队的目理需求?img height="94" alt="t_IBM.jpg" src="http://www.aygfsteel.com/images/blogjava_net/gavinju/13429/t_IBM.jpg" width="120" border="0" />



HandSoft 2006-07-28 09:28 发表评论
]]>
Compiere ERP&CRMhttp://www.aygfsteel.com/gavinju/archive/2006/07/27/60410.htmlHandSoftHandSoftThu, 27 Jul 2006 11:54:00 GMThttp://www.aygfsteel.com/gavinju/archive/2006/07/27/60410.htmlhttp://www.aygfsteel.com/gavinju/comments/60410.htmlhttp://www.aygfsteel.com/gavinju/archive/2006/07/27/60410.html#Feedback0http://www.aygfsteel.com/gavinju/comments/commentRss/60410.htmlhttp://www.aygfsteel.com/gavinju/services/trackbacks/60410.html Compiere ERP&CRM为全球范围内的中型企业提供l合型解x案,覆盖从客L理、供应链到胦务管理的全部领域Q支持多l织、多币种、多会计模式、多成本计算、多语种、多E制{国际化Ҏ。易于安装、易于实施、易于用。只需要短短几个小Ӟ您就可以使用甌-采购-发票-付款、报?订单-发票-收款、品与定h、资产管理、客户关pR供应商关系、员工关pR经营业l分析等强大功能了?br /> 
主页 http://www.compiere.org/


HandSoft 2006-07-27 19:54 发表评论
]]>
վ֩ģ壺 | | | | | ɽ| | | | | | ¬| | | | | | | | | Դ| ɽ| | | | ˹| ƽ| Զ| Ϫ| | | ɽ| | | ƽ| | | | | | |