Details
Description
The recent change to LinkTag.java which calls RequestUtils.computeParameters
breaks code that used to work. When using single value parameters with an
html:link, if the bean property from which the link parameter is being pulled
is not a String, an error occurs. It used to work if the bean property was a
Long (or others). The error occurs in the following cast to a String. Should it
be changed to do a toString() instead?
// Add the single-value parameter (if any)
if (paramId != null) {
String paramValue = null;
try
catch (ClassCastException e)
{ saveException(pageContext, e); throw new JspException (messages.getMessage("parameters.single", paramName, paramProperty, paramScope)); }catch (JspException e)
{ saveException(pageContext, e); throw e; }In the past:
<html:link paramId="menuId" paramName="menu" paramProperty="menuId"
page="/listMenu.do">
That worked where "menu" represented a bean with a property public Long
getMenuId().