[ANNOUNCE] Apache Tobago 4.2.1 released

2018-05-09 Thread Udo Schnurpfeil
The Apache MyFaces team is pleased to announce the release of Apache
Tobago 4.2.1.

Apache Tobago is a component library for JavaServer Faces (JSF) that
allows to write web-applications without the need of coding HTML, CSS
and JavaScript

Main features


Bugfixes

Changes
---

Please check the release notes at
http://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310273=12342849

for a full list of the changes in this version.


For more information about Apache Tobago, please visit
http://myfaces.apache.org/tobago/.

Have fun,
-The MyFaces team


Re: [MyFaces 2.3.X] Weird error on InternetExplorer 11

2018-05-09 Thread Thomas Andraschko
Hey,

There already is a ticket about it, it will be fixed in the next release.

Am Mittwoch, 9. Mai 2018 schrieb Juri Berlanda :

> Hello,
>
> I noticed a very weird error affecting MyFaces 2.3.0 and 2.3.1 in
> combination with IE 11 (and maybe other IEs, we only test against IE 11).
> Chrome, Firefox and Edge seem to NOT be affected.
>
> On IE when _applyJSFArtifactValueToForm() is run as part of
> processResponse() it might occur that indexOf() is called on undefined,
> since e.name can be undefined in IE 11 if something like e.g. a
>  is inside the Form and it has no name set. For the other
> Browsers this resolves to e.name (in line 242 in _AjaxResponse.js, HEAD @
> Tag myfaces-core-module-2.3.1) being "" (i.e. empty String), which seems to
> be a great idea for a sensible default. But not so for IE 11: it has
> e.name undefined, hence calling indexOf() on it causes a TypeError, which
> in turn leads for any hidden input (e.g. ViewState) to not be updated.
>
> In our stack (MyFaces with Primefaces and DeltaSpike) this leads to
> WindowScope not being active after the Response of the first Ajax is
> processed.
>
> The issue can be fixed with the patch appended to this EMail.
>
> MyFaces 2.2.12 is NOT affected.
>
> If further work is needed I am happy to help.
>
> Kind regards,
>
> Juri Berlanda
>
>


[MyFaces 2.3.X] Weird error on InternetExplorer 11

2018-05-09 Thread Juri Berlanda

Hello,

I noticed a very weird error affecting MyFaces 2.3.0 and 2.3.1 in 
combination with IE 11 (and maybe other IEs, we only test against IE 
11). Chrome, Firefox and Edge seem to NOT be affected.


On IE when _applyJSFArtifactValueToForm() is run as part of 
processResponse() it might occur that indexOf() is called on undefined, 
since e.name can be undefined in IE 11 if something like e.g. a 
 is inside the Form and it has no name set. For the other 
Browsers this resolves to e.name (in line 242 in _AjaxResponse.js, HEAD 
@ Tag myfaces-core-module-2.3.1) being "" (i.e. empty String), which 
seems to be a great idea for a sensible default. But not so for IE 11: 
it has e.name undefined, hence calling indexOf() on it causes a 
TypeError, which in turn leads for any hidden input (e.g. ViewState) to 
not be updated.


In our stack (MyFaces with Primefaces and DeltaSpike) this leads to 
WindowScope not being active after the Response of the first Ajax is 
processed.


The issue can be fixed with the patch appended to this EMail.

MyFaces 2.2.12 is NOT affected.

If further work is needed I am happy to help.

Kind regards,

Juri Berlanda

>From b9f338c43db7f2113280d027d1586aa6d8d393ca Mon Sep 17 00:00:00 2001
From: Juri Berlanda 
Date: Wed, 9 May 2018 19:10:50 +0200
Subject: [PATCH] Fix TypeError in IE 11.

IE 11 seems to have a the "name" property undefined by default, while other
browsers fall back to empty String. This means e.name needs to be checked
before calling indexOf() on it.
---
 .../META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
index 5254efc..21e451f 100644
--- a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
+++ b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
@@ -239,7 +239,7 @@ _MF_SINGLTN(_PFX_XHR + "_AjaxResponse", _MF_OBJECT, /** @lends myfaces._impl.xhr
 var elements = theForm.elements;
 for (var i = 0, l = elements.length; i < l; i++) {
 var e = elements[i];
-if (e.name.indexOf(identifier) != -1) {
+if ((typeof e.name !== "undefined") && e.name.indexOf(identifier) != -1) {
 fieldsFound.push(e);
 }
 }
-- 
2.7.4