浏览 2194 次
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-05-12
1:<managed-bean> <managed-bean-name>equip</managed-bean-name> <managed-bean-class> com.ytyet.computermm.Equip </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>equipbean</managed-bean-name> <managed-bean-class> com.ytyet.computermm.EquipBean </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> 2:页面 计划号<TD colspan=3><h:outputText id='planGroupidotx' value="#{equipindxedit.planGroupid}" /> 3:后台方法就不贴数据库类了 那个没问题 (EquipBean 是实体类) public String searchEquipEdit(){ try { equipindxedit = new ArrayList(); DBConnect dbc = null; ResultSet rs = null; System.out.println("to DEtail2222"); String mcvalue = (String) linkequip.getValue(); System.out.println(formbean == null); try { dbc = new DBConnect (); dbc.prepareStatement("select planGroupid,projectId,assetId,equipName,equipBrand,equipType,equipCollocate,equipPrice,storeroomTime,bestowUnits,serial,equipState from Equip where assetId = ? "); dbc.setString(1, mcvalue); rs = dbc.executeQuery(); while(rs.next()){ String planGroupid = rs.getString("planGroupid"); EquipBean equipba = new EquipBean(); equipba.setPlanGroupid(planGroupid); equipindxedit.add(equipba); System.out.println(equipba.getPlanGroupid()); } } catch (Exception e) { e.printStackTrace(); } } catch (Exception e) { e.printStackTrace(); } return "toEquipEdit"; }} 为什么把对象equipba放入list里 页面用控件datatable就能显示出数据,而换成<h:outputText 或者<h:inputtext就不行呢? 我哪里有错?请来...谢谢 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |