Error with the javascript function created, when using the form atribute
------------------------------------------------------------------------

                 Key: DISPL-597
                 URL: http://jira.codehaus.org/browse/DISPL-597
             Project: DisplayTag
          Issue Type: Bug
    Affects Versions: 1.2
            Reporter: Alvaro Villarroel
             Fix For: 1.2


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$
    }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to