jsf.js_next_gen 4.0.2-beta.8 → 4.0.3-beta.1
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/faces-development.js +86 -56
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +86 -56
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.map +1 -1
- package/faulty_response.html +167 -0
- package/package.json +1 -1
- package/src/main/typescript/impl/AjaxImpl.ts +22 -19
- package/src/main/typescript/impl/PushImpl.ts +1 -1
- package/src/main/typescript/impl/core/Const.ts +1 -1
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +20 -15
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +78 -27
- package/src/main/typescript/test/impl/ImplTest.spec.ts +85 -0
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +1 -1
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +3 -3
- package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +3 -3
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +2 -2
- package/target/impl/AjaxImpl.js +21 -19
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/PushImpl.js +3 -3
- package/target/impl/PushImpl.js.map +1 -1
- package/target/impl/core/Const.js +2 -2
- package/target/impl/core/Const.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +11 -10
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +49 -22
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +64 -0
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +1 -1
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +3 -4
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest_23.spec.js +3 -3
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +2 -2
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/webpack.config.js +54 -0
- package/webpack.config.js.map +1 -0
|
@@ -4447,13 +4447,14 @@ var Implementation;
|
|
|
4447
4447
|
// we can use our lazy stream each functionality to run our chain here.
|
|
4448
4448
|
// by passing a boolean as return value into the onElem call
|
|
4449
4449
|
// we can stop early at the first false, just like the spec requests
|
|
4450
|
-
let ret;
|
|
4450
|
+
let ret = true;
|
|
4451
4451
|
funcs.every(func => {
|
|
4452
4452
|
let returnVal = resolveAndExecute(source, event, func);
|
|
4453
|
-
if (returnVal
|
|
4454
|
-
ret =
|
|
4453
|
+
if (returnVal === false) {
|
|
4454
|
+
ret = false;
|
|
4455
4455
|
}
|
|
4456
|
-
|
|
4456
|
+
//we short circuit in case of false and break the every loop
|
|
4457
|
+
return ret;
|
|
4457
4458
|
});
|
|
4458
4459
|
return ret;
|
|
4459
4460
|
}
|
|
@@ -4839,13 +4840,14 @@ var Implementation;
|
|
|
4839
4840
|
}
|
|
4840
4841
|
}
|
|
4841
4842
|
/**
|
|
4842
|
-
* transforms the user values to the expected
|
|
4843
|
-
*
|
|
4844
|
-
* (
|
|
4845
|
-
*
|
|
4843
|
+
* transforms the user values to the expected values
|
|
4844
|
+
* handling '@none', '@all', '@form', and '@this' appropriately.
|
|
4845
|
+
* (Note: Although we could employ a simple string replacement method,
|
|
4846
|
+
* it could result in duplicate entries under certain conditions.)
|
|
4846
4847
|
*
|
|
4847
|
-
*
|
|
4848
|
-
*
|
|
4848
|
+
* Specific standardized constants such as
|
|
4849
|
+
* '@all', '@none', '@form', and '@this'
|
|
4850
|
+
* require special treatment.
|
|
4849
4851
|
*
|
|
4850
4852
|
* @param targetConfig the target configuration receiving the final values
|
|
4851
4853
|
* @param targetKey the target key
|
|
@@ -4940,15 +4942,14 @@ var Implementation;
|
|
|
4940
4942
|
return targetConfig;
|
|
4941
4943
|
}
|
|
4942
4944
|
/**
|
|
4943
|
-
*
|
|
4944
|
-
*
|
|
4945
|
+
* Filters the provided options using a blacklist to ensure
|
|
4946
|
+
* only pass-through parameters are processed for the Ajax request.
|
|
4945
4947
|
*
|
|
4946
|
-
* Note this is
|
|
4947
|
-
*
|
|
4948
|
-
*
|
|
4949
|
-
* it breaks any legacy code
|
|
4948
|
+
* Note that this issue is leftover from a previous implementation.
|
|
4949
|
+
* The specification-conforming behavior is to use parameters for pass-through values.
|
|
4950
|
+
* This will be addressed soon, after confirming that removal won't break any legacy code.
|
|
4950
4951
|
*
|
|
4951
|
-
* @param {Context} mappedOpts
|
|
4952
|
+
* @param {Context} mappedOpts - The options to be filtered.
|
|
4952
4953
|
*/
|
|
4953
4954
|
function extractLegacyParams(mappedOpts) {
|
|
4954
4955
|
//we now can use the full code reduction given by our stream api
|
|
@@ -4958,8 +4959,9 @@ var Implementation;
|
|
|
4958
4959
|
.reduce(collectAssoc, {});
|
|
4959
4960
|
}
|
|
4960
4961
|
/**
|
|
4961
|
-
*
|
|
4962
|
-
*
|
|
4962
|
+
* Extracts the MyFaces configuration parameters
|
|
4963
|
+
* that augment JSF with additional functionality.
|
|
4964
|
+
*
|
|
4963
4965
|
* @param mappedOpts
|
|
4964
4966
|
* @private
|
|
4965
4967
|
*/
|
|
@@ -5152,14 +5154,14 @@ var PushImpl;
|
|
|
5152
5154
|
this.reconnectAttempts = 0;
|
|
5153
5155
|
}
|
|
5154
5156
|
onerror(event) {
|
|
5155
|
-
var _a, _b;
|
|
5156
|
-
let message = JSON.parse(event.data);
|
|
5157
|
+
var _a, _b, _c;
|
|
5158
|
+
let message = JSON.parse((_a = event === null || event === void 0 ? void 0 : event.data) !== null && _a !== void 0 ? _a : null);
|
|
5157
5159
|
//TODO replace this with a more readable Stream code
|
|
5158
5160
|
for (let i = PushImpl.clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {
|
|
5159
5161
|
let socketClientId = PushImpl.clientIdsByTokens[this.channelToken][i];
|
|
5160
5162
|
if (document.getElementById(socketClientId)) {
|
|
5161
5163
|
try {
|
|
5162
|
-
(
|
|
5164
|
+
(_c = (_b = PushImpl.components[socketClientId]) === null || _b === void 0 ? void 0 : _b['onerror']) === null || _c === void 0 ? void 0 : _c.call(_b, message, this.channel, event);
|
|
5163
5165
|
}
|
|
5164
5166
|
catch (e) {
|
|
5165
5167
|
//Ignore
|
|
@@ -5301,7 +5303,7 @@ var PushImpl;
|
|
|
5301
5303
|
* limitations under the License.
|
|
5302
5304
|
*/
|
|
5303
5305
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5304
|
-
exports.CTX_OPTIONS_PARAMS = exports.TIMEOUT_EVENT = exports.CLIENT_ERROR = exports.SERVER_ERROR = exports.MALFORMEDXML = exports.EMPTY_RESPONSE = exports.
|
|
5306
|
+
exports.CTX_OPTIONS_PARAMS = exports.TIMEOUT_EVENT = exports.CLIENT_ERROR = exports.SERVER_ERROR = exports.MALFORMEDXML = exports.EMPTY_RESPONSE = exports.HTTP_ERROR = exports.RESPONSE_XML = exports.RESPONSE_TEXT = exports.ERROR_MESSAGE = exports.ERROR_NAME = exports.STATUS = exports.SOURCE = exports.SUCCESS = exports.COMPLETE = exports.BEGIN = exports.ON_EVENT = exports.ON_ERROR = exports.EVENT = exports.ERROR = exports.WINDOW_ID = exports.CTX_PARAM_RENDER = exports.P_BEHAVIOR_EVENT = exports.P_WINDOW_ID = exports.P_RESET_VALUES = exports.P_EVT = exports.P_RENDER_OVERRIDE = exports.P_RENDER = exports.P_EXECUTE = exports.P_AJAX = exports.IDENT_FORM = exports.IDENT_THIS = exports.IDENT_NONE = exports.IDENT_ALL = exports.HTML_CLIENT_WINDOW = exports.HTML_VIEWSTATE = exports.EMPTY_MAP = exports.EMPTY_STR = exports.EMPTY_FUNC = exports.P_RESOURCE = exports.P_VIEWBODY = exports.P_VIEWHEAD = exports.P_VIEWROOT = exports.P_CLIENT_WINDOW = exports.P_VIEWSTATE = exports.VIEW_ID = exports.NAMING_CONTAINER_ID = exports.P_AJAX_SOURCE = exports.NAMED_VIEWROOT = exports.XML_ATTR_NAMED_VIEWROOT = void 0;
|
|
5305
5307
|
exports.XML_TAG_REDIRECT = exports.XML_TAG_EXTENSION = exports.XML_TAG_ATTRIBUTES = exports.XML_TAG_ERROR = exports.XML_TAG_EVAL = exports.XML_TAG_INSERT = exports.XML_TAG_DELETE = exports.XML_TAG_UPDATE = exports.XML_TAG_CHANGES = exports.XML_TAG_PARTIAL_RESP = exports.ATTR_ID = exports.ATTR_VALUE = exports.ATTR_NAME = exports.ATTR_URL = exports.MYFACES_OPTION_PPS = exports.ERR_NO_PARTIAL_RESPONSE = exports.PHASE_PROCESS_RESPONSE = exports.SEL_RESPONSE_XML = exports.SEL_CLIENT_WINDOW_ELEM = exports.SEL_VIEWSTATE_ELEM = exports.HTML_TAG_STYLE = exports.HTML_TAG_SCRIPT = exports.HTML_TAG_LINK = exports.HTML_TAG_BODY = exports.HTML_TAG_FORM = exports.HTML_TAG_HEAD = exports.STD_ACCEPT = exports.NO_TIMEOUT = exports.MULTIPART = exports.URL_ENCODED = exports.STATE_EVT_COMPLETE = exports.STATE_EVT_TIMEOUT = exports.STATE_EVT_BEGIN = exports.REQ_TYPE_POST = exports.REQ_TYPE_GET = exports.ENCODED_URL = exports.VAL_AJAX = exports.REQ_ACCEPT = exports.HEAD_FACES_REQ = exports.CONTENT_TYPE = exports.CTX_PARAM_PPS = exports.CTX_PARAM_REQ_PASS_THR = exports.CTX_PARAM_SRC_CTL_ID = exports.CTX_PARAM_SRC_FRM_ID = exports.CTX_PARAM_MF_INTERNAL = exports.CTX_OPTIONS_EXECUTE = exports.CTX_OPTIONS_RESET = exports.CTX_OPTIONS_TIMEOUT = exports.DELAY_NONE = exports.CTX_OPTIONS_DELAY = void 0;
|
|
5306
5308
|
exports.$nsp = exports.$faces = exports.UNKNOWN = exports.MAX_RECONNECT_ATTEMPTS = exports.RECONNECT_INTERVAL = exports.APPLIED_CLIENT_WINDOW = exports.APPLIED_VST = exports.REASON_EXPIRED = exports.MF_NONE = exports.MYFACES = exports.DEFERRED_HEAD_INSERTS = exports.UPDATE_ELEMS = exports.UPDATE_FORMS = exports.XML_TAG_ATTR = exports.XML_TAG_AFTER = exports.XML_TAG_BEFORE = void 0;
|
|
5307
5309
|
/*
|
|
@@ -5357,7 +5359,7 @@ exports.ERROR_MESSAGE = "error-message";
|
|
|
5357
5359
|
exports.RESPONSE_TEXT = "responseText";
|
|
5358
5360
|
exports.RESPONSE_XML = "responseXML";
|
|
5359
5361
|
/*ajax errors spec 14.4.2*/
|
|
5360
|
-
exports.
|
|
5362
|
+
exports.HTTP_ERROR = "httpError";
|
|
5361
5363
|
exports.EMPTY_RESPONSE = "emptyResponse";
|
|
5362
5364
|
exports.MALFORMEDXML = "malformedXML";
|
|
5363
5365
|
exports.SERVER_ERROR = "serverError";
|
|
@@ -6744,18 +6746,19 @@ var ErrorType;
|
|
|
6744
6746
|
* I will add deprecated myfaces backwards compatibility attributes as well
|
|
6745
6747
|
*/
|
|
6746
6748
|
class ErrorData extends EventData_1.EventData {
|
|
6747
|
-
constructor(source, errorName, errorMessage, responseText = null, responseXML = null, responseCode =
|
|
6749
|
+
constructor(source, errorName, errorMessage, responseText = null, responseXML = null, responseCode = -1, statusOverride = null, type = ErrorType.CLIENT_ERROR) {
|
|
6748
6750
|
super();
|
|
6749
6751
|
this.type = "error";
|
|
6750
|
-
this.source =
|
|
6751
|
-
this.sourceId = source;
|
|
6752
|
+
this.source = source;
|
|
6752
6753
|
this.type = Const_1.ERROR;
|
|
6753
6754
|
this.errorName = errorName;
|
|
6754
6755
|
//tck requires that the type is prefixed to the message itself (jsdoc also) in case of a server error
|
|
6755
|
-
this.
|
|
6756
|
-
this.responseCode = responseCode
|
|
6756
|
+
this.errorMessage = errorMessage;
|
|
6757
|
+
this.responseCode = `${responseCode}`;
|
|
6757
6758
|
this.responseText = responseText;
|
|
6758
|
-
this.
|
|
6759
|
+
this.responseXML = responseXML;
|
|
6760
|
+
this.status = statusOverride;
|
|
6761
|
+
this.description = `Status: ${this.status}\nResponse Code: ${this.responseCode}\nError Message: ${this.errorMessage}`;
|
|
6759
6762
|
this.typeDetails = type;
|
|
6760
6763
|
if (type == ErrorType.SERVER_ERROR) {
|
|
6761
6764
|
this.serverErrorName = this.errorName;
|
|
@@ -6766,8 +6769,8 @@ class ErrorData extends EventData_1.EventData {
|
|
|
6766
6769
|
var _a, _b, _c, _d;
|
|
6767
6770
|
return new ErrorData((_a = e === null || e === void 0 ? void 0 : e.source) !== null && _a !== void 0 ? _a : "client", (_b = e === null || e === void 0 ? void 0 : e.name) !== null && _b !== void 0 ? _b : Const_1.EMPTY_STR, (_c = e === null || e === void 0 ? void 0 : e.message) !== null && _c !== void 0 ? _c : Const_1.EMPTY_STR, (_d = e === null || e === void 0 ? void 0 : e.stack) !== null && _d !== void 0 ? _d : Const_1.EMPTY_STR);
|
|
6768
6771
|
}
|
|
6769
|
-
static fromHttpConnection(source, name, message, responseText, responseCode, status = Const_1.EMPTY_STR) {
|
|
6770
|
-
return new ErrorData(source, name, message, responseText,
|
|
6772
|
+
static fromHttpConnection(source, name, message, responseText, responseXML, responseCode, status = Const_1.EMPTY_STR) {
|
|
6773
|
+
return new ErrorData(source, name, message, responseText, responseXML, responseCode, status, ErrorType.HTTP_ERROR);
|
|
6771
6774
|
}
|
|
6772
6775
|
static fromGeneric(context, errorCode, errorType = ErrorType.SERVER_ERROR) {
|
|
6773
6776
|
let getMsg = this.getMsg;
|
|
@@ -6776,8 +6779,8 @@ class ErrorData extends EventData_1.EventData {
|
|
|
6776
6779
|
let errorMessage = getMsg(context, Const_1.ERROR_MESSAGE);
|
|
6777
6780
|
let status = getMsg(context, Const_1.STATUS);
|
|
6778
6781
|
let responseText = getMsg(context, Const_1.RESPONSE_TEXT);
|
|
6779
|
-
let responseXML =
|
|
6780
|
-
return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode
|
|
6782
|
+
let responseXML = context.getIf(Const_1.RESPONSE_XML).value;
|
|
6783
|
+
return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode, status, errorType);
|
|
6781
6784
|
}
|
|
6782
6785
|
static getMsg(context, param) {
|
|
6783
6786
|
return getMessage(context.getIf(param).orElse(Const_1.EMPTY_STR).value);
|
|
@@ -8223,7 +8226,7 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8223
8226
|
// reject means clear queue, in this case we abort entirely the processing
|
|
8224
8227
|
// does not happen yet, we have to probably rethink this strategy in the future
|
|
8225
8228
|
// when we introduce cancel functionality
|
|
8226
|
-
this.
|
|
8229
|
+
this.handleHttpError(reject);
|
|
8227
8230
|
}
|
|
8228
8231
|
/**
|
|
8229
8232
|
* request timeout, this must be handled like a generic server error per spec
|
|
@@ -8236,7 +8239,7 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8236
8239
|
// timeout also means we we probably should clear the queue,
|
|
8237
8240
|
// the state is unsafe for the next requests
|
|
8238
8241
|
this.sendEvent(Const_1.STATE_EVT_TIMEOUT);
|
|
8239
|
-
this.
|
|
8242
|
+
this.handleHttpError(resolve);
|
|
8240
8243
|
}
|
|
8241
8244
|
/**
|
|
8242
8245
|
* the response is received and normally is a normal response
|
|
@@ -8247,28 +8250,52 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8247
8250
|
* @private
|
|
8248
8251
|
*/
|
|
8249
8252
|
onResponseReceived(resolve) {
|
|
8250
|
-
var _a
|
|
8253
|
+
var _a;
|
|
8251
8254
|
this.sendEvent(Const_1.COMPLETE);
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8255
|
+
//request error resolution as per spec:
|
|
8256
|
+
if (!this.processRequestErrors(resolve)) {
|
|
8257
|
+
(0, Const_1.$faces)().ajax.response(this.xhrObject, (_a = this.responseContext.value) !== null && _a !== void 0 ? _a : {});
|
|
8258
|
+
}
|
|
8259
|
+
}
|
|
8260
|
+
processRequestErrors(resolve) {
|
|
8261
|
+
var _a, _b, _c;
|
|
8262
|
+
const responseXML = new mona_dish_1.XMLQuery((_a = this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseXML);
|
|
8263
|
+
const responseCode = (_c = (_b = this.xhrObject) === null || _b === void 0 ? void 0 : _b.status) !== null && _c !== void 0 ? _c : -1;
|
|
8264
|
+
if (responseXML.isXMLParserError()) {
|
|
8265
|
+
// invalid response
|
|
8266
|
+
const errorName = "Invalid Response";
|
|
8267
|
+
const errorMessage = "The response xml is invalid";
|
|
8268
|
+
this.handleGenericResponseError(errorName, errorMessage, Const_1.MALFORMEDXML, resolve);
|
|
8269
|
+
return true;
|
|
8270
|
+
}
|
|
8271
|
+
else if (responseXML.isAbsent()) {
|
|
8272
|
+
// empty response
|
|
8273
|
+
const errorName = "Empty Response";
|
|
8274
|
+
const errorMessage = "The response has provided no data";
|
|
8275
|
+
this.handleGenericResponseError(errorName, errorMessage, Const_1.EMPTY_RESPONSE, resolve);
|
|
8276
|
+
return true;
|
|
8277
|
+
}
|
|
8278
|
+
else if (responseCode >= 300 || responseCode < 200) {
|
|
8279
|
+
// other server errors
|
|
8256
8280
|
// all errors from the server are resolved without interfering in the queue
|
|
8257
|
-
this.
|
|
8258
|
-
return;
|
|
8281
|
+
this.handleHttpError(resolve);
|
|
8282
|
+
return true;
|
|
8259
8283
|
}
|
|
8260
|
-
|
|
8284
|
+
//additional errors are application errors and must be handled within the response
|
|
8285
|
+
return false;
|
|
8261
8286
|
}
|
|
8262
|
-
|
|
8287
|
+
handleGenericResponseError(errorName, errorMessage, responseStatus, resolve) {
|
|
8263
8288
|
var _a, _b, _c, _d;
|
|
8289
|
+
const errorData = new ErrorData_1.ErrorData(this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value, errorName, errorMessage, (_b = (_a = this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseText) !== null && _b !== void 0 ? _b : "", (_d = (_c = this.xhrObject) === null || _c === void 0 ? void 0 : _c.responseXML) !== null && _d !== void 0 ? _d : null, this.xhrObject.status, responseStatus);
|
|
8290
|
+
this.finalizeError(errorData, resolve);
|
|
8291
|
+
}
|
|
8292
|
+
handleHttpError(resolveOrReject, errorMessage = "Generic HTTP Serror") {
|
|
8293
|
+
var _a, _b, _c, _d, _e, _f;
|
|
8264
8294
|
this.stopProgress = true;
|
|
8265
|
-
const errorData =
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
responseText: (_d = (_c = this.xhrObject) === null || _c === void 0 ? void 0 : _c.responseText) !== null && _d !== void 0 ? _d : "Error",
|
|
8270
|
-
source: this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value
|
|
8271
|
-
};
|
|
8295
|
+
const errorData = new ErrorData_1.ErrorData(this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value, Const_1.HTTP_ERROR, errorMessage, (_b = (_a = this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseText) !== null && _b !== void 0 ? _b : "", (_d = (_c = this.xhrObject) === null || _c === void 0 ? void 0 : _c.responseXML) !== null && _d !== void 0 ? _d : null, (_f = (_e = this.xhrObject) === null || _e === void 0 ? void 0 : _e.status) !== null && _f !== void 0 ? _f : -1, Const_1.HTTP_ERROR);
|
|
8296
|
+
this.finalizeError(errorData, resolveOrReject);
|
|
8297
|
+
}
|
|
8298
|
+
finalizeError(errorData, resolveOrReject) {
|
|
8272
8299
|
try {
|
|
8273
8300
|
this.handleError(errorData, true);
|
|
8274
8301
|
}
|
|
@@ -8277,8 +8304,8 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8277
8304
|
// reject would clean up the queue
|
|
8278
8305
|
// resolve would trigger the next element in the queue to be processed
|
|
8279
8306
|
resolveOrReject(errorData);
|
|
8307
|
+
this.stopProgress = true;
|
|
8280
8308
|
}
|
|
8281
|
-
// non blocking non clearing
|
|
8282
8309
|
}
|
|
8283
8310
|
/**
|
|
8284
8311
|
* last minute cleanup, the request now either is fully done
|
|
@@ -8335,7 +8362,8 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8335
8362
|
this.reject(e);
|
|
8336
8363
|
}
|
|
8337
8364
|
handleError(exception, responseFormatError = false) {
|
|
8338
|
-
|
|
8365
|
+
var _a;
|
|
8366
|
+
const errorData = (responseFormatError) ? ErrorData_1.ErrorData.fromHttpConnection(exception.source, exception.type, (_a = exception.message) !== null && _a !== void 0 ? _a : Const_1.EMPTY_STR, exception.responseText, exception.responseXML, exception.responseCode, exception.status) : ErrorData_1.ErrorData.fromClient(exception);
|
|
8339
8367
|
const eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
|
|
8340
8368
|
AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
|
|
8341
8369
|
}
|
|
@@ -8349,10 +8377,10 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8349
8377
|
const type = issuingItem.type.orElse("").value.toLowerCase();
|
|
8350
8378
|
//Checkbox and radio only value pass if checked is set, otherwise they should not show
|
|
8351
8379
|
//up at all, and if checked is set, they either can have a value or simply being boolean
|
|
8352
|
-
if ((type ==
|
|
8380
|
+
if ((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO) && !issuingItem.checked) {
|
|
8353
8381
|
return;
|
|
8354
8382
|
}
|
|
8355
|
-
else if ((type ==
|
|
8383
|
+
else if ((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO)) {
|
|
8356
8384
|
arr.assign(issuingItemId).value = itemValue.orElse(true).value;
|
|
8357
8385
|
}
|
|
8358
8386
|
else if (itemValue.isPresent()) {
|
|
@@ -8363,6 +8391,8 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8363
8391
|
}
|
|
8364
8392
|
}
|
|
8365
8393
|
exports.XhrRequest = XhrRequest;
|
|
8394
|
+
XhrRequest.TYPE_CHECKBOX = "checkbox";
|
|
8395
|
+
XhrRequest.TYPE_RADIO = "radio";
|
|
8366
8396
|
|
|
8367
8397
|
|
|
8368
8398
|
/***/ }),
|