aspose file tools*
The moose likes Portals and Portlets and the fly likes Invoking a portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Invoking a portlet" Watch "Invoking a portlet" New topic
Author

Invoking a portlet

Shah Devang
Greenhorn

Joined: Jul 27, 2006
Posts: 12
Hi All,

Can I invoke a portlet B from portlet A, on some action from portlet A? I am using JBoss Portal Server.

Thanks In Advance
Devang Shah
saumil baxi
Ranch Hand

Joined: Apr 18, 2008
Posts: 58
HI,
Even I am looking for it but for liferay ..
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

You can have a portlet page call another page in a portlet application. So, page 1 can have a link that makes page 2 appear. But you can't have a portlet provide a like that makes itself disappear, and makes another reappear.

You're still in a Servlet/JSP mentality. Stop thinking of portlets as though they were JSPs or Servlets. You need to bend your mind into the portlet world.

Sounds like you might be trying to do a wizard like application. Why not just use the JSF or Struts portlet? It will allow you to easily provide a wizard like experience to a user, all within a single portlet.

Keep asking these questions though. Let me help you think like a portlet developer.

Good luck.

-Cameron McKenzie
Vito Andolini
Greenhorn

Joined: Jun 19, 2007
Posts: 10
Maybe I'm missing something here, because I trust Cameron, but isn't his request the definition of cooperative portlets? An action on portlet A triggers an action on portlet B...
Jonas X. Yuan
author
Ranch Hand

Joined: May 18, 2008
Posts: 108
I Believe that page's parameters would be a simple solution.

Here is a real example in Liferay Portal.

http://sesamestreett.cignex.com/muppet

1) click a muppet, there is an action in side the portlet "Muppet" by page's parameters "muppet=name";

2) click the Video of a muppet, it will invoke the portlet Browser in the page "browseallvideos" by parameters "character=value".


Books: Liferay Portal 6.1 Systems Development
 
 
subject: Invoking a portlet