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.appointment.web.portlet;
35
36 import javax.servlet.http.HttpServletRequest;
37
38 import fr.paris.lutece.plugins.appointment.business.portlet.AppointmentFormListPortlet;
39 import fr.paris.lutece.plugins.appointment.business.portlet.AppointmentFormListPortletHome;
40 import fr.paris.lutece.portal.business.portlet.PortletHome;
41
42
43
44
45
46
47
48 public class AppointmentFormListPortletJspBean extends AbstractPortletJspBean
49 {
50
51
52
53 private static final long serialVersionUID = -1986097699500814517L;
54
55
56
57
58 @Override
59 public String doCreate( HttpServletRequest request )
60 {
61 AppointmentFormListPortletness/portlet/AppointmentFormListPortlet.html#AppointmentFormListPortlet">AppointmentFormListPortlet portlet = new AppointmentFormListPortlet( );
62
63
64 String strPageId = request.getParameter( PARAMETER_PAGE_ID );
65 int nPageId = Integer.parseInt( strPageId );
66
67
68 String strErrorUrl = setPortletCommonData( request, portlet );
69
70 if ( strErrorUrl != null )
71 {
72 return strErrorUrl;
73 }
74
75 portlet.setPageId( nPageId );
76
77
78 AppointmentFormListPortletHome.getInstance( ).create( portlet );
79
80
81 return getPageUrl( nPageId );
82 }
83
84
85
86
87 @Override
88 public String doModify( HttpServletRequest request )
89 {
90
91 String strPortletId = request.getParameter( PARAMETER_PORTLET_ID );
92 int nPortletId = Integer.parseInt( strPortletId );
93 AppointmentFormListPortletfr/paris/lutece/plugins/appointment/business/portlet/AppointmentFormListPortlet.html#AppointmentFormListPortlet">AppointmentFormListPortlet portlet = (AppointmentFormListPortlet) PortletHome.findByPrimaryKey( nPortletId );
94
95
96 String strErrorUrl = setPortletCommonData( request, portlet );
97
98 if ( strErrorUrl != null )
99 {
100 return strErrorUrl;
101 }
102
103
104 portlet.update( );
105
106
107 return getPageUrl( portlet.getPageId( ) );
108 }
109 }