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.
@@ -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 + " - undefined message";
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.getIf(Const_1.ERROR_NAME).textContent(Const_1.EMPTY_STR);
2683
- mergedErrorData.assign(Const_1.ERROR_MESSAGE).value = node.getIf(Const_1.ERROR_MESSAGE).cDATAAsString;
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
- this.externalContext.getIf(Const_1.ON_ERROR).orElse(this.internalContext.getIf(Const_1.ON_ERROR).value).orElse(Const_1.EMPTY_FUNC).value(errorData);
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
  *