Mercurial > libervia-web
changeset 1390:3e482795630c
pages: implement `getPageData` and `setPageData` helper methods
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 27 Feb 2021 21:00:21 +0100 |
parents | ac4173fff71d |
children | fc20818a5266 |
files | libervia/server/pages.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
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