You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Kush Desai <ku...@rediffmail.com> on 2004/07/26 17:54:19 UTC

How to switch tabs and go to a specific portlet under that tab

I have tab-style layout to start with. I need to link a portlet in tab 1 to a portlet in tab 2. Portlet 2 contains portlets with a menu-style controller. 

I need to switch to tab 2 and then go to a particular portlet in the menu. 

Earlier, I was able to do this by creating links like
$jslink.setPaneByName("parent-id,portlet-id"). But when I created more users, all such links broke coz they were all getting different ids for these tabs and portlets. So I want to be able to specify names instead of ids. But for some reason, the same logic doesnt work for names.

It seems that if i use $jslink.getPaneByName() I can switch tabs but I cant specify the portlet to bring up.


Any ideas, how I can do this?

Kush

Action methods obtaining references to the Portlet

Posted by Ol...@lakeviewtech.com.
Hello - 

We have a situation in some of our portlets (using Jetspeed 1.5) where we 
wish to place values in the portlet's session within some of our action 
methods.  We have been using the PortletSessionState helper class to do 
this (PortletSessionState.setAttribute(Portlet portlet, RunData rundata, 
String attrName, Object attrValue).  Since the action methods get 
references to only the RunData and Context variables, we need to get the 
reference to the Portlet ourselves (via the 
PortletAction.getPortlet(Context) method.)  Originally, the getPortlet() 
method always returned null - which meant we were not able to reliably use 
the session in this way.  We then changed the form declaration in our 
templates from:

<form method="post" action="$jslink.setAction("portlets.FooAction")"> (as 
described at: http://portals.apache.org/jetspeed-1/tutorial/7/events.html)

to

<form method="post" action="$jslink"> (as used in some of the samples)

Then this problem went away since we already had the action defined in our 
XREG for the portlet (i.e. the getPortlet() method properly returned our 
Portlet reference.)  My question is, is there any way to get the Portlet 
reference with a non-default Action (our original solution?)  We currently 
have portlets that call off to actions other than those listed as the 
default in our XREG files... and we may eventually want to place things in 
the portlet's session - can we do this reliably?

Interestingly, I found a very similar thread in the FAQ, but I can't 
determine what it really means in terms of explicity setting actions 
within the template: 
http://portals.apache.org/jetspeed-1/faq.html#Changing_portlet_template

Thanks,
Eric Olson