RE: RE: Calendar Portlet Customization

Mohamed Saleem, modified 1 Year ago. Junior Member Posts: 40 Join Date: 12/16/15 Recent Posts

Hi,

I have written code for Calendar portlet customization is working in 7.2 but not working in 7.4. 

@Component(property = { "javax.portlet.name=com_liferay_calendar_web_portlet_CalendarPortlet",
    "mvc.command.name=updateFormCalendarBooking", "service.ranking:Integer=101" }, service = MVCActionCommand.class)
public class CalendarUpdateAction extends BaseMVCActionCommand {

 

  @Override
  protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {

        System.out.println("my customization");

}

 if anyone knows please help me.

Thanks,

Saleem.

 

thumbnail
Roselaine Marques, modified 1 Year ago. New Member Posts: 13 Join Date: 4/13/20 Recent Posts

Hi Mohamed, 

Here as you can see the "updateFormCalendarBooking" is implemented inside the Portlet component, not as MVCActionCommand, which means you can't override as MVCActionCommand + service ranking. 

I was wondering, don't you have the JSP Fragment invoking this MVCActionCommand in 7.2?

thumbnail
Olaf Kock, modified 1 Year ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

I'm not confident that it shouldn't be possible: It has always been implemented this way (e.g. here the 7.2 implementation), and MVCActionCommands should have precedence if I'm not mistaken...

Check if your plugin is actually deployed (use Gogo shell)

Also, I see that the 7.4 calendar portlet opts for portletspec 3. Maybe this is the reason for changed behavior... If that was the case, I'd call it a bug. But as of now it's only a guess to check.

Mohamed Saleem, modified 1 Year ago. Junior Member Posts: 40 Join Date: 12/16/15 Recent Posts

 Hi,

Both the modules are deployed, but not invoking the service in 7.4 only

can you please tell me is there other way to customize this calendar portlet component?

 

Thanks,

Saleem.