This content has been marked as final.
Show 3 replies
-
1. Re: Link from the body of a portlet to a portlet on another
theute Sep 18, 2006 4:54 AM (in response to hamptont)There is no way to do it that follows the specification.
But in JBoss Portal, you can navigate in the tree of portal instances / pages / windows and achieve what you are looking for, look at the IPC documentation -
2. Re: Link from the body of a portlet to a portlet on another
vietanh.vu Nov 3, 2006 1:47 AM (in response to hamptont)Actually, there is a JSR168-compliant way to do this, with the help of javascript
at portlet ABC , I include a hidden form similar to this<form id="portletABCForm" action="<portlet:actionURL/>" method="post" style="display:none"> </form>
Note that the form id is porletABCForm to indicate that it belongs to portlet ABC,
I also create a javascript functionfunction invokeActionURLPortlet(portletName) { var frm = document.getElementById("portlet" + portletName + "Form"); if (frm) { var frmHtml = frm.innerHTML; for (var i = 1; i < arguments.length - 1; i+=2) { var parameterName = arguments; var parameterValue = arguments[i + 1]; frmHtml += "<input type=\"hidden\" name=\"" + parameterName + "\" value=\"" + parameterValue + "\"/>"; } frm.innerHTML = frmHtml; frm.submit(); } }
Now, I can invoke the actionURL of portlet ABC by using the above function<a href="javascript:invokeActionURLPortlet("ABC", "param1" , "value1", "param2", "value2")">Click here to invoke portlet ABC action URL with param1=value1¶m2=value2</a>
The solution is also posted my blog at http://vpensieve.blogspot.com/ -
3. Re: Link from the body of a portlet to a portlet on another
vietanh.vu Nov 3, 2006 1:48 AM (in response to hamptont)Actually, there is a JSR168-compliant way to do this, with the help of javascript
at portlet ABC , I include a hidden form similar to this<form id="portletABCForm" action="<portlet:actionURL/>" method="post" style="display:none"> </form>
Note that the form id is porletABCForm to indicate that it belongs to portlet ABC,
I also create a javascript functionfunction invokeActionURLPortlet(portletName) { var frm = document.getElementById("portlet" + portletName + "Form"); if (frm) { var frmHtml = frm.innerHTML; for (var i = 1; i < arguments.length - 1; i+=2) { var parameterName = arguments; var parameterValue = arguments[i + 1]; frmHtml += "<input type=\"hidden\" name=\"" + parameterName + "\" value=\"" + parameterValue + "\"/>"; } frm.innerHTML = frmHtml; frm.submit(); } }
Now, I can invoke the actionURL of portlet ABC by using the above function<a href="javascript:invokeActionURLPortlet("ABC", "param1" , "value1", "param2", "value2")">Click here to invoke portlet ABC action URL with param1=value1¶m2=value2</a>
The solution is also posted my blog at http://vpensieve.blogspot.com/