Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8762917B0C for ; Tue, 6 Oct 2015 10:46:27 +0000 (UTC) Received: (qmail 3380 invoked by uid 500); 6 Oct 2015 10:46:27 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 3327 invoked by uid 500); 6 Oct 2015 10:46:27 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 3316 invoked by uid 99); 6 Oct 2015 10:46:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2015 10:46:27 +0000 Date: Tue, 6 Oct 2015 10:46:26 +0000 (UTC) From: "Leon Steffens (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MYFACES-4016) Error when submitting an Ajax request for an element without an ID MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Leon Steffens created MYFACES-4016: -------------------------------------- Summary: 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 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)