Package org.zkoss.zss.demo

Examples of org.zkoss.zss.demo.ComputerBean


    File csv = new File(Executions.getCurrent().getDesktop().getWebApp().getRealPath("/WEB-INF/xls/demo/data.csv"));
    CSVReader reader = new CSVReader(new FileReader(csv));
    List data = new ArrayList();
    String[] nextLine;
      while ((nextLine = reader.readNext()) != null) {
        ComputerBean computerBean = new ComputerBean();
        computerBean.setId(nextLine[0]);
        computerBean.setProduct(nextLine[1]);
        computerBean.setBrand(nextLine[2]);
        computerBean.setModel(nextLine[3]);
        computerBean.setSerialNumber(nextLine[4]);
        computerBean.setDate(nextLine[5]);
        computerBean.setWarrantyTime(nextLine[6]);
        computerBean.setCost(Double.valueOf(nextLine[7]).doubleValue());
        computerBean.setOs(nextLine[8]);
        computerBean.setSalvage(Double.valueOf(nextLine[9]).doubleValue());
          data.add(computerBean);
      }
      return data;
  }
View Full Code Here


    File csv = new File(Executions.getCurrent().getDesktop().getWebApp().getRealPath("/WEB-INF/xls/demo/data.csv"));
    CSVReader reader = new CSVReader(new FileReader(csv));
    List<ComputerBean> data = new ArrayList<ComputerBean>();
    String[] nextLine;
      while ((nextLine = reader.readNext()) != null) {
        ComputerBean computerBean = new ComputerBean();
        computerBean.setId(nextLine[0]);
        computerBean.setProduct(nextLine[1]);
        computerBean.setBrand(nextLine[2]);
        computerBean.setModel(nextLine[3]);
        computerBean.setSerialNumber(nextLine[4]);
        computerBean.setDate(nextLine[5]);
        computerBean.setWarrantyTime(nextLine[6]);
        computerBean.setCost(Double.valueOf(nextLine[7]).doubleValue());
        computerBean.setOs(nextLine[8]);
        computerBean.setSalvage(Double.valueOf(nextLine[9]).doubleValue());
          data.add(computerBean);
      }
      return data;
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.demo.ComputerBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.