Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

First of all. Submitting parameters within a HTMLB Link is not possible. But there is a workaround where you can simulate this.

With a normal HTML link you can submit parameters to another page via "?param=paramvalue" and so on. Nothing special. 

In my opinion such a property, e.g. "params" is missing for the HTMLB link. I searched around the SDN, in many forums, many blogs, but I didn't find anything useful.

Nevertheless I found a solution and will share my knowledge with the SDN community. I think this will help other developers having the same problem.

This blog uses AbstractPortalComponents but will also work with JSPDynPages I think.

 

The Code of your AbstractPortalComponent can look like this:

" + params[0] + "

");
sForwardPage = "jsp/start.jsp";
}
}
return sForwardPage;
}

 

The corresponding start.jsp JSP-File should look like this:</p><p><textarea cols="56" rows="11"><hbj:form id="myForm" action="">

  *<hbj:link id="linkExample"

              text="LinkExample"

                reference="<%= paramValue %>"

              tooltip="Show Parameter Value"

              onClick="GetParamFromJSP">

       </hbj:link>

  *

</hbj:form></textarea></p><p> </p><p>If you would like to pass the parameter from one jsp to another you can put the parameter to the request Object in your AbstractPortalComponent. The modified code of the AbstractPortalComponent would look like this:

 

The following code would read out this parameter:</p><p><textarea cols="57" rows="9"><%
IPortalComponentRequest currentRequest = (IPortalComponentRequest)pageContext.getAttribute(javax.servlet.jsp.PageContext.REQUEST);

String param = (String) currentRequest.getValue("param");
%></textarea></p>