<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 閱讀(593) 評論(0)  編輯  收藏 所屬分類: web
    主站蜘蛛池模板: 亚洲AV日韩精品久久久久久| 亚洲国产高清精品线久久| 亚洲AV日韩AV永久无码免下载| 久久九九久精品国产免费直播| 亚洲综合最新无码专区| 国产尤物在线视精品在亚洲| 四虎免费在线观看| 亚洲精品无码高潮喷水A片软| 在线观看人成视频免费| 亚洲jizzjizz少妇| 亚洲精品无码久久久久AV麻豆| 美女裸免费观看网站| 亚洲无码黄色网址| 两个人的视频www免费| 亚洲AV成人一区二区三区AV| 一区二区三区观看免费中文视频在线播放| 亚洲国产老鸭窝一区二区三区| 亚洲电影免费在线观看| 精品亚洲AV无码一区二区| 日日夜夜精品免费视频| 特黄特色的大片观看免费视频| 国产亚洲精品一品区99热| 色欲色香天天天综合网站免费| 亚洲国产精品专区| 国产又粗又长又硬免费视频| 中文字幕手机在线免费看电影 | 嫩草影院在线播放www免费观看| 亚洲图片在线观看| 成全影视免费观看大全二| 免费一区二区三区在线视频 | 亚洲黄网在线观看| 日韩免费观看视频| a毛片免费全部播放完整成| 亚洲精品视频在线免费| 麻豆国产人免费人成免费视频| 精品免费久久久久国产一区 | 国产va免费精品| 亚洲欧洲综合在线| 亚洲av区一区二区三| 99re这里有免费视频精品| 无码天堂va亚洲va在线va|