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 Ed...@swisscom.com on 2003/08/11 11:54:25 UTC
$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: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org