myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Steffens (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Comment Edited] (MYFACES-4016) Error when submitting an Ajax request for an element without an ID
Date Tue, 06 Oct 2015 21:04:27 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-4016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945792#comment-14945792
] 

Leon Steffens edited comment on MYFACES-4016 at 10/6/15 9:04 PM:
-----------------------------------------------------------------

Attached diff taken from myfaces/core/trunk


was (Author: leonsteffens):
Diff taken from myfaces/core/trunk

> Error when submitting an Ajax request for an element without an ID
> ------------------------------------------------------------------
>
>                 Key: MYFACES-4016
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4016
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.17
>            Reporter: Leon Steffens
>         Attachments: myfaces-4016.diff
>
>
> When submitting an Ajax request that was triggered by an element with a name, but without
an ID, a Javascript error will be thrown in the nodeIdOrName() function in _Dom.js.
> The code calls the getElementsByName() function on "this", which throws an error that
getElementsByName() is not defined for "this".  It should call document.getElementsByName(),
same as the byIdOrName() function.
> 251	  //last check for uniqueness
> 252    if (this.getElementsByName(elementId).length > 1) {
> 253         //no unique element name so we need to perform
> 254	       //a return null to let the caller deal with this issue
> 255	       return null;
> 256	   }
> This was noticed when using the ICEfaces 3.3 data table in their compatibility component
suite, which uses hidden fields without IDs to submit the selection of rows.
> If you want an example that reproduces this error I can create one, but I think static
analysis of the code is sufficient in this case.
> The problem is also present in trunk.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message