I am adding functionality to the calendar portlet using IDE and a hook project.
I am using Liferay In action a s a reference along with as many wiki and ofurm posts as possible!
I have written a new class in <my.custom package>.MyCalEvent.LocalServiceImpl which extends the CalEventLocalServiceWrapper
and in initially I just overrided the getEvent method to trace the event id
a) this only worked once I copied the class file from my portlet structure to the ROOT/WEB-INF/classes folder - how do we set up the system to detected it in the correct place?
I then added a new method that I want to use - at this stage I am not adding any new fields or anything so have no service builder elements.
(this is a skeleton of the real code I want to add here.)
public List<CalEvent> getMyEvents()
throws PortalException, SystemException {
System.out.println("## get MY events " );
int count = this.getCalEventsCount();
List<CalEvent> events = this.getCalEvents(0, count);
return events;
}
However when I try to access this in my jsp file
List myevents = MyCalEventLocalServiceImpl.getMyEvents();
I get the age old error:
"Cannot make a static reference to the non-static method getMyEvents() from the type MyCalEventLocalServiceImpl" which I sort of expected.
b) So what else do I have to do in order to call this method correctly?
Do I have to have a Wrapper class? Or a Util class? If so what do they look like?
Again this is not extending the data (that is next job) just adding new methods to existing service
Thanks
Firmi prego dentro per inbandierare questo come inadeguato.