jsf.js_next_gen 1.0.0-beta-7 → 1.0.0-beta-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/window/jsf-development.js +12 -4
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +1 -1
- package/src/main/typescript/impl/util/Lang.ts +1 -1
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +14 -3
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +6 -1
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +1 -0
- package/target/impl/util/Lang.js +1 -1
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +11 -3
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +6 -0
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
|
@@ -1859,7 +1859,7 @@ var ExtLang;
|
|
|
1859
1859
|
templateParams[_i - 2] = arguments[_i];
|
|
1860
1860
|
}
|
|
1861
1861
|
installedLocale = installedLocale !== null && installedLocale !== void 0 ? installedLocale : new Messages_1.Messages();
|
|
1862
|
-
var msg = (_b = (_a = installedLocale[key]) !== null && _a !== void 0 ? _a : defaultMessage) !== null && _b !== void 0 ? _b : key
|
|
1862
|
+
var msg = (_b = (_a = installedLocale[key]) !== null && _a !== void 0 ? _a : defaultMessage) !== null && _b !== void 0 ? _b : key;
|
|
1863
1863
|
mona_dish_1.Stream.of.apply(mona_dish_1.Stream, templateParams).each(function (param, cnt) {
|
|
1864
1864
|
msg = msg.replace(new RegExp(["\\{", cnt, "\\}"].join(Const_1.EMPTY_STR), "g"), param);
|
|
1865
1865
|
});
|
|
@@ -2679,14 +2679,22 @@ var ResponseProcessor = /** @class */ (function () {
|
|
|
2679
2679
|
*/
|
|
2680
2680
|
var mergedErrorData = new mona_dish_1.Config({});
|
|
2681
2681
|
mergedErrorData.assign(Const_1.SOURCE).value = this.externalContext.getIf(Const_1.P_PARTIAL_SOURCE).get(0).value;
|
|
2682
|
-
mergedErrorData.assign(Const_1.ERROR_NAME).value = node.
|
|
2683
|
-
mergedErrorData.assign(Const_1.ERROR_MESSAGE).value = node.
|
|
2682
|
+
mergedErrorData.assign(Const_1.ERROR_NAME).value = node.querySelectorAll(Const_1.ERROR_NAME).textContent(Const_1.EMPTY_STR);
|
|
2683
|
+
mergedErrorData.assign(Const_1.ERROR_MESSAGE).value = node.querySelectorAll(Const_1.ERROR_MESSAGE).cDATAAsString;
|
|
2684
2684
|
var hasResponseXML = this.internalContext.get(Const_1.RESPONSE_XML).isPresent();
|
|
2685
|
+
//we now store the response xml also in the error data for further details
|
|
2685
2686
|
mergedErrorData.assignIf(hasResponseXML, Const_1.RESPONSE_XML).value = this.internalContext.getIf(Const_1.RESPONSE_XML).value.get(0).value;
|
|
2687
|
+
// error post processing and enrichment (standard messages from keys)
|
|
2686
2688
|
var errorData = ErrorData_1.ErrorData.fromServerError(mergedErrorData);
|
|
2687
|
-
|
|
2689
|
+
// we now trigger an internally stored onError function which might be a attached to the context
|
|
2690
|
+
// either we haven an internal on error, or an on error has been bassed via params from the outside
|
|
2691
|
+
// in both cases they are attached to our contexts
|
|
2692
|
+
this.triggerOnError(errorData);
|
|
2688
2693
|
AjaxImpl_1.Implementation.sendError(errorData);
|
|
2689
2694
|
};
|
|
2695
|
+
ResponseProcessor.prototype.triggerOnError = function (errorData) {
|
|
2696
|
+
this.externalContext.getIf(Const_1.ON_ERROR).orElse(this.internalContext.getIf(Const_1.ON_ERROR).value).orElse(Const_1.EMPTY_FUNC).value(errorData);
|
|
2697
|
+
};
|
|
2690
2698
|
/**
|
|
2691
2699
|
* process the redirect operation
|
|
2692
2700
|
*
|