Last change
on this file since 372 was
372,
checked in by duh, 13 years ago
|
- css changes
- termEditor changes
- templateEditor changes
- etc
|
-
Property svn:keywords set to
Date Author Rev
|
File size:
1.1 KB
|
Line | |
---|
1 | /** |
---|
2 | * TermEditorController Controler |
---|
3 | * |
---|
4 | * Webflow driven term editor |
---|
5 | * |
---|
6 | * @author Jeroen Wesbeek |
---|
7 | * @since 20100420 |
---|
8 | * @package studycapturing |
---|
9 | * |
---|
10 | * Revision information: |
---|
11 | * $Rev: 372 $ |
---|
12 | * $Author: duh $ |
---|
13 | * $Date: 2010-04-22 13:45:22 +0000 (do, 22 apr 2010) $ |
---|
14 | */ |
---|
15 | package dbnp.studycapturing |
---|
16 | |
---|
17 | class TermEditorController { |
---|
18 | /** |
---|
19 | * index closure |
---|
20 | */ |
---|
21 | def index = { |
---|
22 | // got a ontology get parameter? |
---|
23 | def ontology = (params.ontology) ? params.ontology : null |
---|
24 | |
---|
25 | // enter the flow! |
---|
26 | redirect(action: 'pages', params:["ontology":ontology]) |
---|
27 | } |
---|
28 | |
---|
29 | /** |
---|
30 | * Webflow |
---|
31 | */ |
---|
32 | def pagesFlow = { |
---|
33 | // start the flow |
---|
34 | onStart { |
---|
35 | println "start term / ontology editor flow" |
---|
36 | |
---|
37 | if (params.ontology) { |
---|
38 | flow.ontologies = [] |
---|
39 | params.ontology.split(/\,/).each() { ncboId -> |
---|
40 | // trim the id |
---|
41 | ncboId.trim() |
---|
42 | |
---|
43 | // and add to the flow scope |
---|
44 | flow.ontologies[ flow.ontologies.size() ] = ncboId |
---|
45 | } |
---|
46 | |
---|
47 | /*** EXAMPLE OF HOW TO FETCH ONTOLOGY INSTANCES |
---|
48 | * ontologies.each() { |
---|
49 | * println Ontology.findAllByNcboId( it ) |
---|
50 | * } |
---|
51 | */ |
---|
52 | } |
---|
53 | } |
---|
54 | |
---|
55 | // main term editor page |
---|
56 | terms { |
---|
57 | render(view: "/termEditor/terms") |
---|
58 | onRender { |
---|
59 | println "renderderender!" |
---|
60 | } |
---|
61 | on("next").to "start" |
---|
62 | } |
---|
63 | } |
---|
64 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.