Fórumok

Plugin environment

thumbnail
Rahul Pande, módosítva 13 év-val korábban

Plugin environment

Expert Bejegyzések: 310 Csatlakozás dátuma: 2010.07.07. Legújabb bejegyzések
Hi all,

I am developing a struts portlet in plugin environment and it is working fine. But the problem is I am confused in creating action class for processing a request. You can create action class by extending either

1. org.apache.struts.action.Action
2. org.apache.portals.bridges.struts.StrutsPortlet

so can anybody tell, in which scenario each class should be used. emoticon




Thank you
Rahul Pande
thumbnail
Alexandre FILLATRE, módosítva 13 év-val korábban

RE: Plugin environment

Junior Member Bejegyzések: 80 Csatlakozás dátuma: 2010.12.02. Legújabb bejegyzések
Hi Rahul,

You'll need to extend the com.liferay.portal.struts.PortletAction class in order to create your portlet. I'd suggest that you download liferay sources, and have a look at how it is done for Liferay portlets. It'll be the same for you.

Regards,
Alexandre FILLATRE
thumbnail
Rahul Pande, módosítva 13 év-val korábban

RE: Plugin environment

Expert Bejegyzések: 310 Csatlakozás dátuma: 2010.07.07. Legújabb bejegyzések
Thanks Alexandre for the reply ....

But there is one problem the PortletAction class is available in portal-impl.jar. While developing a portlet in plugin ideally you should use portal-kernel.jar and portal-service.jar ONLY and not the implementation classes in portal-impl.jar. If you use those classes, it makes your portlet Liferay dependent.

So I found these two classes that you can use in your action class.

Action class has execute method and StrutsPortlet class has all the methods like doView(), doEdit() etc which are required for any portlet. So do you have any idea on this emoticon




Thanks and Regards,
Rahul Pande
thumbnail
Alexandre FILLATRE, módosítva 13 év-val korábban

RE: Plugin environment

Junior Member Bejegyzések: 80 Csatlakozás dátuma: 2010.12.02. Legújabb bejegyzések
Hi Rahul,

You're totally right. I misread you, I though about portlets in ext environment. For plugins it's different as you said. Although I used to develop struts portlets in ext environment, I always use Spring MVC for plugin portlets.

I'm sorry but then I won't be able to provide you with an answer here. Though I think there is a sample Struts portlet in sourceforge, but the download page is down at the moment.

Good luck with this.

Alexandre FILLATRE
k venkatesh, módosítva 11 év-val korábban

RE: Plugin environment

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.02.21. Legújabb bejegyzések
Hi Rahul,

I am also have the same problem,If you know please inform. Thanks in advance.
thumbnail
Hitoshi Ozawa, módosítva 11 év-val korábban

RE: Plugin environment

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Have you seen this blog?

http://www.liferay.com/web/mika.koivisto/blog/-/blogs/7132115