jsf.js_next_gen 4.0.2-beta.3 → 4.0.2-beta.4

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.
@@ -8033,15 +8033,7 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
8033
8033
  this.requestContext.$nspEnabled = true;
8034
8034
  requestPassThroughParams.$nspEnabled = true;
8035
8035
  }
8036
- const issuingItemId = this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value;
8037
- if (issuingItemId) {
8038
- const itemValue = mona_dish_1.DQ.byId(issuingItemId).inputValue;
8039
- if (itemValue.isPresent()) {
8040
- const arr = new ExtDomQuery_1.ExtConfig({});
8041
- arr.assign(issuingItemId).value = itemValue.value;
8042
- formData.shallowMerge(arr, true, true);
8043
- }
8044
- }
8036
+ this.appendIssuingItem(formData);
8045
8037
  this.responseContext = requestPassThroughParams.deepCopy;
8046
8038
  // we have to shift the internal passthroughs around to build up our response context
8047
8039
  const responseContext = this.responseContext;
@@ -8269,6 +8261,28 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
8269
8261
  const eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
8270
8262
  AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
8271
8263
  }
8264
+ appendIssuingItem(formData) {
8265
+ const issuingItemId = this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value;
8266
+ //not encoded
8267
+ if (issuingItemId && formData.getIf(issuingItemId).isAbsent()) {
8268
+ const issuingItem = mona_dish_1.DQ.byId(issuingItemId);
8269
+ const itemValue = issuingItem.inputValue;
8270
+ const arr = new ExtDomQuery_1.ExtConfig({});
8271
+ const type = issuingItem.type.orElse("").value.toLowerCase();
8272
+ //Checkbox and radio only value pass if checked is set, otherwise they should not show
8273
+ //up at all, and if checked is set, they either can have a value or simply being boolean
8274
+ if ((type == "checkbox" || type == "radio") && issuingItem.attr("checked").isAbsent()) {
8275
+ return;
8276
+ }
8277
+ else if ((type == "checkbox" || type == "radio")) {
8278
+ arr.assign(issuingItemId).value = itemValue.orElse(true).value;
8279
+ }
8280
+ else {
8281
+ arr.assign(issuingItemId).value = itemValue.value;
8282
+ }
8283
+ formData.shallowMerge(arr, true, true);
8284
+ }
8285
+ }
8272
8286
  }
8273
8287
  exports.XhrRequest = XhrRequest;
8274
8288