Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
When we are use form atributte, we now use PostHref class to generete de href, and it creates a call for a javascript function, and it passes all the paramters including displaytag paramaters and the form parameters; when the "<a>" tag is been created the generated href is passed as <a href="(here is the javascript call" ...etc. this may cause a bug if the form has a lot of atributtes, a javascript call shouldn't be called from the href="" atribute of the link it should we called from an event such as onclick="".
Instead of:
private String getHrefString()
{
if (this.href == null)
{
return TagConstants.EMPTY_STRING;
}
return " href=\"" + this.href.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
it should we something like:
private String getHrefString()
{
if (this.href == null)
{
return TagConstants.EMPTY_STRING;
}
if (isWithForm) {
return " href=\"#\" onclick=\"" + this.href.toString() + "\"";
}
return " href=\"" + this.href.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
Instead of:
private String getHrefString()
{
if (this.href == null)
{
return TagConstants.EMPTY_STRING;
}
return " href=\"" + this.href.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
it should we something like:
private String getHrefString()
{
if (this.href == null)
{
return TagConstants.EMPTY_STRING;
}
if (isWithForm) {
return " href=\"#\" onclick=\"" + this.href.toString() + "\"";
}
return " href=\"" + this.href.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}