Foren
Modifying CalendarPortlet for Liferay 6.2
Jose C Cuellar, geändert vor 7 Jahren.
Modifying CalendarPortlet for Liferay 6.2
New Member Beiträge: 19 Beitrittsdatum: 27.07.16 Neueste Beiträge
Hi to everyone.
I need to connect a Liferay 6.2 server with a dcm4chee PACS server. The point is to create a XML file and to send it to the PACS server each time I create a new calendar booking or when I change one.
I have cloned the calendar-portlet. Then, in the docroot/WEB-INF/src/com/liferay/calendar/portlet/CalendarPortlet.java file of my cloned calendar I added code inside the updateCalendarBooking procedure. It compiles and deploys well, but nothing happens when I make changes to the bookings (I get the normal behavior, but my added code is not executed). I have added "System.out.println" lines in most of the procedures of CalendarPortlet, just to see the flow of the processes. It's curious that only two of the procedures print something on the system console: getCalendar and getCalendarBooking. I've also added some test code on the procedure getCalendar, just to see if I can create a sample XML file and send it to the remote server; it works.
Why I can't execute code in the other procedures, not even a simple System.out.println?
I'm attaching the modified CalendarPortlet.java file, where you can see the changes I made.
Thanks in advance for your help. Liferay has a lot of possibilities, but it's hard to be a rookie again :-)
Best regards.
I need to connect a Liferay 6.2 server with a dcm4chee PACS server. The point is to create a XML file and to send it to the PACS server each time I create a new calendar booking or when I change one.
I have cloned the calendar-portlet. Then, in the docroot/WEB-INF/src/com/liferay/calendar/portlet/CalendarPortlet.java file of my cloned calendar I added code inside the updateCalendarBooking procedure. It compiles and deploys well, but nothing happens when I make changes to the bookings (I get the normal behavior, but my added code is not executed). I have added "System.out.println" lines in most of the procedures of CalendarPortlet, just to see the flow of the processes. It's curious that only two of the procedures print something on the system console: getCalendar and getCalendarBooking. I've also added some test code on the procedure getCalendar, just to see if I can create a sample XML file and send it to the remote server; it works.
Why I can't execute code in the other procedures, not even a simple System.out.println?
I'm attaching the modified CalendarPortlet.java file, where you can see the changes I made.
Thanks in advance for your help. Liferay has a lot of possibilities, but it's hard to be a rookie again :-)
Best regards.
Anhänge:
Juan Gonzalez, geändert vor 7 Jahren.
RE: Modifying CalendarPortlet for Liferay 6.2
Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Hola Jose.
Wow, good to see another e-health developer, I've been in that world for 5 years :-).
Hmmm do you have the "old" calendar portlet deployed at the same time? Did you check which method is invoked looking at the JSP? BTW, which Calendar source are your changes based on?
Thanks.
Jose C Cuellar:
I need to connect a Liferay 6.2 server with a dcm4chee PACS server. The point is to create a XML file and to send it to the PACS server each time I create a new calendar booking or when I change one.
Wow, good to see another e-health developer, I've been in that world for 5 years :-).
Jose C Cuellar:
I have cloned the calendar-portlet. Then, in the docroot/WEB-INF/src/com/liferay/calendar/portlet/CalendarPortlet.java file of my cloned calendar I added code inside the updateCalendarBooking procedure. It compiles and deploys well, but nothing happens when I make changes to the bookings
Hmmm do you have the "old" calendar portlet deployed at the same time? Did you check which method is invoked looking at the JSP? BTW, which Calendar source are your changes based on?
Thanks.
Jose C Cuellar, geändert vor 7 Jahren.
RE: Modifying CalendarPortlet for Liferay 6.2
New Member Beiträge: 19 Beitrittsdatum: 27.07.16 Neueste Beiträge
Hi Juan.
I can't have the old calendar portlet deployed at the same time; it gives me problems when it happens. Indeed, usually I have to put the old portlet in my page, delete it, and then put the now one; if not, the calendar appears blank, I don't know why.
The JSP are a little confusing, but it's clear that the CalendarPortlet class should be use. Actually, my tests work for CalendarPortlet.getCalendar and CalendarPortlet.getCalendarBooking, but not for the other functions of the class.
I'm exploring the option of modifying the original portlet JSP files instead. At the moment I have been able to "capture" the process of editing a booking and inserting my own code on it. Now, I need to do the same when creating and deleting bookings. I'll keep you informed ;-)
Best regards.
I can't have the old calendar portlet deployed at the same time; it gives me problems when it happens. Indeed, usually I have to put the old portlet in my page, delete it, and then put the now one; if not, the calendar appears blank, I don't know why.
The JSP are a little confusing, but it's clear that the CalendarPortlet class should be use. Actually, my tests work for CalendarPortlet.getCalendar and CalendarPortlet.getCalendarBooking, but not for the other functions of the class.
I'm exploring the option of modifying the original portlet JSP files instead. At the moment I have been able to "capture" the process of editing a booking and inserting my own code on it. Now, I need to do the same when creating and deleting bookings. I'll keep you informed ;-)
Best regards.
Juan Gonzalez, geändert vor 7 Jahren.
RE: Modifying CalendarPortlet for Liferay 6.2
Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Hi Jose,
please can you answer me about which source are you using?
Thanks.
please can you answer me about which source are you using?
Thanks.
Jose C Cuellar, geändert vor 7 Jahren.
RE: Modifying CalendarPortlet for Liferay 6.2
New Member Beiträge: 19 Beitrittsdatum: 27.07.16 Neueste Beiträge
Hi Juan.
Sorry. I didn't notice your answer.
I've been working with the source code of calendar-portal 6.0.12. Most of my work is completed. Finally I modified:
edit_calendar_booking.jsp
view_calendar_booking.jsp
porlet/CalendarPortlet.java
calendar/service/impl/CalendarBookingLocalServiceImpl.java
My apologies again, and thanks for your help.
Best regards.
Sorry. I didn't notice your answer.
I've been working with the source code of calendar-portal 6.0.12. Most of my work is completed. Finally I modified:
edit_calendar_booking.jsp
view_calendar_booking.jsp
porlet/CalendarPortlet.java
calendar/service/impl/CalendarBookingLocalServiceImpl.java
My apologies again, and thanks for your help.
Best regards.
Juan Gonzalez, geändert vor 7 Jahren.
RE: Modifying CalendarPortlet for Liferay 6.2
Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste BeiträgeJose C Cuellar:
Hi Juan.
Sorry. I didn't notice your answer.
I've been working with the source code of calendar-portal 6.0.12. Most of my work is completed. Finally I modified:
edit_calendar_booking.jsp
view_calendar_booking.jsp
porlet/CalendarPortlet.java
calendar/service/impl/CalendarBookingLocalServiceImpl.java
My apologies again, and thanks for your help.
Best regards.
Thanks Jose.
Seems you're using a Liferay 6.1 Calendar. Seems not the right approach, as you can use new Calendar portlet for 6.2, with a lot of new features available.
Jose C Cuellar, geändert vor 7 Jahren.
RE: Modifying CalendarPortlet for Liferay 6.2
New Member Beiträge: 19 Beitrittsdatum: 27.07.16 Neueste Beiträge
Sorry, a number was missing:
I'm using 6.2.0.12, not 6.0.12. I downloaded it from the official repository, and I was sure that it was for Liferay 6.2.
I've thinking about using Liferay v7 with its calendar, but I'm comfortable using v6.2 and ant. Someday I will upgrade to v7, but before Gradle and me have to become friends ;-)
Thanks. Best regards.
I'm using 6.2.0.12, not 6.0.12. I downloaded it from the official repository, and I was sure that it was for Liferay 6.2.
I've thinking about using Liferay v7 with its calendar, but I'm comfortable using v6.2 and ant. Someday I will upgrade to v7, but before Gradle and me have to become friends ;-)
Thanks. Best regards.