WebSphere Portal Server - Passing parameter through html:link in the struts cooperative portlet

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > March 2006 > Passing parameter through html:link in the struts cooperative portlet





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Passing parameter through html:link in the struts cooperative portlet

2006-03-21, 3:22 am

Hi there,
<p>I wonder if anyone runs into issues to pass an url parameter to the consumer portlet through the html:link tag, such as in the following example:<br>
</p>
<p>&lt;html:form action="/contactIdAction.do"&gt;<br>
&lt;table&gt;&lt;tr&gt;&lt;td&gt; Office Id &lt;/td&gt;&lt;td&gt;<br>
&lt;html:text property="officeId"&gt;&lt;/html:text&gt;<br>
&lt;/td&gt;&lt;/tr&gt;<br>
&lt;tr&gt;&lt;td&gt;&lt;html:submit property="Save" &gt;&lt;/html:submit&gt;<br>
&lt;/td&gt;&lt;td&gt;<br>
&lt;html:reset property="Cancel" &gt;&lt;/html:reset&gt;<br>
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<br>
&lt;/html:form&gt; </p>
<p>&lt;%<br>
java.util.HashMap urlParams=new java.util.HashMap();<br>
urlParams.put("officeId", "1");<br>
pageContext.setAttribute("urlParams",urlParams);<br>
%&gt; </p>
<p>Another way to pass a office id:<br>
&lt;html:link page="/contactIdAction.do" name="urlParams"&gt;Pass office id&lt;/html:link&gt; </p>
<p>It seems that I can pass the parameter just fine if I use form submit. But the same scheme will not work if I pass through a url link.</p>
<p>Thanks in advance.</p>
<p>Howard</p>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com