锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲缚视频在线观看,97久久精品视频,99中文字幕一区http://www.aygfsteel.com/lzbaoyu/娌℃湁鏈濂?鍙湁鏇村ソ.zh-cnThu, 19 Jun 2025 15:23:38 GMTThu, 19 Jun 2025 15:23:38 GMT60- Java寮婧愭灦鏋凧don搴旂敤緋葷粺妗堜緥寮鍙?http://www.aygfsteel.com/lzbaoyu/archive/2006/03/15/35385.html瀹濋挵瀹濋挵Wed, 15 Mar 2006 04:35:00 GMThttp://www.aygfsteel.com/lzbaoyu/archive/2006/03/15/35385.htmlhttp://www.aygfsteel.com/lzbaoyu/comments/35385.htmlhttp://www.aygfsteel.com/lzbaoyu/archive/2006/03/15/35385.html#Feedback0http://www.aygfsteel.com/lzbaoyu/comments/commentRss/35385.htmlhttp://www.aygfsteel.com/lzbaoyu/services/trackbacks/35385.html聽銆銆浠g爜錛氫笁姝ヤ唬鐮佺紪鍐?br />聽絎竴姝ャ佽〃鐜板眰緙栧啓涓涓煡璇ction錛岀戶鎵縅don妗嗘灦鐨刢om.jdon.strutsutil.ModelListAction錛岃綾誨悕縐頒負sample.web. MessageListAction錛屽畬鎴恎etPageIterator鍜宖indModelByKey涓や釜鏂規硶銆?銆銆鍏朵腑getPageIterator鏂規硶鍐呭鏄笟鍔″眰MessageService鐨勮皟鐢細 MessageService messageService= (MessageService) WebAppUtil.getService("messageService",request); return messageService.getAllMessages(start, count); 銆銆鎵浠essageService鎺ュ彛涓繀欏繪湁getAllMessages榪欎釜鏂規硶錛屼富瑕佸姛鑳芥槸榪斿洖PageIterator瀵硅薄 findModelByKey鏂規硶鍐呭涔熸槸涓氬姟灞侻essageService鐨勮皟鐢細 MessageService messageService= (MessageService) WebAppUtil.getService("messageService", request); return messageService.getMessage((String)key); 銆銆MessageService鎺ュ彛涓繀欏繪湁getMessage鏂規硶銆?br />絎簩姝ャ佷笟鍔″眰瀹炵幇MessageService鎺ュ彛鏂規硶getAllMessages鍐呭錛屼竴鑸槸鐩存帴璋冪敤鎸佷箙灞侻essageDao鏂規硶銆?br />絎笁姝ャ佹寔涔呭眰瀹炵幇榪斿洖PageIterator瀵硅薄錛?public PageIterator getMessages(int start, int count) throws Exception { 銆String GET_ALL_ITEMS_ALLCOUNT = "select count(1) from testmessage "; 銆String GET_ALL_ITEMS = "select messageId from testmessage "; 銆return pageIteratorSolverOfMessage. getPageIterator (GET_ALL_ITEMS_ALLCOUNT, GET_ALL_ITEMS, "",start, count); } 銆銆濡傛灉鏈夊弬鏁幫紝鍙互濡備笅鏌ヨ錛?public PageIterator getMessages(Long categoryId, int start, int count) { 銆String GET_ALL_ITEMS_ALLCOUNT = "select count(1) from message where categoryId = ? "; 銆String GET_ALL_ITEMS = "select messageId from message where categoryId = ? "; 銆Collection params = new ArrayList(1); 銆params.add(categoryId);//鍙傛暟鏀懼湪Collection涓return pageIteratorSolver.getPageIterator(GET_ALL_ITEMS_ALLCOUNT, GET_ALL_ITEMS, params, start, count); }
閰嶇疆涔嬩竴錛?br />Jdon妗嗘灦閰嶇疆鏂囦歡
聽聽聽 銆鏈楠や富瑕佹槸闇瑕佸憡璇塲donframework.xml鎴戜滑鐨凪essageService瀹炵幇瀛愮被鏄粈涔堬紝浠ュ強璋冪敤鐨凪essageDao絳夌粍浠訛紝jdonframework.xml濡備笅錛?br />聽錛渟ervices錛炪錛減ojoService name="messageService" class="sample.service.MessageServiceImp"/錛?br />錛渃omponent name="messageDAO" class="sample.dao.MessageDAO"/錛?br />聽錛渃omponent name="constants" class="sample.Constants"錛?br />錛渃onstructor value="java:/TestDS"/錛烇紲/component錛?錛?services錛?br />聽鍥犱負MessageServiceImp綾諱腑璋冪敤浜哅essageDAO錛孧essageDAO涓張娑夊強JNDI鍚嶇О錛屾墍浠ュ畠浠箣闂翠緷璧栧叧緋婚潬Jdon妗嗘灦鐨処OC瀹瑰櫒瀹炵幇銆侻essageServiceImp蹇呴』鏈夋瀯閫犲櫒濡備笅錛?br />聽public class MessageServiceImp implements MessageService{ 銆private MessageDAO messageDAO; 銆public MessageServiceImp(MessageDAO messageDAO){ 銆銆this.messageDAO = messageDAO; 銆} }
聽閰嶇疆涔嬩簩錛氱晫闈㈡祦紼嬮厤緗?
銆銆榪欎竴姝ヤ富瑕佹槸struts-config.xml閰嶇疆錛屽拰閫氬父struts鐨凙ctionForm鍜孉ction閰嶇疆綾諱技錛?錛渇orm-beans錛炪銆鈥︹?錛渇orm-bean name="listForm" type="com.jdon.strutsutil.ModelListForm" /錛烇紲/form-beans錛?br />鍏朵腑com.jdon.strutsutil.ModelListForm鏄鏋舵壒閲忔煡璇㈢壒鍒嬌鐢ㄧ殑綾匯?br />聽錛渁ction name="listForm" path="/messageListAction" type="sample.web.MessageListAction" scope="request"錛烇紲forward name="success" path="/messageList.jsp" /錛烇紲/action錛?br />鍏朵腑sample.web.MessageListAction鏄垜浠墠闈唬鐮佺紪鍐欓儴鍒嗙紪鍐欑殑浠g爜銆傝繖鏍鳳紝瀹㈡埛绔祻瑙堝櫒閫氳繃http://localhost:8080/ messageListAction.do灝卞彲浠ュ疄鐜版墍鏈塎essage鎵歸噺鍒嗛〉鏌ヨ鏄劇ず銆?br />娉ㄦ剰錛宮essageList.jsp涓紪鐮佸拰閫氬父Struts鐨凧sp緙栫爜鏄竴鏍風殑錛岄渶瑕佷嬌鐢╨ogic:iterator浠嶢ctionForm涓簂istForm鐨刲ist瀛楁涓幏鍙栧崟涓殑Message瀵硅薄錛岀劧鍚庢樉紺鴻繖浜涘崟涓狹essage瀵硅薄,錛?br />濡備笅錛?
錛渓ogic:iterate indexId="i" id="message" name="listForm" property="list" 錛?br />聽錛渂ean:write name="message" property="name" /錛?......... 錛?logic:iterate
鍦╩essageList.jsp涓姞鍏ヤ笅闈㈡爣絳懼簱鍙互鑷姩鏄劇ず澶氶〉錛岀己鐪佷竴涓〉闈㈡樉紺?0涓潯鐩?錛淢ultiPages:pager actionFormName="listForm" page="/messageListAction.do"錛?
錛淢ultiPages:prev name="[Prev ]" /錛烇紲MultiPages:index displayCount="1" /錛烇紲MultiPages:next name="[Next ]" /錛烇紲/MultiPages:pager錛?br />妯″瀷Message鐨勬壒閲忔煡璇㈠姛鑳藉凡緇忓叏閮ㄥ畬鎴愩?img src ="http://www.aygfsteel.com/lzbaoyu/aggbug/35385.html" width = "1" height = "1" />
]]>
主站蜘蛛池模板:
阿拉善左旗|
静乐县|
灵石县|
广宁县|
绿春县|
洛阳市|
淅川县|
丹东市|
志丹县|
常山县|
青川县|
河北区|
虞城县|
江门市|
临夏县|
如皋市|
青川县|
道孚县|
类乌齐县|
舒城县|
宿迁市|
黑河市|
高密市|
上饶县|
文成县|
陵川县|
彰武县|
通化市|
安新县|
买车|
达州市|
北碚区|
宜丰县|
芦山县|
绍兴县|
荔浦县|
库尔勒市|
常德市|
泽州县|
海门市|
广东省|