from http://dengyin2000.javaeye.com/blog/47452a) @Persist("client")b) @Persist("client:page")c) @Persist("client:app")a) is the same as b). If you use b) for a property x for page Foo, thenyou can get back the property only if the navigation is Foo => Foo. If thenavigation is Foo => Bar => Foo, then it will be lost when Bar isinvoked. In contrast, if you use c), then it will be maintained allthe way.client 跟 session是一樣的效果只是實(shí)現(xiàn)的方式不一樣, 一個(gè)是存在cookie或url中另一個(gè)是存在http session中。client:page session:page 僅在當(dāng)前頁(yè)面有用, 假如轉(zhuǎn)到其他頁(yè)面 這個(gè)屬性值就失效了。client:app session:app 對(duì)于整個(gè)application都有效, 轉(zhuǎn)到其他頁(yè)面再轉(zhuǎn)回來(lái)的話這個(gè)值仍然存在。如果我們想讓他失效怎么辦呢?你可以調(diào)用這個(gè)方法cycle.forgetPage("YourPageName").
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。