summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/services
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-02-15 17:31:02 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-02-15 17:31:02 (GMT)
commit59eaf16598bd4a323b82017f8542b794542acf63 (patch)
tree05c3999aa79c2fb70e319161cf9342ebdbc07a17 /idrop-web/grails-app/services
parent26c8e6084e5f83ae130358c26713cde506e805d4 (diff)
downloadQCG-Data-59eaf16598bd4a323b82017f8542b794542acf63.zip
QCG-Data-59eaf16598bd4a323b82017f8542b794542acf63.tar.gz
QCG-Data-59eaf16598bd4a323b82017f8542b794542acf63.tar.bz2
[#1204] cleanup initial view (should be info)
Diffstat (limited to 'idrop-web/grails-app/services')
-rw-r--r--idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy21
1 files changed, 21 insertions, 0 deletions
diff --git a/idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy b/idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy
index baabfcb..228e00e 100644
--- a/idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy
+++ b/idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy
@@ -52,6 +52,27 @@ class ViewStateService {
return viewState.browseView
}
+ /**
+ * Save a path and mode in the view state for later retrieval
+ * @param viewMode
+ * @param absolutePath
+ */
+ public ViewState saveViewModeAndSelectedPath(String viewMode, String absolutePath) {
+
+ if (viewMode == null) {
+ throw new IllegalArgumentException("null viewMode")
+ }
+
+ if (absolutePath == null) {
+ throw new IllegalArgumentException("null absolutePath")
+ }
+
+ ViewState viewState = getViewStateFromSessionAndCreateIfNotThere()
+ viewState.browseView = viewMode
+ viewState.selectedPath = absolutePath
+ return viewState
+ }
+
public void saveViewMode(String viewMode) {
if (viewMode == null) {
throw new IllegalArgumentException("null viewMode")