source: trunk/grails-app/views/wizard/pages/_study.gsp @ 240

Last change on this file since 240 was 240, checked in by duh, 11 years ago
  • added ajaxOnChange parameter support for <wizard:...> elements. ajaxOnChange now performs an ajaxSubmit to the current form. Usefull for handeling select changes and dynamic forms. When using the ajaxOnChange attribute you can also add the 'url', 'update' and 'afterSuccess' parameters. In your webflow the action is triggered that you put in the ajaxOnChange argument.
  • example:

<wizard:templateElement name="template" description="Template" value="${study?.template}" entity="${dbnp.studycapturing.Subject}" ajaxOnChange="switchTemplate" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" >

The template to use for this study

</wizard:templateElement>

Will submit on change, triggering the 'switchTemplate' action in your current webflow:

on("switchTemplate") {

println params

}.to "study"

  • Property svn:keywords set to Rev Author Date
File size: 2.5 KB
Line 
1<%
2/**
3 * Study page
4 *
5 * @author  Jeroen Wesbeek
6 * @since   20100113
7 * @package wizard
8 * @see     dbnp.studycapturing.WizardTagLib::previousNext
9 * @see     dbnp.studycapturing.WizardController
10 *
11 * Revision information:
12 * $Rev: 240 $
13 * $Author: duh $
14 * $Date: 2010-03-05 16:26:05 +0000 (vr, 05 mrt 2010) $
15 */
16%>
17<wizard:pageContent>
18        <span class="info">
19                <span class="title">Define the basic properties of your study</span>
20                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce laoreet leo nec leo vehicula quis scelerisque elit pulvinar. Vivamus arcu dui, adipiscing eu vestibulum id, consectetur et erat. Aenean risus mauris, placerat et lacinia vulputate, commodo eget ligula. Pellentesque ornare blandit metus ac dictum. Donec scelerisque feugiat quam, a congue ipsum malesuada nec. Donec vulputate, diam eget porta rhoncus, est mauris ullamcorper turpis, vitae dictum risus justo quis justo. Aenean blandit feugiat accumsan. Donec porttitor bibendum elementum.
21        </span>
22       
23        <wizard:templateElement name="template" description="Template" value="${study?.template}" entity="${dbnp.studycapturing.Subject}" ajaxOnChange="switchTemplate" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="onWizardPage()" >
24                The template to use for this study
25        </wizard:templateElement>
26        <wizard:textFieldElement name="title" description="Title" error="title" value="${study?.title}">
27                The title of the study you are creating
28        </wizard:textFieldElement>
29        <wizard:textFieldElement name="code" description="Code" error="code" value="${study?.code}">
30                A code to reference your study by
31        </wizard:textFieldElement>
32        <wizard:textFieldElement name="researchQuestion" description="Research Question" error="researchQuestion" value="${study?.researchQuestion}">
33                The research question
34        </wizard:textFieldElement>
35        <wizard:textFieldElement name="description" description="Description" error="description" value="${study?.description}">
36                A short description summarizing your study
37        </wizard:textFieldElement>
38        <wizard:textFieldElement name="ecCode" description="Ethical Committee Code" error="ecCode" value="${study?.ecCode}">
39                [youtube:irvC_1ujhKo]
40        </wizard:textFieldElement>
41        <wizard:dateElement name="startDate" description="Start date" error="startDate" value="${study?.startDate}">
42                The start date of the study     
43        </wizard:dateElement>
44
45        <span class="info">
46                <span class="title">TODO</span>
47                This page should also contain the template fields of the study template selected above (if available). This is
48                scheduled for implementation in a later version
49        </span>
50       
51</wizard:pageContent>
Note: See TracBrowser for help on using the repository browser.