root/trunk/grails-app/controllers/dbnp/query/QueryController.groovy @ 315

Revision 315, 2.0 KB (checked in by ademcan, 4 years ago)

query webflow

  • Property svn:keywords set to Author Rev Date
Line 
1package dbnp.query
2
3import org.compass.core.engine.SearchEngineQueryParseException
4
5/*
6 * Copyright 2007 the original author or authors.
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 *      http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21
22/**
23 * Basic web interface for Grails Searchable Plugin
24 *
25 * @author Adem and Jahn
26 */
27class QueryController {
28
29    def searchableService
30
31    def index = {
32        redirect( action:'pages')
33    }
34
35    def pagesFlow = {
36       
37        onStart {
38                flow.page = 0
39                        flow.pages = [
40                                [title: 'Study'],
41                                [title: 'Samples'],
42                                [title: 'Biomarkers'],
43                                [title: 'Groups'],
44                                [title: 'Done']
45                        ]
46        }
47
48        mainPage {
49
50             render( view:'/query/mainPage')
51
52             onRender {
53                println "done randering index"
54             }
55
56
57             on("next") {
58                println "clicked next in sample"
59             } .to 'study'
60
61        }       
62
63
64        study {
65             render( view:'_study')
66
67             on("next") {
68                println "clicked next in sample"
69             } .to 'sample'
70
71        }
72
73
74
75        sample {
76             render( view:'_sample')
77
78             on("next") {
79                println "clicked next in sample"
80             } .to 'biomarker'
81
82        }
83
84
85        biomarker {
86             render( view:'_biomarker')
87
88             on("next") {
89                println "clicked next in sample"
90             } .to 'group'
91
92        }
93
94
95        group {
96             render( view:'_group')
97
98             on("next") {
99                println "clicked next in sample"
100             } .to 'result'
101
102        }
103
104
105
106        result {
107             render( view:'_result')
108
109        }
110
111
112
113
114
115
116
117
118
119
120
121
122
123    }
124
125}
Note: See TracBrowser for help on using the browser.