Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
Rahul Pande
Plugin environment
13 dicembre 2010 22.43
Risposta

Rahul Pande

Punteggio: Expert

Messaggi: 308

Data di Iscrizione: 6 luglio 2010

Messaggi recenti

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
Alexandre FILLATRE
RE: Plugin environment
14 dicembre 2010 0.56
Risposta

Alexandre FILLATRE

Punteggio: Junior Member

Messaggi: 80

Data di Iscrizione: 2 dicembre 2010

Messaggi recenti

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
Rahul Pande
RE: Plugin environment
14 dicembre 2010 22.28
Risposta

Rahul Pande

Punteggio: Expert

Messaggi: 308

Data di Iscrizione: 6 luglio 2010

Messaggi recenti

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
Alexandre FILLATRE
RE: Plugin environment
15 dicembre 2010 0.35
Risposta

Alexandre FILLATRE

Punteggio: Junior Member

Messaggi: 80

Data di Iscrizione: 2 dicembre 2010

Messaggi recenti

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
RE: Plugin environment
28 aprile 2012 4.16
Risposta

k venkatesh

Punteggio: Junior Member

Messaggi: 50

Data di Iscrizione: 20 febbraio 2012

Messaggi recenti

Hi Rahul,

I am also have the same problem,If you know please inform. Thanks in advance.
Hitoshi Ozawa
RE: Plugin environment
28 aprile 2012 6.22
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Have you seen this blog?

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