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

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

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

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks
    項目中客戶提了一個要求,在進行完操作離開表格頁面后,如果再回到這個頁面,要求能保存以前離開時的樣子,(排序,過濾和條目屬性等等。)
    剛開始自己研究了一下代碼,新建一個form來儲存TableFacade的limit屬性到session里,實現了這個功能。
    后來發想Jmesa本身就有一個stateAttr屬性用來保存狀態,wiki中有詳細的使用說明:
    State  

    The State interface is used to set and retrieve the table Limit. Implementations will set the Limit so that it can be retrieved at a later time. This is useful so a user can return to a specific table with it filtered, sorted, and paged exactly like they left it.

    All you have to do is set the stateAttr to the parameter to look for in the url, or the attribute in the request, to tip the table off that the Limit in the users session should be used.

    Example

    For example in the TableFacade just pass in the name of the parameter to use:

    TableFacade tableFacade =TableFacadeFactory.createTableFacade(id, request);
    tableFacade.setStateAttr("restore");

    The same goes for using the tags:

    <jmesa:tableFacade
            id="basic"
            stateAttr="restore"
            ...
            >

    As you can see in the following example, by passing in a parameter of "restore=true" then the table is rendered in the same way that you left it. That is really all there is too it!

    Note: Just be sure that you have a unique table id for each table that you define. Technically the Limit object for each table is stored in the users session keyed by the table id. If the tables are not unique then you will overwrite one Limit with another.



    posted on 2009-01-21 10:51 seal 閱讀(587) 評論(0)  編輯  收藏 所屬分類: web
    主站蜘蛛池模板: 亚洲精品国产精品乱码不卞 | 77777亚洲午夜久久多人| 亚洲成人国产精品| 亚洲精品一品区二品区三品区| 亚洲美女又黄又爽在线观看| 亚洲阿v天堂在线| 亚洲综合无码无在线观看| 暖暖免费中文在线日本 | 欧美色欧美亚洲另类二区| 人妖系列免费网站观看| 67pao强力打造高清免费| 免费的涩涩视频在线播放| 中文字幕亚洲不卡在线亚瑟| 久久亚洲AV成人无码国产| 羞羞视频在线免费观看| 亚洲成人在线免费观看| 一区国严二区亚洲三区| 亚洲日日做天天做日日谢| 西西人体免费视频| 免费观看亚洲人成网站| 亚洲国产精品久久网午夜| 两个人看的www高清免费观看| 午夜免费福利影院| 亚洲人成777在线播放| 国产一级一毛免费黄片| 国产一区二区三区免费在线观看| 亚洲美免无码中文字幕在线| 美女巨胸喷奶水视频www免费| 国产成人免费永久播放视频平台 | 十八禁在线观看视频播放免费| 免费无码不卡视频在线观看| 久久夜色精品国产噜噜噜亚洲AV | 成人无码WWW免费视频| 国产午夜亚洲精品午夜鲁丝片| 久久亚洲精品无码av| 成人免费看黄20分钟| 18禁亚洲深夜福利人口| 免费一级做a爰片性色毛片| 午夜亚洲乱码伦小说区69堂| 一级毛片直播亚洲| av午夜福利一片免费看久久|