jsf.js_next_gen 4.0.2-beta.9 → 4.0.3-beta.2
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 +71 -37
- 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 +71 -37
- 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/package.json +1 -1
- 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 +77 -26
- 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/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 -21
- package/target/impl/xhrCore/XhrRequest.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
package/package.json
CHANGED
|
@@ -153,7 +153,7 @@ export module PushImpl {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
onerror(event: any) {
|
|
156
|
-
let message = JSON.parse(event
|
|
156
|
+
let message = JSON.parse(event?.data ?? null);
|
|
157
157
|
//TODO replace this with a more readable Stream code
|
|
158
158
|
for (let i = clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {
|
|
159
159
|
let socketClientId = clientIdsByTokens[this.channelToken][i];
|
|
@@ -90,7 +90,7 @@ export const RESPONSE_TEXT = "responseText";
|
|
|
90
90
|
export const RESPONSE_XML = "responseXML";
|
|
91
91
|
|
|
92
92
|
/*ajax errors spec 14.4.2*/
|
|
93
|
-
export const
|
|
93
|
+
export const HTTP_ERROR = "httpError";
|
|
94
94
|
export const EMPTY_RESPONSE = "emptyResponse";
|
|
95
95
|
export const MALFORMEDXML = "malformedXML";
|
|
96
96
|
export const SERVER_ERROR = "serverError";
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
import {
|
|
17
17
|
EMPTY_STR, ERROR,
|
|
18
18
|
ERROR_MESSAGE,
|
|
19
|
-
ERROR_NAME,
|
|
19
|
+
ERROR_NAME, HTTP_ERROR,
|
|
20
20
|
RESPONSE_TEXT,
|
|
21
21
|
RESPONSE_XML, SERVER_ERROR,
|
|
22
22
|
SOURCE,
|
|
23
23
|
STATUS,
|
|
24
24
|
UNKNOWN
|
|
25
25
|
} from "../core/Const";
|
|
26
|
-
import {Config} from "mona-dish";
|
|
26
|
+
import {Config, Optional, XMLQuery} from "mona-dish";
|
|
27
27
|
|
|
28
28
|
import {EventData} from "./EventData";
|
|
29
29
|
import {ExtLang} from "../util/Lang";
|
|
@@ -49,8 +49,8 @@ export enum ErrorType {
|
|
|
49
49
|
export class ErrorData extends EventData implements IErrorData {
|
|
50
50
|
|
|
51
51
|
type: string = "error";
|
|
52
|
-
source:
|
|
53
|
-
|
|
52
|
+
source: string;
|
|
53
|
+
|
|
54
54
|
errorName: string;
|
|
55
55
|
errorMessage: string;
|
|
56
56
|
|
|
@@ -62,19 +62,24 @@ export class ErrorData extends EventData implements IErrorData {
|
|
|
62
62
|
|
|
63
63
|
serverErrorName: string;
|
|
64
64
|
serverErrorMessage: string;
|
|
65
|
-
|
|
65
|
+
description: string;
|
|
66
66
|
|
|
67
|
-
constructor(source: string, errorName: string, errorMessage: string, responseText: string = null, responseXML:
|
|
67
|
+
constructor(source: string, errorName: string, errorMessage: string, responseText: string = null, responseXML: Document = null, responseCode: number = -1, statusOverride: string = null, type = ErrorType.CLIENT_ERROR) {
|
|
68
68
|
super();
|
|
69
|
-
this.source =
|
|
70
|
-
this.sourceId = source;
|
|
69
|
+
this.source = source;
|
|
71
70
|
this.type = ERROR;
|
|
72
71
|
this.errorName = errorName;
|
|
72
|
+
|
|
73
73
|
//tck requires that the type is prefixed to the message itself (jsdoc also) in case of a server error
|
|
74
|
-
this.
|
|
75
|
-
this.responseCode = responseCode
|
|
74
|
+
this.errorMessage = errorMessage;
|
|
75
|
+
this.responseCode = `${responseCode}`;
|
|
76
76
|
this.responseText = responseText;
|
|
77
|
-
this.
|
|
77
|
+
this.responseXML = responseXML;
|
|
78
|
+
|
|
79
|
+
this.status = statusOverride;
|
|
80
|
+
|
|
81
|
+
this.description = `Status: ${this.status}\nResponse Code: ${this.responseCode}\nError Message: ${this.errorMessage}`;
|
|
82
|
+
|
|
78
83
|
this.typeDetails = type;
|
|
79
84
|
|
|
80
85
|
if (type == ErrorType.SERVER_ERROR) {
|
|
@@ -87,8 +92,8 @@ export class ErrorData extends EventData implements IErrorData {
|
|
|
87
92
|
return new ErrorData((e as any)?.source ?? "client", e?.name ?? EMPTY_STR, e?.message ?? EMPTY_STR, e?.stack ?? EMPTY_STR);
|
|
88
93
|
}
|
|
89
94
|
|
|
90
|
-
static fromHttpConnection(source: any, name: string, message: string, responseText, responseCode: number, status: string = EMPTY_STR): ErrorData {
|
|
91
|
-
return new ErrorData(source, name, message, responseText,
|
|
95
|
+
static fromHttpConnection(source: any, name: string, message: string, responseText: string, responseXML: Document, responseCode: number, status: string = EMPTY_STR): ErrorData {
|
|
96
|
+
return new ErrorData(source, name, message, responseText, responseXML, responseCode, status, ErrorType.HTTP_ERROR);
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
static fromGeneric(context: Config, errorCode: number, errorType: ErrorType = ErrorType.SERVER_ERROR): ErrorData {
|
|
@@ -100,10 +105,10 @@ export class ErrorData extends EventData implements IErrorData {
|
|
|
100
105
|
let errorMessage = getMsg(context, ERROR_MESSAGE);
|
|
101
106
|
let status = getMsg(context, STATUS);
|
|
102
107
|
let responseText = getMsg(context, RESPONSE_TEXT);
|
|
103
|
-
let responseXML =
|
|
108
|
+
let responseXML: Document = context.getIf(RESPONSE_XML).value;
|
|
104
109
|
|
|
105
110
|
|
|
106
|
-
return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode
|
|
111
|
+
return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode, status, errorType);
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
private static getMsg(context, param) {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import {AsyncRunnable, IAsyncRunnable} from "../util/AsyncRunnable";
|
|
18
|
-
import {Config, DQ} from "mona-dish";
|
|
18
|
+
import {Config, DQ, XMLQuery} from "mona-dish";
|
|
19
19
|
import {Implementation} from "../AjaxImpl";
|
|
20
20
|
|
|
21
21
|
import {XhrFormData} from "./XhrFormData";
|
|
@@ -34,14 +34,22 @@ import {
|
|
|
34
34
|
MALFORMEDXML,
|
|
35
35
|
NO_TIMEOUT,
|
|
36
36
|
ON_ERROR,
|
|
37
|
-
ON_EVENT,
|
|
37
|
+
ON_EVENT,
|
|
38
|
+
P_EXECUTE,
|
|
38
39
|
REQ_ACCEPT,
|
|
39
40
|
REQ_TYPE_GET,
|
|
40
|
-
REQ_TYPE_POST,
|
|
41
|
+
REQ_TYPE_POST,
|
|
42
|
+
SOURCE,
|
|
41
43
|
STATE_EVT_TIMEOUT,
|
|
42
44
|
STD_ACCEPT,
|
|
43
45
|
URL_ENCODED,
|
|
44
|
-
VAL_AJAX,
|
|
46
|
+
VAL_AJAX,
|
|
47
|
+
IDENT_NONE,
|
|
48
|
+
CTX_PARAM_SRC_FRM_ID,
|
|
49
|
+
CTX_PARAM_SRC_CTL_ID,
|
|
50
|
+
CTX_PARAM_PPS,
|
|
51
|
+
EMPTY_RESPONSE, HTTP_ERROR,
|
|
52
|
+
EMPTY_STR, $nsp, P_BEHAVIOR_EVENT
|
|
45
53
|
} from "../core/Const";
|
|
46
54
|
import {
|
|
47
55
|
resolveFinalUrl,
|
|
@@ -130,7 +138,6 @@ export class XhrRequest extends AsyncRunnable<XMLHttpRequest> {
|
|
|
130
138
|
executes, partialIdsArray
|
|
131
139
|
);
|
|
132
140
|
|
|
133
|
-
|
|
134
141
|
this.contentType = formData.isMultipartRequest ? "undefined" : this.contentType;
|
|
135
142
|
|
|
136
143
|
// next step the pass through parameters are merged in for post params
|
|
@@ -283,7 +290,7 @@ export class XhrRequest extends AsyncRunnable<XMLHttpRequest> {
|
|
|
283
290
|
// reject means clear queue, in this case we abort entirely the processing
|
|
284
291
|
// does not happen yet, we have to probably rethink this strategy in the future
|
|
285
292
|
// when we introduce cancel functionality
|
|
286
|
-
this.
|
|
293
|
+
this.handleHttpError(reject);
|
|
287
294
|
}
|
|
288
295
|
|
|
289
296
|
/**
|
|
@@ -297,7 +304,7 @@ export class XhrRequest extends AsyncRunnable<XMLHttpRequest> {
|
|
|
297
304
|
// timeout also means we we probably should clear the queue,
|
|
298
305
|
// the state is unsafe for the next requests
|
|
299
306
|
this.sendEvent(STATE_EVT_TIMEOUT);
|
|
300
|
-
this.
|
|
307
|
+
this.handleHttpError(resolve);
|
|
301
308
|
}
|
|
302
309
|
|
|
303
310
|
/**
|
|
@@ -311,27 +318,66 @@ export class XhrRequest extends AsyncRunnable<XMLHttpRequest> {
|
|
|
311
318
|
private onResponseReceived(resolve: Consumer<any>) {
|
|
312
319
|
|
|
313
320
|
this.sendEvent(COMPLETE);
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
// all errors from the server are resolved without interfering in the queue
|
|
319
|
-
this.handleGenericError(resolve);
|
|
320
|
-
return;
|
|
321
|
+
|
|
322
|
+
//request error resolution as per spec:
|
|
323
|
+
if(!this.processRequestErrors(resolve)) {
|
|
324
|
+
$faces().ajax.response(this.xhrObject, this.responseContext.value ?? {});
|
|
321
325
|
}
|
|
326
|
+
}
|
|
322
327
|
|
|
323
|
-
|
|
328
|
+
private processRequestErrors(resolve: Consumer<any>): boolean {
|
|
329
|
+
const responseXML = new XMLQuery(this.xhrObject?.responseXML);
|
|
330
|
+
const responseCode = this.xhrObject?.status ?? -1;
|
|
331
|
+
if(responseXML.isXMLParserError()) {
|
|
332
|
+
// invalid response
|
|
333
|
+
const errorName = "Invalid Response";
|
|
334
|
+
const errorMessage = "The response xml is invalid";
|
|
335
|
+
|
|
336
|
+
this.handleGenericResponseError(errorName, errorMessage, MALFORMEDXML, resolve);
|
|
337
|
+
return true;
|
|
338
|
+
} else if(responseXML.isAbsent()) {
|
|
339
|
+
// empty response
|
|
340
|
+
const errorName = "Empty Response";
|
|
341
|
+
const errorMessage = "The response has provided no data";
|
|
342
|
+
|
|
343
|
+
this.handleGenericResponseError(errorName, errorMessage, EMPTY_RESPONSE, resolve);
|
|
344
|
+
return true;
|
|
345
|
+
} else if (responseCode >= 300 || responseCode < 200) {
|
|
346
|
+
// other server errors
|
|
347
|
+
// all errors from the server are resolved without interfering in the queue
|
|
348
|
+
this.handleHttpError(resolve);
|
|
349
|
+
return true;
|
|
350
|
+
}
|
|
351
|
+
//additional errors are application errors and must be handled within the response
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
private handleGenericResponseError(errorName: string, errorMessage: string, responseStatus: string, resolve: (s?: any) => void) {
|
|
355
|
+
const errorData: ErrorData = new ErrorData(
|
|
356
|
+
this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value,
|
|
357
|
+
errorName, errorMessage,
|
|
358
|
+
this.xhrObject?.responseText ?? "",
|
|
359
|
+
this.xhrObject?.responseXML ?? null,
|
|
360
|
+
this.xhrObject.status,
|
|
361
|
+
responseStatus
|
|
362
|
+
);
|
|
363
|
+
this.finalizeError(errorData, resolve);
|
|
324
364
|
}
|
|
325
365
|
|
|
326
|
-
private
|
|
366
|
+
private handleHttpError(resolveOrReject: Function, errorMessage: string = "Generic HTTP Serror") {
|
|
327
367
|
this.stopProgress = true;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
368
|
+
|
|
369
|
+
const errorData = new ErrorData(
|
|
370
|
+
this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value,
|
|
371
|
+
HTTP_ERROR, errorMessage,
|
|
372
|
+
this.xhrObject?.responseText ?? "",
|
|
373
|
+
this.xhrObject?.responseXML ?? null,
|
|
374
|
+
this.xhrObject?.status ?? -1,
|
|
375
|
+
HTTP_ERROR
|
|
376
|
+
)
|
|
377
|
+
this.finalizeError(errorData, resolveOrReject);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
private finalizeError(errorData: ErrorData, resolveOrReject: Function) {
|
|
335
381
|
try {
|
|
336
382
|
this.handleError(errorData, true);
|
|
337
383
|
} finally {
|
|
@@ -339,8 +385,8 @@ export class XhrRequest extends AsyncRunnable<XMLHttpRequest> {
|
|
|
339
385
|
// reject would clean up the queue
|
|
340
386
|
// resolve would trigger the next element in the queue to be processed
|
|
341
387
|
resolveOrReject(errorData);
|
|
388
|
+
this.stopProgress = true;
|
|
342
389
|
}
|
|
343
|
-
// non blocking non clearing
|
|
344
390
|
}
|
|
345
391
|
|
|
346
392
|
/**
|
|
@@ -399,7 +445,7 @@ export class XhrRequest extends AsyncRunnable<XMLHttpRequest> {
|
|
|
399
445
|
}
|
|
400
446
|
|
|
401
447
|
private handleError(exception, responseFormatError: boolean = false) {
|
|
402
|
-
const errorData = (responseFormatError) ? ErrorData.fromHttpConnection(exception.source, exception.type, exception.
|
|
448
|
+
const errorData = (responseFormatError) ? ErrorData.fromHttpConnection(exception.source, exception.type, exception.message ?? EMPTY_STR, exception.responseText, exception.responseXML, exception.responseCode, exception.status) : ErrorData.fromClient(exception);
|
|
403
449
|
const eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_ERROR);
|
|
404
450
|
|
|
405
451
|
Implementation.sendError(errorData, eventHandler);
|
|
@@ -407,8 +453,13 @@ export class XhrRequest extends AsyncRunnable<XMLHttpRequest> {
|
|
|
407
453
|
|
|
408
454
|
private appendIssuingItem(formData: XhrFormData) {
|
|
409
455
|
const issuingItemId = this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value;
|
|
456
|
+
|
|
457
|
+
//to avoid sideffects with buttons we only can append the issuing item if no behavior event is set
|
|
458
|
+
//MYFACES-4679!
|
|
459
|
+
const isBehaviorEvent = !!formData.getIf($nsp(P_BEHAVIOR_EVENT)).value;
|
|
460
|
+
|
|
410
461
|
//not encoded
|
|
411
|
-
if(issuingItemId && formData.getIf(issuingItemId).isAbsent()) {
|
|
462
|
+
if(issuingItemId && formData.getIf(issuingItemId).isAbsent() && !isBehaviorEvent) {
|
|
412
463
|
const issuingItem = DQ.byId(issuingItemId);
|
|
413
464
|
const itemValue = issuingItem.inputValue;
|
|
414
465
|
const arr = new ExtConfig({});
|
|
@@ -111,7 +111,7 @@ describe('tests the addOnEvent and addOnError handling', function () {
|
|
|
111
111
|
expect(onErrorCalled1).to.eq(1);
|
|
112
112
|
expect(onErrorCalled2).to.eq(1);
|
|
113
113
|
expect(errorTitle).to.eq('Erro21');
|
|
114
|
-
expect(errorMessage).to.eq('
|
|
114
|
+
expect(errorMessage).to.eq('Error2 Text');
|
|
115
115
|
} finally {
|
|
116
116
|
console.error = oldErr;
|
|
117
117
|
}
|
|
@@ -501,9 +501,9 @@ describe('Tests after core when it hits response', function () {
|
|
|
501
501
|
},
|
|
502
502
|
onerror: (error: any) => {
|
|
503
503
|
expect(error.type).to.eq("error");
|
|
504
|
-
expect(error.status).to.eq(
|
|
505
|
-
expect(!!error.
|
|
506
|
-
expect(!!error.source
|
|
504
|
+
expect(error.status).to.eq(null);
|
|
505
|
+
expect(!!error.errorMessage).to.eq(true);
|
|
506
|
+
expect(!!error.source).to.eq(true);
|
|
507
507
|
expect(!!error.responseCode).to.eq(true);
|
|
508
508
|
expect(!!error.responseText).to.eq(true);
|
|
509
509
|
expect(!error.responseXML).to.eq(true);
|
|
@@ -334,9 +334,9 @@ describe('Tests after core when it hits response', function () {
|
|
|
334
334
|
pass2: "pass2",
|
|
335
335
|
onerror: (error: any) => {
|
|
336
336
|
expect(error.type).to.eq("error");
|
|
337
|
-
expect(error.status).to.eq(
|
|
338
|
-
expect(!!error.
|
|
339
|
-
expect(!!error.source
|
|
337
|
+
expect(error.status).to.eq(null);
|
|
338
|
+
expect(!!error.errorMessage).to.eq(true);
|
|
339
|
+
expect(!!error.source).to.eq(true);
|
|
340
340
|
expect(!!error.responseCode).to.eq(true);
|
|
341
341
|
expect(!!error.responseText).to.eq(true);
|
|
342
342
|
expect(!error.responseXML).to.eq(true);
|
|
@@ -739,8 +739,8 @@ describe('Tests of the various aspects of the response protocol functionality',
|
|
|
739
739
|
let errorCalled = 0;
|
|
740
740
|
faces.ajax.addOnError((error) => {
|
|
741
741
|
expect(error.errorName).to.eq("jakarta.faces.application.ViewExpiredException");
|
|
742
|
-
expect(error.errorMessage).to.eq("
|
|
743
|
-
expect(error.source
|
|
742
|
+
expect(error.errorMessage).to.eq("View \"/testhmtl.xhtml\" could not be restored.");
|
|
743
|
+
expect(error.source).to.eq("form1x:button");
|
|
744
744
|
errorCalled++;
|
|
745
745
|
});
|
|
746
746
|
|
package/target/impl/PushImpl.js
CHANGED
|
@@ -134,14 +134,14 @@ var PushImpl;
|
|
|
134
134
|
this.reconnectAttempts = 0;
|
|
135
135
|
}
|
|
136
136
|
onerror(event) {
|
|
137
|
-
var _a, _b;
|
|
138
|
-
let message = JSON.parse(event.data);
|
|
137
|
+
var _a, _b, _c;
|
|
138
|
+
let message = JSON.parse((_a = event === null || event === void 0 ? void 0 : event.data) !== null && _a !== void 0 ? _a : null);
|
|
139
139
|
//TODO replace this with a more readable Stream code
|
|
140
140
|
for (let i = PushImpl.clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {
|
|
141
141
|
let socketClientId = PushImpl.clientIdsByTokens[this.channelToken][i];
|
|
142
142
|
if (document.getElementById(socketClientId)) {
|
|
143
143
|
try {
|
|
144
|
-
(
|
|
144
|
+
(_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);
|
|
145
145
|
}
|
|
146
146
|
catch (e) {
|
|
147
147
|
//Ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushImpl.js","sourceRoot":"","sources":["../../src/main/typescript/impl/PushImpl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AACH,wCAAwF;AACxF,yCAA6B;AAE7B;;GAEG;AACH,IAAc,QAAQ,CAwPrB;AAxPD,WAAc,QAAQ;IAElB,MAAM,YAAY,GAAG,cAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC;IAGhF,sDAAsD;IACtD,iDAAiD;IAEjD,yBAAyB;IACd,gBAAO,GAAG,EAAE,CAAC;IACxB,sCAAsC;IAC3B,mBAAU,GAAG,EAAE,CAAC;IAC3B,sDAAsD;IAC3C,0BAAiB,GAAG,EAAE,CAAC;IAGlC,qBAAqB;IACrB,SAAgB,KAAK;QACjB,SAAA,OAAO,GAAG,EAAE,CAAC;QACb,SAAA,UAAU,GAAG,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C,CAAC;IAChF,CAAC;AAEL,CAAC,EAxPa,QAAQ,wBAAR,QAAQ,QAwPrB"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.CTX_OPTIONS_PARAMS = exports.TIMEOUT_EVENT = exports.CLIENT_ERROR = exports.SERVER_ERROR = exports.MALFORMEDXML = exports.EMPTY_RESPONSE = exports.
|
|
18
|
+
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;
|
|
19
19
|
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;
|
|
20
20
|
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;
|
|
21
21
|
/*
|
|
@@ -71,7 +71,7 @@ exports.ERROR_MESSAGE = "error-message";
|
|
|
71
71
|
exports.RESPONSE_TEXT = "responseText";
|
|
72
72
|
exports.RESPONSE_XML = "responseXML";
|
|
73
73
|
/*ajax errors spec 14.4.2*/
|
|
74
|
-
exports.
|
|
74
|
+
exports.HTTP_ERROR = "httpError";
|
|
75
75
|
exports.EMPTY_RESPONSE = "emptyResponse";
|
|
76
76
|
exports.MALFORMEDXML = "malformedXML";
|
|
77
77
|
exports.SERVER_ERROR = "serverError";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Const.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/core/Const.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;AAEH;;GAEG;AAEU,QAAA,uBAAuB,GAAG,eAAe,CAAC;AAC1C,QAAA,cAAc,GAAG,eAAe,CAAC;AAEjC,QAAA,aAAa,GAAG,sBAAsB,CAAC;AACvC,QAAA,mBAAmB,GAAG,2BAA2B,CAAC;AAElD,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAC3B,QAAA,WAAW,GAAG,yBAAyB,CAAC;AACxC,QAAA,eAAe,GAAG,4BAA4B,CAAC;AAC/C,QAAA,UAAU,GAAG,wBAAwB,CAAC;AACtC,QAAA,UAAU,GAAG,wBAAwB,CAAC;AACtC,QAAA,UAAU,GAAG,wBAAwB,CAAC;AAEtC,QAAA,UAAU,GAAG,wBAAwB,CAAC;AAEnD,2BAA2B;AAEd,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;AAC7C,CAAC,CAAC,CAAC;AACU,QAAA,SAAS,GAAG,EAAE,CAAC;AACf,QAAA,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE9B,QAAA,cAAc,GAAG,CAAC,sBAAsB,EAAE,QAAQ,EAAE,mBAAW,EAAE,eAAe,CAAC,CAAC,IAAI,CAAC,iBAAS,CAAC,CAAC;AAClG,Q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AAA,OAAO,GAAG,SAAS,CAAC;AAEjC;;;;;;GAMG;AAEH,SAAgB,MAAM;;IACjB,OAAO,CAAC,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,mCAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAa,CAAC;AACvD,CAAC;AAFD,wBAEC;AAED,SAAgB,IAAI,CAAC,cAAoB;IACpC,IAAG,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,OAAO,CAAA,EAAE;QAC7C,OAAO,cAAc,CAAC;KAC1B;IACD,OAAO,CAAC,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAA,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,gBAAgB,EAAC,eAAe,CAAC,CAAA,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;AACpJ,CAAC;AALD,oBAKC"}
|
|
@@ -37,18 +37,19 @@ var ErrorType;
|
|
|
37
37
|
* I will add deprecated myfaces backwards compatibility attributes as well
|
|
38
38
|
*/
|
|
39
39
|
class ErrorData extends EventData_1.EventData {
|
|
40
|
-
constructor(source, errorName, errorMessage, responseText = null, responseXML = null, responseCode =
|
|
40
|
+
constructor(source, errorName, errorMessage, responseText = null, responseXML = null, responseCode = -1, statusOverride = null, type = ErrorType.CLIENT_ERROR) {
|
|
41
41
|
super();
|
|
42
42
|
this.type = "error";
|
|
43
|
-
this.source =
|
|
44
|
-
this.sourceId = source;
|
|
43
|
+
this.source = source;
|
|
45
44
|
this.type = Const_1.ERROR;
|
|
46
45
|
this.errorName = errorName;
|
|
47
46
|
//tck requires that the type is prefixed to the message itself (jsdoc also) in case of a server error
|
|
48
|
-
this.
|
|
49
|
-
this.responseCode = responseCode
|
|
47
|
+
this.errorMessage = errorMessage;
|
|
48
|
+
this.responseCode = `${responseCode}`;
|
|
50
49
|
this.responseText = responseText;
|
|
51
|
-
this.
|
|
50
|
+
this.responseXML = responseXML;
|
|
51
|
+
this.status = statusOverride;
|
|
52
|
+
this.description = `Status: ${this.status}\nResponse Code: ${this.responseCode}\nError Message: ${this.errorMessage}`;
|
|
52
53
|
this.typeDetails = type;
|
|
53
54
|
if (type == ErrorType.SERVER_ERROR) {
|
|
54
55
|
this.serverErrorName = this.errorName;
|
|
@@ -59,8 +60,8 @@ class ErrorData extends EventData_1.EventData {
|
|
|
59
60
|
var _a, _b, _c, _d;
|
|
60
61
|
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);
|
|
61
62
|
}
|
|
62
|
-
static fromHttpConnection(source, name, message, responseText, responseCode, status = Const_1.EMPTY_STR) {
|
|
63
|
-
return new ErrorData(source, name, message, responseText,
|
|
63
|
+
static fromHttpConnection(source, name, message, responseText, responseXML, responseCode, status = Const_1.EMPTY_STR) {
|
|
64
|
+
return new ErrorData(source, name, message, responseText, responseXML, responseCode, status, ErrorType.HTTP_ERROR);
|
|
64
65
|
}
|
|
65
66
|
static fromGeneric(context, errorCode, errorType = ErrorType.SERVER_ERROR) {
|
|
66
67
|
let getMsg = this.getMsg;
|
|
@@ -69,8 +70,8 @@ class ErrorData extends EventData_1.EventData {
|
|
|
69
70
|
let errorMessage = getMsg(context, Const_1.ERROR_MESSAGE);
|
|
70
71
|
let status = getMsg(context, Const_1.STATUS);
|
|
71
72
|
let responseText = getMsg(context, Const_1.RESPONSE_TEXT);
|
|
72
|
-
let responseXML =
|
|
73
|
-
return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode
|
|
73
|
+
let responseXML = context.getIf(Const_1.RESPONSE_XML).value;
|
|
74
|
+
return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode, status, errorType);
|
|
74
75
|
}
|
|
75
76
|
static getMsg(context, param) {
|
|
76
77
|
return getMessage(context.getIf(param).orElse(Const_1.EMPTY_STR).value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/ErrorData.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCASuB;AAGvB,2CAAsC;AACtC,uCAAqC;AACrC,IAAO,UAAU,GAAG,cAAO,CAAC,UAAU,CAAC;AAGvC,IAAY,SAKX;AALD,WAAY,SAAS;IACjB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,0CAA6B,CAAA;IAC7B,gCAAmB,CAAA;AACvB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED;;;;;;;;GAQG;AACH,MAAa,SAAU,SAAQ,qBAAS;IAkBpC,YAAY,MAAc,EAAE,SAAiB,EAAE,YAAoB,EAAE,eAAuB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"ErrorData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/ErrorData.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCASuB;AAGvB,2CAAsC;AACtC,uCAAqC;AACrC,IAAO,UAAU,GAAG,cAAO,CAAC,UAAU,CAAC;AAGvC,IAAY,SAKX;AALD,WAAY,SAAS;IACjB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;IACxB,0CAA6B,CAAA;IAC7B,gCAAmB,CAAA;AACvB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED;;;;;;;;GAQG;AACH,MAAa,SAAU,SAAQ,qBAAS;IAkBpC,YAAY,MAAc,EAAE,SAAiB,EAAE,YAAoB,EAAE,eAAu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AAE,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;CAEJ;AAzED,8BAyEC"}
|
|
@@ -218,7 +218,7 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
218
218
|
// reject means clear queue, in this case we abort entirely the processing
|
|
219
219
|
// does not happen yet, we have to probably rethink this strategy in the future
|
|
220
220
|
// when we introduce cancel functionality
|
|
221
|
-
this.
|
|
221
|
+
this.handleHttpError(reject);
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
224
|
* request timeout, this must be handled like a generic server error per spec
|
|
@@ -231,7 +231,7 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
231
231
|
// timeout also means we we probably should clear the queue,
|
|
232
232
|
// the state is unsafe for the next requests
|
|
233
233
|
this.sendEvent(Const_1.STATE_EVT_TIMEOUT);
|
|
234
|
-
this.
|
|
234
|
+
this.handleHttpError(resolve);
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
237
|
* the response is received and normally is a normal response
|
|
@@ -242,28 +242,52 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
242
242
|
* @private
|
|
243
243
|
*/
|
|
244
244
|
onResponseReceived(resolve) {
|
|
245
|
-
var _a
|
|
245
|
+
var _a;
|
|
246
246
|
this.sendEvent(Const_1.COMPLETE);
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
//request error resolution as per spec:
|
|
248
|
+
if (!this.processRequestErrors(resolve)) {
|
|
249
|
+
(0, Const_1.$faces)().ajax.response(this.xhrObject, (_a = this.responseContext.value) !== null && _a !== void 0 ? _a : {});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
processRequestErrors(resolve) {
|
|
253
|
+
var _a, _b, _c;
|
|
254
|
+
const responseXML = new mona_dish_1.XMLQuery((_a = this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseXML);
|
|
255
|
+
const responseCode = (_c = (_b = this.xhrObject) === null || _b === void 0 ? void 0 : _b.status) !== null && _c !== void 0 ? _c : -1;
|
|
256
|
+
if (responseXML.isXMLParserError()) {
|
|
257
|
+
// invalid response
|
|
258
|
+
const errorName = "Invalid Response";
|
|
259
|
+
const errorMessage = "The response xml is invalid";
|
|
260
|
+
this.handleGenericResponseError(errorName, errorMessage, Const_1.MALFORMEDXML, resolve);
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
else if (responseXML.isAbsent()) {
|
|
264
|
+
// empty response
|
|
265
|
+
const errorName = "Empty Response";
|
|
266
|
+
const errorMessage = "The response has provided no data";
|
|
267
|
+
this.handleGenericResponseError(errorName, errorMessage, Const_1.EMPTY_RESPONSE, resolve);
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
else if (responseCode >= 300 || responseCode < 200) {
|
|
271
|
+
// other server errors
|
|
251
272
|
// all errors from the server are resolved without interfering in the queue
|
|
252
|
-
this.
|
|
253
|
-
return;
|
|
273
|
+
this.handleHttpError(resolve);
|
|
274
|
+
return true;
|
|
254
275
|
}
|
|
255
|
-
|
|
276
|
+
//additional errors are application errors and must be handled within the response
|
|
277
|
+
return false;
|
|
256
278
|
}
|
|
257
|
-
|
|
279
|
+
handleGenericResponseError(errorName, errorMessage, responseStatus, resolve) {
|
|
258
280
|
var _a, _b, _c, _d;
|
|
281
|
+
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);
|
|
282
|
+
this.finalizeError(errorData, resolve);
|
|
283
|
+
}
|
|
284
|
+
handleHttpError(resolveOrReject, errorMessage = "Generic HTTP Serror") {
|
|
285
|
+
var _a, _b, _c, _d, _e, _f;
|
|
259
286
|
this.stopProgress = true;
|
|
260
|
-
const errorData =
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
responseText: (_d = (_c = this.xhrObject) === null || _c === void 0 ? void 0 : _c.responseText) !== null && _d !== void 0 ? _d : "Error",
|
|
265
|
-
source: this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value
|
|
266
|
-
};
|
|
287
|
+
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);
|
|
288
|
+
this.finalizeError(errorData, resolveOrReject);
|
|
289
|
+
}
|
|
290
|
+
finalizeError(errorData, resolveOrReject) {
|
|
267
291
|
try {
|
|
268
292
|
this.handleError(errorData, true);
|
|
269
293
|
}
|
|
@@ -272,8 +296,8 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
272
296
|
// reject would clean up the queue
|
|
273
297
|
// resolve would trigger the next element in the queue to be processed
|
|
274
298
|
resolveOrReject(errorData);
|
|
299
|
+
this.stopProgress = true;
|
|
275
300
|
}
|
|
276
|
-
// non blocking non clearing
|
|
277
301
|
}
|
|
278
302
|
/**
|
|
279
303
|
* last minute cleanup, the request now either is fully done
|
|
@@ -330,14 +354,18 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
330
354
|
this.reject(e);
|
|
331
355
|
}
|
|
332
356
|
handleError(exception, responseFormatError = false) {
|
|
333
|
-
|
|
357
|
+
var _a;
|
|
358
|
+
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);
|
|
334
359
|
const eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
|
|
335
360
|
AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
|
|
336
361
|
}
|
|
337
362
|
appendIssuingItem(formData) {
|
|
338
363
|
const issuingItemId = this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value;
|
|
364
|
+
//to avoid sideffects with buttons we only can append the issuing item if no behavior event is set
|
|
365
|
+
//MYFACES-4679!
|
|
366
|
+
const isBehaviorEvent = !!formData.getIf((0, Const_1.$nsp)(Const_1.P_BEHAVIOR_EVENT)).value;
|
|
339
367
|
//not encoded
|
|
340
|
-
if (issuingItemId && formData.getIf(issuingItemId).isAbsent()) {
|
|
368
|
+
if (issuingItemId && formData.getIf(issuingItemId).isAbsent() && !isBehaviorEvent) {
|
|
341
369
|
const issuingItem = mona_dish_1.DQ.byId(issuingItemId);
|
|
342
370
|
const itemValue = issuingItem.inputValue;
|
|
343
371
|
const arr = new ExtDomQuery_1.ExtConfig({});
|