Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts portlets behaviour in liferay

 
Ram Charan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am beginer with portals and portlets developmnet and had to work on developing struts portlets(As my portlets will have different views within it based on the action performed) in liferay.

The way I have developed is used bridges and extended my action class with com.liferay.portal.struts.PortletAction. In my action class I have overridden execute method and implemented logic in it and returned a specific action forward.
i.e. mapping.findForward("<specific forward defind in struts config>")

Now this works fine. But in the same page now I have added two more struts portlets. When the page which has these portlets is rendered the action forward returned by the first action execute is getting applied for the other two(Though the execute of other two are executed) i.e. the view returned by the first action execute is getting applied for all the three portlets.

So I tried removing excute and included render and processAction in my action classes. But in my first portlet when I forward the action back to same action class on performing a action in portlet I am getting class cast exception as ActionResponseImpl is incompatible with RenderResponse in PortletAction. And also I noticed that if action is performed on a portlet my processAction is not getting called.

Am I missing anything in my action class to include? Please help me out. Poniters for sample struts portlets implemetation in liferay would be of great help.

Regards,
Ram Charan.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"workingwith portals",
Please check your private messages.
-Ben
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic