You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2010/04/02 23:04:21 UTC

svn commit: r930383 - /myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js

Author: werpu
Date: Fri Apr  2 21:04:21 2010
New Revision: 930383

URL: http://svn.apache.org/viewvc?rev=930383&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-2637

name/identifier detachement was not entirely covered
if an old element is passed and the new replacement element did an id to name 
conversion to keep the submit value the same we could not determine the form
this is now covered as well.




Modified:
    myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js

Modified: myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js?rev=930383&r1=930382&r2=930383&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js (original)
+++ myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Utils.js Fri Apr  2 21:04:21 2010
@@ -507,6 +507,10 @@ if (!myfaces._impl._util._LangUtils.exis
 
         var submitIdentifier = ('undefined' != element.id) ? element.id : null;
         var submitName = ('undefined' != element.name) ? element.name : null;
+        //a framework in a detachment case also can replace an existing identifier element
+        // with a name element
+        submitName = (null == submitName) ? submitIdentifier: submitName;
+
 
         if ('undefined' != typeof submitIdentifier && null != submitIdentifier && '' != submitIdentifier) {
             //we have to assert that the element passed down is detached