File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Invoking a portlet" Watch "Invoking a portlet" New topic

Invoking a portlet

Shah Devang

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
Even I am looking for it but for liferay ..
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

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

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
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.

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
I agree. Here's the link:
subject: Invoking a portlet
It's not a secret anymore!