<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-60  評(píng)論-138  文章-1  trackbacks-0

    目前是草稿:

    model:

    public class Notice {
     
    /**
      * primary key of the notice
      
    */

     Integer id 
    = new Integer(0);

     
    /**
      * name of the notice
      
    */

     String name;

     
    /**
      * the content of notice
      
    */

     String content;

     
    /**
      * 加入時(shí)間
      
    */

     java.sql.Date addDate;

        <create creator="new" javascript="NoticeManager">
                
    <param name="class" value="com.****.manager.NoticeDao" />
                
    <include method="ajaxSaveOrUpdate" />
                
    <include method="getForAjax" />
                
    <include method="deleteForAjax"/>
                
    <include method="getSixNotice"/>
                
    <include method="getLastNotice"/>
            
    </create>
            
    <convert converter="bean"
                match
    ="*****.model.Notice">
                
    <param name="include"
                    value
    ="id,name,content" />
            
    </convert>
        
    </allow>
        
    <signatures>
            
    <![CDATA[
           
    import java.util.Map;
           
    import java.util.List;
           
    import javax.servlet.http.HttpServletRequest;

           NoticeManager.ajaxSaveOrUpdate(Map map);



    dao:
    public String ajaxSaveOrUpdate(java.util.Map requstMap) {
            String backString 
    = "1";
            Notice notice 
    = new Notice();
            Object id 
    = requstMap.get("id");
            
    if (null == id || StringUtils.isBlank(id.toString())) {
                notice.setId(
    new Integer(0));
            }
     else {
                notice.setId(NumberUtils.createInteger(id.toString()));
            }

            notice.setName(requstMap.get(
    "name").toString());
            notice.setContent(requstMap.get(
    "content").toString());
            saveOrUpdate(notice);
            
    return backString;
        }



    界面:

    function addDeviceList(){
            var win 
    = window.frames.Editor.frames.HtmlEditor;
           var obj 
    = win.document.body;
           var data;
               data
    ={
                  id:document.noticeForm.all[
    "id"].value,
                  name:document.noticeForm.all[
    "name"].value,
                  content:obj.innerHTML
                  }
    ;
           NoticeManager.ajaxSaveOrUpdate(data,refreshDataGride);
         }

        function refreshDataGride()
    {
            alert(
    "操作成功");
            ECSideUtil.reload(
    "ec");
        }





    <table width="100%" height="30" border="0" cellpadding="0"
                            cellspacing
    ="0">
                            
    <tr>
                                
    <td>
                                    
    <ec:table items="notices" title="公告列表" tableId="ec" var="notice"
                                        action
    ="notice.notice?method=list" cellspacing="0" width="100%"
                                        showPrint
    ="false" resizeColWidth="true"
                                        maxRowsExported
    ="10000000" sortable="true" useAjax="false"
                                        retrieveRowsCallback
    ="limit" listWidth="100%">
                                        
    <ec:row ondblclick="getById(${notice.id})">
                                            
    <ec:column width="23" cell="checkbox" headerCell="checkbox"
                                                alias
    ="deleteFlag" value="${notice.id}" viewsAllowed="html" />
                                            
    <ec:column property="name" width="550" title="名稱(chēng)" />
                                            
    <ec:column width="80" property="addDate" cell="date"
                                                title
    ="發(fā)布時(shí)間" />
                                        
    </ec:row>
                                        
    <ec:extend location="bottom">
                                            
    <div style="text-align:center;width:100%;padding:3px">
                                                
    <button type="button" onclick="deleteUserInfo();"
                                                    style
    ="width:120px">
                                                    
    <font color="red">刪除</font>列表數(shù)據(jù)
                                                
    </button>
                                            
    </div>
                                        
    </ec:extend>
                                    
    </ec:table>
                                
    </td>
                            
    </tr>
                        
    </table>
                        
    <form name="noticeForm">
                            
    <input type="hidden" name="id" />
                            
    <table border="0" cellpadding="0" cellspacing="0"
                                
    class="simpleFormTable" width="100%">
                                
    <tr>
                                    
    <td id="lablearea" class="tableTitle3" style="cursor:pointer;"
                                        onclick
    ="showHide('addUserZone',this)">
                                        
    +
                                        
    <input type="button" class="formButton" value="添加公告">
                                    
    </td>
                                
    </tr>
                                
    <tr id="addUserZone" style="display:none;">
                                    
    <td>
                                        
    <table id="table_notice" width="100%" cellpadding="0"
                                            cellspacing
    ="0">
                                            
    <tr>
                                                
    <Th width="25%" id="notice_th">
                                                    名稱(chēng)
                                                
    </th>
                                                
    <th width="75%" id="notice_th">
                                                    
    <input type="text" name="name"></input>
                                                
    </th>
                                            
    </tr>
                                            
    <tr>
                                                
    <Th id="notice_th" colspan="2">
                                                    內(nèi)容
                                                
    </th>
                                            
    </tr>
                                            
    <tr>
                                                
    <th colspan="2" height="50" id="notice_th">
                                                    
    <textarea name="content" style="display:none"></textarea>
                                                    
    <iframe ID="Editor" name="Editor"
                                                        src
    ="/common/HtmlEditor/index.html?ID=content"
                                                        frameBorder
    ="0" marginHeight="0" marginWidth="0"
                                                        scrolling
    ="No" style="height:320px;width:100%"></iframe>
                                                
    </th>
                                            
    </tr>
                                            
    <tr>
                                                
    <td colspan="2">
                                                    
    <input type="button" class="formButton" value="確認(rèn)"
                                                        onclick
    ="addDeviceList()">
                                                    
    &#160;&#160;&#160;&#160;
                                                    
    <input class="formButton" type="reset">
                                                
    </td>
                                            
    </tr>
                                        
    </table>
                                    
    </td>
                                
    </tr>
                            
    </table>
                        
    </form>


    posted on 2007-05-30 15:19 張氏兄弟 閱讀(929) 評(píng)論(0)  編輯  收藏

    只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲色欲色欲www| 国产亚洲精久久久久久无码| 免费国产小视频在线观看| 免费又黄又爽又猛的毛片| 久久亚洲av无码精品浪潮| 亚洲av无码国产精品夜色午夜| 亚洲AV午夜成人片| 亚洲av永久无码精品三区在线4| 亚洲精品天堂成人片AV在线播放| 美女免费精品高清毛片在线视| 久草免费福利在线| 中文字幕成人免费视频| 永久免费看bbb| 亚洲午夜久久久久久久久久| 亚洲不卡1卡2卡三卡2021麻豆| 国产亚洲视频在线| 99精品免费观看| 成年女人毛片免费播放视频m| 亚洲成年看片在线观看| 亚洲av无码一区二区三区网站| 亚洲一级毛片在线观| 日日躁狠狠躁狠狠爱免费视频| 日日麻批免费40分钟无码| 精品无码国产污污污免费| 亚洲最大AV网站在线观看| 久久精品国产亚洲AV久| 国产成人无码精品久久久免费 | 一级毛片不卡片免费观看| 国内精品乱码卡1卡2卡3免费| 亚洲精品偷拍视频免费观看 | 亚洲精品无码久久久久| 亚洲一卡二卡三卡| 国产免费一级高清淫曰本片| 免费三级毛片电影片| 亚洲综合无码AV一区二区| 国产亚洲精品VA片在线播放| 久久久久久久久久免免费精品| 成人a视频片在线观看免费| 亚洲精品国产美女久久久| 亚洲乱码国产乱码精华| 一级做a爰全过程免费视频|