I've solved my problem. For all members with similar problems in the future, her is a
short description of my solution:
I didn't have the second protlet in my psml file. I thought, this wouldn't be
nessesary, but now i know, that there must be a portlet entry for both portlets in the
psml file. Now I've put both portlets into a menu and I've set the second with the
paramter _menustate=closed. With this parameter the second portlet is not added to the
menu. So it can only be accessed through my first portlet or the resulting link.
The additional Nullpointer Exception in my described problem was the result of a
missing quote in the Back-link.
Here is my psml file for details:
<portlets id="P-f6af046ce4-10000">
<metainfo>
<title>News</title>
</metainfo>
<security-ref parent="owner-only"/>
<layout position="3" size="-1"/>
<control name="MenuControl"/>
<controller name="CardPortletController">
<property name="parameter" value="select-panel"/>
</controller>
<entry id="P-f6efddbc2a-10000" parent="Forum">
</entry>
<entry id="P-f67zhf1" parent="ForumEntry">
<parameter name="_menustate" value="closed"/>
</entry>
</portlets>
-----Urspr�ngliche Nachricht-----
Von:
[EMAIL PROTECTED]
g
[mailto:[EMAIL PROTECTED]
pache.org]
Gesendet am: Montag, 11. August 2003 11:54
An: [EMAIL PROTECTED]
Betreff: $jslink
I have big problems in understanding the $jslink concept. I have seen, how it ist used
in the administration portelts and tried to build my own little example. Here I try to
calculate a value in my first portlet and send it to a second portlet. But it doesn't
work. The value is always sent to the first portlet. Can somebody tell me, where I can
find a good documentation about that thing (beside the template example -> velocity
docs! ) or tell me, how I can send the data to the second portlet WHITHOUT USING A
FORM!!!
I'm using Jetspeed 1.4b4
My portlet only consists of velocity templates. There are no action classes!
Here is my velocity template code:
First Portlet (name=Forum)
#set ( $mode = $data.getRequest().getParameter("mode") )
<p>
#if (!$mode)
#set ($mode = 1)
#end
Start with $mode
#set ($result=$mode+1)
<br>
<a href="$jslink.getPaneByName("ForumEntry").addQueryData("mode",$result)">Edit</a>
Second Portlet (name=ForumEntry)
#set ( $mode = $data.getRequest().getParameter("mode") )
Number $mode
<br>
<a href="$jslink.getPaneByName("Forum")>Back</a>
This is the result after the first call:
Start with 1
Edit
<http://localhost:8080/jetspeed5/portal/media-type/html/user/admin/page/default.psml/js_panename/ForumEntry?mode=2>
This is the result after a single click on "Edit":
Start with 2
<org.apache.turbine.util.TurbineException: Error rendering Velocity template:
/portlets/html/forum_home.vm: Invocation of method 'addQueryData' in class
org.apache.turbine.util.DynamicURI threw exception class
java.lang.NullPointerException : null </td>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]