Mercurial > libervia-web
diff libervia/server/pages.py @ 1390:3e482795630c
pages: implement `getPageData` and `setPageData` helper methods
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 27 Feb 2021 21:00:21 +0100 |
parents | 21d30f5d582a |
children | e11a71a08a48 |
line wrap: on
line diff
--- a/libervia/server/pages.py Sat Feb 27 20:58:22 2021 +0100 +++ b/libervia/server/pages.py Sat Feb 27 21:00:21 2021 +0100 @@ -1618,6 +1618,16 @@ request.data = {} return request.data + def getPageData(self, request, key): + """Helper method to retrieve reload resistant data""" + sat_session = self.host.getSessionData(request, session_iface.ISATSession) + return sat_session.getPageData(self, key) + + def setPageData(self, request, key, value): + """Helper method to set reload resistant data""" + sat_session = self.host.getSessionData(request, session_iface.ISATSession) + return sat_session.setPageData(self, key, value) + def handleSearch(self, request, extra): """Manage Full-Text Search