From 7e9dd6666d8d3567ffe4482c200ddbaca487b1f0 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Thu, 11 Jul 2024 16:22:08 +0200 Subject: [PATCH 1/3] Improvements for Web Components Improvements that allow applications with Web Components to run with a lower overhead. --- .../WASingleElementCacheTest.class/README.md | 0 .../instance/createCache.st | 3 +++ .../instance/testClear.st | 5 +++++ .../instance/testKeyAtValue.st | 5 +++++ .../instance/testKeysAndValuesDo.st | 13 +++++++++++++ .../instance/testSize.st | 7 +++++++ .../instance/testStore.st | 10 ++++++++++ .../WASingleElementCacheTest.class/properties.json | 11 +++++++++++ .../WASingleContinuationSession.class/README.md | 1 + .../instance/createContinuationCache.st | 3 +++ .../properties.json | 11 +++++++++++ .../WASingleElementCache.class/README.md | 1 + .../instance/at.ifAbsent..st | 5 +++++ .../WASingleElementCache.class/instance/at.put..st | 5 +++++ .../WASingleElementCache.class/instance/clear.st | 4 ++++ .../instance/keyAtValue.ifAbsent..st | 5 +++++ .../instance/keysAndValuesDo..st | 4 ++++ .../WASingleElementCache.class/instance/remove..st | 5 +++++ .../WASingleElementCache.class/instance/size.st | 5 +++++ .../WASingleElementCache.class/instance/store..st | 5 +++++ .../WASingleElementCache.class/properties.json | 14 ++++++++++++++ .../README.md | 7 +++++++ .../instance/basicPerformAction.st | 4 ++++ .../instance/continue.st | 4 ++++ .../instance/handle..st | 4 ++++ .../instance/jumpToAnchor..st | 3 +++ .../instance/shouldRedirect.st | 3 +++ .../properties.json | 11 +++++++++++ .../WAHeadlessCounter.class/class/initialize.st | 7 +++++-- 29 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/README.md create mode 100644 repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/createCache.st create mode 100644 repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testClear.st create mode 100644 repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeyAtValue.st create mode 100644 repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeysAndValuesDo.st create mode 100644 repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testSize.st create mode 100644 repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testStore.st create mode 100644 repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/properties.json create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/README.md create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/instance/createContinuationCache.st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/properties.json create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/README.md create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/at.ifAbsent..st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/at.put..st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/clear.st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/keyAtValue.ifAbsent..st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/keysAndValuesDo..st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/remove..st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/size.st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/store..st create mode 100644 repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/properties.json create mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/README.md create mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/basicPerformAction.st create mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/continue.st create mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/handle..st create mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/jumpToAnchor..st create mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/shouldRedirect.st create mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/properties.json diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/README.md b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/createCache.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/createCache.st new file mode 100644 index 000000000..3a16ab7ef --- /dev/null +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/createCache.st @@ -0,0 +1,3 @@ +private +createCache + ^ WASingleElementCache new \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testClear.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testClear.st new file mode 100644 index 000000000..15d54689a --- /dev/null +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testClear.st @@ -0,0 +1,5 @@ +testing +testClear + cache at: 1 put: 'one'. + cache clear. + self assert: (cache at: 1 ifAbsent: [ 'two' ]) = 'two'. \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeyAtValue.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeyAtValue.st new file mode 100644 index 000000000..b45feec56 --- /dev/null +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeyAtValue.st @@ -0,0 +1,5 @@ +testing +testKeyAtValue + cache at: 1 put: 'one'. + self assert: (cache keyAtValue: 'one' ifAbsent: [ 2 ]) = 1. + self assert: (cache keyAtValue: 'two' ifAbsent: [ 2 ]) = 2. \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeysAndValuesDo.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeysAndValuesDo.st new file mode 100644 index 000000000..314f908aa --- /dev/null +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeysAndValuesDo.st @@ -0,0 +1,13 @@ +testing +testKeysAndValuesDo + | reference readBack | + reference := Dictionary new. + + cache at: 1 put: 'one'. + reference at: 1 put: 'one'. + + readBack := Dictionary new. + cache keysAndValuesDo: [ :key :value | + readBack at: key put: value ]. + + self assert: readBack = reference \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testSize.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testSize.st new file mode 100644 index 000000000..ec347265f --- /dev/null +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testSize.st @@ -0,0 +1,7 @@ +testing +testSize + self assert: cache size = 0. + cache at: 1 put: 'one'. + self assert: cache size = 1. + cache at: 2 put: 'two'. + self assert: cache size = 1. \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testStore.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testStore.st new file mode 100644 index 000000000..a4db49ee5 --- /dev/null +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testStore.st @@ -0,0 +1,10 @@ +testing +testStore + | generator | + generator := WAPrecomputedKeyGenerator keys: #(1 2 3). + WAKeyGenerator + use: generator + during: [ + self assert: (cache store: 'key1') = 1. + self assert: (cache store: 'key2') = 2. + self assert: (cache store: 'key3') = 3 ] \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/properties.json b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/properties.json new file mode 100644 index 000000000..384bb7bc1 --- /dev/null +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "WACacheTest", + "category" : "Seaside-Tests-WebComponents", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WASingleElementCacheTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/README.md b/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/README.md new file mode 100644 index 000000000..fd3429bf2 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/README.md @@ -0,0 +1 @@ +I am a session that stores only a single continuation. I am usesful for cases where state snapshots are not used. \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/instance/createContinuationCache.st b/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/instance/createContinuationCache.st new file mode 100644 index 000000000..1b73a228e --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/instance/createContinuationCache.st @@ -0,0 +1,3 @@ +initialization +createContinuationCache + ^ WASingleElementCache new \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/properties.json b/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/properties.json new file mode 100644 index 000000000..70e62db54 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleContinuationSession.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "xxx 7/11/2024 13:25", + "super" : "WASession", + "category" : "Seaside-WebComponents-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WASingleContinuationSession", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/README.md b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/README.md new file mode 100644 index 000000000..7969adc1a --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/README.md @@ -0,0 +1 @@ +I am a cache that contains at most one element. \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/at.ifAbsent..st b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/at.ifAbsent..st new file mode 100644 index 000000000..16bb0625a --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/at.ifAbsent..st @@ -0,0 +1,5 @@ +accessing +at: aKey ifAbsent: aBlock + ^ key = aKey + ifTrue: [ value ] + ifFalse: [ aBlock value ] \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/at.put..st b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/at.put..st new file mode 100644 index 000000000..93fd31d8e --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/at.put..st @@ -0,0 +1,5 @@ +putting +at: aKey put: anObject + key := aKey. + value := anObject. + ^ anObject \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/clear.st b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/clear.st new file mode 100644 index 000000000..cced06de9 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/clear.st @@ -0,0 +1,4 @@ +public +clear + key := nil. + value := nil \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/keyAtValue.ifAbsent..st b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/keyAtValue.ifAbsent..st new file mode 100644 index 000000000..c3f134f20 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/keyAtValue.ifAbsent..st @@ -0,0 +1,5 @@ +accessing +keyAtValue: anObject ifAbsent: aBlock + ^ value = anObject + ifTrue: [ key ] + ifFalse: [ aBlock value ] \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/keysAndValuesDo..st b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/keysAndValuesDo..st new file mode 100644 index 000000000..2b7921107 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/keysAndValuesDo..st @@ -0,0 +1,4 @@ +enumerating +keysAndValuesDo: aTwoArgumentBlock + key isNil ifFalse: [ + aTwoArgumentBlock value: key value: value ] \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/remove..st b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/remove..st new file mode 100644 index 000000000..714714737 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/remove..st @@ -0,0 +1,5 @@ +removing +remove: anObject + value = anObject ifTrue: [ + key := nil. + value := nil ] \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/size.st b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/size.st new file mode 100644 index 000000000..72158098f --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/size.st @@ -0,0 +1,5 @@ +accessing +size + ^ key isNil + ifTrue: [ 0 ] + ifFalse: [ 1 ] \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/store..st b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/store..st new file mode 100644 index 000000000..a65683aaf --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/instance/store..st @@ -0,0 +1,5 @@ +putting +store: anObject + key := WAKeyGenerator current keyOfLength: self keySize. + value := anObject. + ^ key \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/properties.json b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/properties.json new file mode 100644 index 000000000..7d5bc5589 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WASingleElementCache.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "xxx 7/11/2024 10:46", + "super" : "WACache", + "category" : "Seaside-WebComponents-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "key", + "value" + ], + "name" : "WASingleElementCache", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/README.md b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/README.md new file mode 100644 index 000000000..50c65bedf --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/README.md @@ -0,0 +1,7 @@ +I am a special action continuation with optimizations for web components. + +Since web components have no back button and a full page reload results in an entire new page I perform the following optimizations. + +- I do not redirect. +- I do not capture the state. +- I do not restore the state. \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/basicPerformAction.st b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/basicPerformAction.st new file mode 100644 index 000000000..27f7b0120 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/basicPerformAction.st @@ -0,0 +1,4 @@ +processing +basicPerformAction + super basicPerformAction. + self renderContext callbacks handle: self requestContext \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/continue.st b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/continue.st new file mode 100644 index 000000000..f1d256874 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/continue.st @@ -0,0 +1,4 @@ +processing +continue + "do not capture state" + self createRenderContinuation handle: self requestContext \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/handle..st b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/handle..st new file mode 100644 index 000000000..cb192651d --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/handle..st @@ -0,0 +1,4 @@ +handling +handle: aRequestContext + "don't restore states" + self withUnregisteredHandlerDo: [ super handle: aRequestContext ] \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/jumpToAnchor..st b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/jumpToAnchor..st new file mode 100644 index 000000000..537f40290 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/jumpToAnchor..st @@ -0,0 +1,3 @@ +public +jumpToAnchor: aString + "Intentionally empty for compatibility with WACallbackProcessingActionContinuation" \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/shouldRedirect.st b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/shouldRedirect.st new file mode 100644 index 000000000..1bc3adca8 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/shouldRedirect.st @@ -0,0 +1,3 @@ +private +shouldRedirect + ^ false \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/properties.json b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/properties.json new file mode 100644 index 000000000..83cf5ff4b --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "xxx 7/11/2024 13:24", + "super" : "WAActionPhaseContinuation", + "category" : "Seaside-WebComponents-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WAWebComponentActionContinuation", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Examples.package/WAHeadlessCounter.class/class/initialize.st b/repository/Seaside-WebComponents-Examples.package/WAHeadlessCounter.class/class/initialize.st index 26ef1e1a2..1f19723bc 100644 --- a/repository/Seaside-WebComponents-Examples.package/WAHeadlessCounter.class/class/initialize.st +++ b/repository/Seaside-WebComponents-Examples.package/WAHeadlessCounter.class/class/initialize.st @@ -4,5 +4,8 @@ initialize "register such that we do not have the developer tools" application := WAAdmin register: WAApplication at: 'examples/headless-counter' in: WAAdmin defaultDispatcher. application configuration addParent: WARenderLoopConfiguration instance. - application rootClass: self. - application preferenceAt: #renderPhaseContinuationClass put: WAFragmentRenderPhaseContinuation \ No newline at end of file + application + rootClass: self; + sessionClass: WASingleContinuationSession; + preferenceAt: #renderPhaseContinuationClass put: WAFragmentRenderPhaseContinuation; + preferenceAt: #actionPhaseContinuationClass put: WAWebComponentActionContinuation \ No newline at end of file From 2f53e950c75b8a2ca8482da0dd52ee39aa682271 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Sun, 13 Oct 2024 17:37:06 +0200 Subject: [PATCH 2/3] fix typo --- .../instance/seasideWebComponentsJs.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentsLibrary.class/instance/seasideWebComponentsJs.st b/repository/Seaside-WebComponents-Core.package/WAWebComponentsLibrary.class/instance/seasideWebComponentsJs.st index d0407b869..e0a5a48e4 100644 --- a/repository/Seaside-WebComponents-Core.package/WAWebComponentsLibrary.class/instance/seasideWebComponentsJs.st +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentsLibrary.class/instance/seasideWebComponentsJs.st @@ -37,7 +37,7 @@ seasideWebComponentsJs #load(method, url, data) { const xhr = new XMLHttpRequest(); - xhr.responseType = "text"; // we do not stirp anyhing, just use innerHtml + xhr.responseType = "text"; // we do not strip anyhing, just use innerHtml xhr.addEventListener("load", (event) => { if (xhr.status === 200) { this.#shadowRoot.innerHTML = xhr.response; From f6be4f2120a708f34d58e43153fa2deaa7c195d3 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Sun, 20 Oct 2024 16:36:19 +0200 Subject: [PATCH 3/3] Review comments --- .../WASessionContinuation.class/instance/handle..st | 2 +- .../WASessionContinuation.class/instance/restoreState.st | 4 ++++ .../WASingleElementCacheTest.class/instance/testClear.st | 2 +- .../instance/testKeyAtValue.st | 4 ++-- .../instance/testKeysAndValuesDo.st | 2 +- .../WASingleElementCacheTest.class/instance/testSize.st | 6 +++--- .../WASingleElementCacheTest.class/instance/testStore.st | 6 +++--- .../instance/handle..st | 4 ---- .../instance/restoreState.st | 3 +++ .../class/initialize.st | 7 ++++++- 10 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 repository/Seaside-Session.package/WASessionContinuation.class/instance/restoreState.st delete mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/handle..st create mode 100644 repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/restoreState.st diff --git a/repository/Seaside-Session.package/WASessionContinuation.class/instance/handle..st b/repository/Seaside-Session.package/WASessionContinuation.class/instance/handle..st index 99744e2f2..c3e2a2647 100644 --- a/repository/Seaside-Session.package/WASessionContinuation.class/instance/handle..st +++ b/repository/Seaside-Session.package/WASessionContinuation.class/instance/handle..st @@ -2,5 +2,5 @@ handling handle: aRequestContext "Resume processing of a request. To ensure valid application state restore all registered states." - self states restore. + self restoreState. self withUnregisteredHandlerDo: [ super handle: aRequestContext ] \ No newline at end of file diff --git a/repository/Seaside-Session.package/WASessionContinuation.class/instance/restoreState.st b/repository/Seaside-Session.package/WASessionContinuation.class/instance/restoreState.st new file mode 100644 index 000000000..cc792ac5b --- /dev/null +++ b/repository/Seaside-Session.package/WASessionContinuation.class/instance/restoreState.st @@ -0,0 +1,4 @@ +processing +restoreState + + self states restore \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testClear.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testClear.st index 15d54689a..cfa06970f 100644 --- a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testClear.st +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testClear.st @@ -2,4 +2,4 @@ testing testClear cache at: 1 put: 'one'. cache clear. - self assert: (cache at: 1 ifAbsent: [ 'two' ]) = 'two'. \ No newline at end of file + self assert: (cache at: 1 ifAbsent: [ 'two' ]) equals: 'two'. \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeyAtValue.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeyAtValue.st index b45feec56..b214dd2eb 100644 --- a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeyAtValue.st +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeyAtValue.st @@ -1,5 +1,5 @@ testing testKeyAtValue cache at: 1 put: 'one'. - self assert: (cache keyAtValue: 'one' ifAbsent: [ 2 ]) = 1. - self assert: (cache keyAtValue: 'two' ifAbsent: [ 2 ]) = 2. \ No newline at end of file + self assert: (cache keyAtValue: 'one' ifAbsent: [ 2 ]) equals: 1. + self assert: (cache keyAtValue: 'two' ifAbsent: [ 2 ]) equals: 2. \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeysAndValuesDo.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeysAndValuesDo.st index 314f908aa..020fd452e 100644 --- a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeysAndValuesDo.st +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testKeysAndValuesDo.st @@ -10,4 +10,4 @@ testKeysAndValuesDo cache keysAndValuesDo: [ :key :value | readBack at: key put: value ]. - self assert: readBack = reference \ No newline at end of file + self assert: readBack equals: reference \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testSize.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testSize.st index ec347265f..336f14a99 100644 --- a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testSize.st +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testSize.st @@ -1,7 +1,7 @@ testing testSize - self assert: cache size = 0. + self assert: cache size equals: 0. cache at: 1 put: 'one'. - self assert: cache size = 1. + self assert: cache size equals: 1. cache at: 2 put: 'two'. - self assert: cache size = 1. \ No newline at end of file + self assert: cache size equals: 1. \ No newline at end of file diff --git a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testStore.st b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testStore.st index a4db49ee5..64de69d88 100644 --- a/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testStore.st +++ b/repository/Seaside-Tests-WebComponents.package/WASingleElementCacheTest.class/instance/testStore.st @@ -5,6 +5,6 @@ testStore WAKeyGenerator use: generator during: [ - self assert: (cache store: 'key1') = 1. - self assert: (cache store: 'key2') = 2. - self assert: (cache store: 'key3') = 3 ] \ No newline at end of file + self assert: (cache store: 'key1') equals: 1. + self assert: (cache store: 'key2') equals: 2. + self assert: (cache store: 'key3') equals: 3 ] \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/handle..st b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/handle..st deleted file mode 100644 index cb192651d..000000000 --- a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/handle..st +++ /dev/null @@ -1,4 +0,0 @@ -handling -handle: aRequestContext - "don't restore states" - self withUnregisteredHandlerDo: [ super handle: aRequestContext ] \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/restoreState.st b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/restoreState.st new file mode 100644 index 000000000..faf0810b4 --- /dev/null +++ b/repository/Seaside-WebComponents-Core.package/WAWebComponentActionContinuation.class/instance/restoreState.st @@ -0,0 +1,3 @@ +processing +restoreState + "don't restore states" \ No newline at end of file diff --git a/repository/Seaside-WebComponents-Examples.package/WAWebComponentsDemoApplication.class/class/initialize.st b/repository/Seaside-WebComponents-Examples.package/WAWebComponentsDemoApplication.class/class/initialize.st index 2c3ed2e96..ce78a79b1 100644 --- a/repository/Seaside-WebComponents-Examples.package/WAWebComponentsDemoApplication.class/class/initialize.st +++ b/repository/Seaside-WebComponents-Examples.package/WAWebComponentsDemoApplication.class/class/initialize.st @@ -1,4 +1,9 @@ initialization initialize - (WAAdmin register: self asApplicationAt: 'examples/web-components') + | application | + "register such that we do not have the developer tools" + application := WAAdmin register: WAApplication at: 'examples/web-components' in: WAAdmin defaultDispatcher. + application configuration addParent: WARenderLoopConfiguration instance. + application + rootClass: self; scriptGeneratorClass: WANullScriptGenerator \ No newline at end of file