1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.plugins.release.web;
35
36
37 import javax.servlet.http.HttpServletRequest;
38
39 import fr.paris.lutece.portal.service.message.SiteMessageException;
40 import fr.paris.lutece.portal.service.spring.SpringContextService;
41 import fr.paris.lutece.portal.util.mvc.commons.annotations.Action;
42 import fr.paris.lutece.portal.util.mvc.commons.annotations.View;
43 import fr.paris.lutece.portal.util.mvc.xpage.MVCApplication;
44 import fr.paris.lutece.portal.util.mvc.xpage.annotations.Controller;
45 import fr.paris.lutece.portal.web.xpages.XPage;
46
47
48
49
50
51 @Controller( xpageName = ReleaseApp.XPAGE_NAME, pageTitleI18nKey = ReleaseApp.MESSAGE_DEFAULT_PAGE_TITLE, pagePathI18nKey = ReleaseApp.MESSAGE_DEFAULT_PATH )
52 public class ReleaseApp extends MVCApplication
53 {
54
55
56
57 public static final String VIEW_APPOINTMENT_FORM_FIRST_STEP = "getAppointmentFormFirstStep";
58
59
60
61
62 public static final String VIEW_APPOINTMENT_FORM_SECOND_STEP = "getAppointmentFormSecondStep";
63
64
65
66
67 public static final String MESSAGE_DEFAULT_PATH = "appointment.appointmentApp.defaultPath";
68
69
70
71
72 public static final String MESSAGE_DEFAULT_PAGE_TITLE = "appointment.appointmentApp.defaultTitle";
73
74
75 private static final String INFO_APPOINTMENT_STATE_ERROR = "appointment.info.appointment.etatinitial";
76
77
78
79
80 protected static final String XPAGE_NAME = "appointment";
81
82
83
84
85 private static final long serialVersionUID = 5741361182728887387L;
86
87
88
89 private static final String VIEW_APPOINTMENT_FORM_LIST = "getViewFormList";
90
91
92 private static final String ACTION_DO_VALIDATE_FORM = "doValidateForm";
93
94
95 private static final String PARAMETER_ID_FORM = "id_form";
96 private static final String PARAMETER_ID_SLOT = "idSlot";
97
98 private final fr.paris.lutece.plugins.workflowcore.service.workflow.WorkflowService _stateServiceWorkFlow = SpringContextService.getBean( fr.paris.lutece.plugins.workflowcore.service.workflow.WorkflowService.BEAN_SERVICE );
99
100
101
102
103
104
105
106 @View( value = VIEW_APPOINTMENT_FORM_LIST, defaultView = true )
107 public XPage getFormList( HttpServletRequest request )
108 {
109 XPage xpage = new XPage( );
110
111
112 return xpage;
113 }
114
115
116
117
118
119
120
121
122 public XPage getViewForm( HttpServletRequest request )
123 {
124 String strIdForm = request.getParameter( PARAMETER_ID_FORM );
125
126
127
128
129
130
131
132
133
134
135
136 return redirectView( request, VIEW_APPOINTMENT_FORM_LIST );
137 }
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165 @Action( ACTION_DO_VALIDATE_FORM )
166 public XPage doValidateForm( HttpServletRequest request )
167 throws SiteMessageException
168 {
169 String strIdForm = request.getParameter( PARAMETER_ID_FORM );
170 String strIdSlot = request.getParameter(PARAMETER_ID_SLOT);
171
172
173 return redirectView( request, VIEW_APPOINTMENT_FORM_LIST );
174 }
175
176
177
178 }