Skip to content

Commit 714cbd4

Browse files
Merge pull request #101 from webfirmframework/dev-12.x.x
wffweb-12.0.8 release changes
2 parents 9c5b0c3 + 05f481b commit 714cbd4

File tree

6 files changed

+66
-130
lines changed

6 files changed

+66
-130
lines changed

wffweb/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.webfirmframework</groupId>
66
<artifactId>wffweb</artifactId>
7-
<version>12.0.7</version>
7+
<version>12.0.8</version>
88

99
<properties>
1010
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
@@ -142,7 +142,7 @@
142142
<dependency>
143143
<groupId>com.fasterxml.jackson.core</groupId>
144144
<artifactId>jackson-databind</artifactId>
145-
<version>2.19.2</version>
145+
<version>2.20.0</version>
146146
<scope>test</scope>
147147
</dependency>
148148
<dependency>

wffweb/src/main/java/com/webfirmframework/wffweb/internal/tag/html/listener/ReplaceListener.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public static record Event(AbstractHtml insertedTag, AbstractHtml previousParent
4040
* @since 3.0.7
4141
* @author WFF
4242
*/
43+
@Deprecated(forRemoval = true, since = "12.0.8")
4344
public void replacedWith(final AbstractHtml parentTag, final AbstractHtml replacingTag, final Event... events);
4445

4546
}

wffweb/src/main/java/com/webfirmframework/wffweb/server/page/Task.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,26 @@ public enum Task {
4040

4141
TASK,
4242

43+
@Deprecated(since = "12.0.8")
4344
APPENDED_CHILD_TAG,
4445

4546
REMOVED_TAGS,
4647

48+
@Deprecated(since = "12.0.8")
4749
APPENDED_CHILDREN_TAGS,
4850

4951
REMOVED_ALL_CHILDREN_TAGS,
5052

53+
@Deprecated(since = "12.0.8")
5154
MOVED_CHILDREN_TAGS,
5255

56+
@Deprecated(since = "12.0.8")
5357
INSERTED_BEFORE_TAG,
5458

59+
@Deprecated(since = "12.0.8")
5560
INSERTED_AFTER_TAG,
5661

62+
@Deprecated(since = "12.0.8")
5763
REPLACED_WITH_TAGS,
5864

5965
REMOVED_ATTRIBUTES,

wffweb/src/main/resources/com/webfirmframework/wffweb/internal/server/page/js/wffClientCRUDUtil.js

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -343,49 +343,6 @@ var wffClientCRUDUtil = new function() {
343343
parentTag.appendChild(htmlNodes);
344344
}
345345

346-
} else if (taskValue == wffGlobal.taskValues.REPLACED_WITH_TAGS) {
347-
348-
console.log('wffGlobal.taskValues.REPLACED_WITH_TAGS');
349-
350-
var tagName = wffTagUtil.getTagNameFromCompressedBytes(nameValues[1].name);
351-
var wffId = wffTagUtil.getWffIdFromWffIdBytes(nameValues[1].values[0]);
352-
var parentTag = wffTagUtil.getTagByTagNameAndWffId(tagName, wffId);
353-
354-
//beforeTag means replacingTag
355-
var beforeTagName = wffTagUtil.getTagNameFromCompressedBytes(nameValues[2].name);
356-
var beforeTag;
357-
358-
//# means NoTag
359-
if (beforeTagName === '#') {
360-
var chldNdxOptmzdIntByts = nameValues[2].values[0];
361-
beforeTag = wffTagUtil.getChildByNthIndexBytes(parentTag, chldNdxOptmzdIntByts);
362-
} else {
363-
var beforeTagWffId = wffTagUtil.getWffIdFromWffIdBytes(nameValues[2].values[0]);
364-
beforeTag = wffTagUtil.getTagByTagNameAndWffId(beforeTagName,
365-
beforeTagWffId);
366-
}
367-
368-
for (var i = 3; i < nameValues.length; i++) {
369-
370-
var nm = nameValues[i].name;
371-
var values = nameValues[i].values;
372-
373-
var htmlNodes = wffTagUtil.createTagFromWffBMBytes(values[0]);
374-
375-
//if length is 1 then there is an existing tag with this id
376-
if (nm.length == 1) {
377-
console.log('nm.length == 1');
378-
var existingTag = wffTagUtil.getTagByTagNameAndWffId(
379-
htmlNodes.nodeName, htmlNodes
380-
.getAttribute("data-wff-id"));
381-
var parentOfExistingTag = existingTag.parentNode;
382-
parentOfExistingTag.removeChild(existingTag);
383-
384-
}
385-
parentTag.insertBefore(htmlNodes, beforeTag);
386-
}
387-
parentTag.removeChild(beforeTag);
388-
389346
} else if (taskValue == wffGlobal.taskValues.RELOAD_BROWSER) {
390347
location.reload(true);
391348
} else if (taskValue == wffGlobal.taskValues.RELOAD_BROWSER_FROM_CACHE) {

wffweb/src/main/resources/com/webfirmframework/wffweb/internal/server/page/js/wffClientEvents.js

Lines changed: 54 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -163,58 +163,59 @@ document.addEventListener("DOMContentLoaded",
163163
});
164164
}
165165

166-
MutationObserver = window.MutationObserver
167-
|| window.WebKitMutationObserver;
168-
169-
var attrObserver = new MutationObserver(function(mutations,
170-
observer) {
171-
// fired when a mutation occurs
172-
console.log('MutationObserver', mutations, observer);
173-
var attrNameValues = {};
174-
175-
for (var i = 0; i < mutations.length; i++) {
176-
var mutation = mutations[i];
177-
attrNameValues[mutation.attributeName] = mutation.target
178-
.getAttribute(mutation.attributeName);
179-
}
180-
181-
console.log('attrNameValues', attrNameValues);
182-
183-
});
184-
185-
// define what element should be observed by the observer
186-
// and what types of mutations trigger the callback
187-
attrObserver.observe(document, {
188-
// childList: true,
189-
// characterData: false,
190-
// should be true otherwise will not invoke function(mutations,
191-
// observer)
192-
subtree : true,
193-
attributes : true
194-
});
195-
196-
var tagObserver = new MutationObserver(
197-
function(mutations, observer) {
198-
// fired when a mutation occurs
199-
console.log('tagObserver MutationObserver', mutations,
200-
observer);
201-
for (var i = 0; i < mutations.length; i++) {
202-
var mutation = mutations[i];
203-
var addedNodes = mutation.addedNodes;
204-
for (var j = 0; j < addedNodes.length; j++) {
205-
var addedNode = addedNodes[j];
206-
console.log('addedNode', addedNode);
207-
}
208-
}
209-
210-
});
211-
212-
tagObserver.observe(document, {
213-
childList : true,
214-
// characterData: false,
215-
// should be true otherwise will not invoke function(mutations,
216-
// observer)
217-
subtree : true
218-
});
166+
// kept for future reference
167+
// MutationObserver = window.MutationObserver
168+
// || window.WebKitMutationObserver;
169+
//
170+
// var attrObserver = new MutationObserver(function(mutations,
171+
// observer) {
172+
// // fired when a mutation occurs
173+
// console.log('MutationObserver', mutations, observer);
174+
// var attrNameValues = {};
175+
//
176+
// for (var i = 0; i < mutations.length; i++) {
177+
// var mutation = mutations[i];
178+
// attrNameValues[mutation.attributeName] = mutation.target
179+
// .getAttribute(mutation.attributeName);
180+
// }
181+
//
182+
// console.log('attrNameValues', attrNameValues);
183+
//
184+
// });
185+
//
186+
// // define what element should be observed by the observer
187+
// // and what types of mutations trigger the callback
188+
// attrObserver.observe(document, {
189+
// // childList: true,
190+
// // characterData: false,
191+
// // should be true otherwise will not invoke function(mutations,
192+
// // observer)
193+
// subtree : true,
194+
// attributes : true
195+
// });
196+
//
197+
// var tagObserver = new MutationObserver(
198+
// function(mutations, observer) {
199+
// // fired when a mutation occurs
200+
// console.log('tagObserver MutationObserver', mutations,
201+
// observer);
202+
// for (var i = 0; i < mutations.length; i++) {
203+
// var mutation = mutations[i];
204+
// var addedNodes = mutation.addedNodes;
205+
// for (var j = 0; j < addedNodes.length; j++) {
206+
// var addedNode = addedNodes[j];
207+
// console.log('addedNode', addedNode);
208+
// }
209+
// }
210+
//
211+
// });
212+
//
213+
// tagObserver.observe(document, {
214+
// childList : true,
215+
// // characterData: false,
216+
// // should be true otherwise will not invoke function(mutations,
217+
// // observer)
218+
// subtree : true
219+
// });
219220

220221
});

wffweb/src/test/java/com/webfirmframework/wffweb/internal/server/page/js/WffJsFileTest.java

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class WffJsFileTest {
6060
id = ++serverPIdGen;} else if (id > MAX_INT_VALUE) {
6161
id = id * -1;}
6262
return id;};this.getAndUpdateLocation = function() {
63-
var prevCLoc = cLoc;var l = window.location;var h = l.href.endsWith('#') ? '#' : l.hash;cLoc = {pathname: l.pathname, search: l.search, hash: h};return prevCLoc;};this.CPRSD_DATA = true;this.NDXD_TGS = ["#","$","%","@","a","b","i","p","q","s","u","br","dd","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","li","ol","rp","rt","td","th","tr","ul","bdi","bdo","col","del","dfn","div","img","ins","kbd","map","nav","pre","qfn","sub","sup","svg","var","wbr","abbr","area","base","body","cite","code","data","form","head","html","line","link","main","mark","math","menu","meta","path","rect","ruby","samp","span","text","time","aside","audio","embed","input","label","meter","param","small","style","table","tbody","tfoot","thead","title","track","video","button","canvas","circle","dialog","figure","footer","header","hgroup","iframe","keygen","legend","object","option","output","script","select","source","strong","address","article","caption","details","ellipse","picture","polygon","section","summary","basefont","colgroup","datalist","fieldset","menuitem","noscript","optgroup","polyline","progress","template","textarea","blockquote","figcaption"];this.NDXD_ATRBS = ["id","alt","dir","for","low","max","min","rel","rev","src","cols","face","form","high","href","lang","list","loop","name","open","role","rows","size","step","type","wrap","align","async","class","color","defer","ismap","media","muted","nonce","oncut","scope","shape","sizes","style","title","value","width","accept","action","border","coords","height","hidden","method","nohref","onblur","oncopy","ondrag","ondrop","onload","onplay","onshow","poster","sorted","srcset","target","usemap","charset","checked","colspan","content","default","dirname","enctype","headers","onabort","onclick","onended","onerror","onfocus","oninput","onkeyup","onpaste","onpause","onreset","onwheel","optimum","pattern","preload","rowspan","sandbox","autoplay","controls","datetime","disabled","download","dropzone","hreflang","multiple","onchange","ononline","onresize","onscroll","onsearch","onseeked","onselect","onsubmit","ontoggle","onunload","readonly","required","reversed","selected","tabindex","accesskey","autofocus","draggable","maxlength","minlength","oncanplay","ondragend","onemptied","onfocusin","oninvalid","onkeydown","onmouseup","onoffline","onplaying","onseeking","onstalled","onstorage","onsuspend","onwaiting","translate","formaction","formmethod","formtarget","http-equiv","ondblclick","ondragover","onfocusout","onkeypress","onmouseout","onpagehide","onpageshow","onpopstate","onprogress","ontouchend","spellcheck","cellpadding","cellspacing","contextmenu","data-wff-id","formenctype","ondragenter","ondragleave","ondragstart","onloadstart","onmousedown","onmousemove","onmouseover","ontouchmove","placeholder","animationend","autocomplete","onafterprint","onhashchange","onloadeddata","onmouseenter","onmouseleave","onratechange","ontimeupdate","ontouchstart","onbeforeprint","oncontextmenu","ontouchcancel","transitionend","accept-charset","animationstart","formnovalidate","onbeforeunload","onvolumechange","contenteditable","oncanplaythrough","ondurationchange","onloadedmetadata","animationiteration"];this.NDXD_VNT_ATRBS = ["oncut","onblur","oncopy","ondrag","ondrop","onload","onplay","onshow","onabort","onclick","onended","onerror","onfocus","oninput","onkeyup","onpaste","onpause","onreset","onwheel","onchange","ononline","onresize","onscroll","onsearch","onseeked","onselect","onsubmit","ontoggle","onunload","oncanplay","ondragend","onemptied","onfocusin","oninvalid","onkeydown","onmouseup","onoffline","onplaying","onseeking","onstalled","onstorage","onsuspend","onwaiting","ondblclick","ondragover","onfocusout","onkeypress","onmouseout","onpagehide","onpageshow","onpopstate","onprogress","ontouchend","ondragenter","ondragleave","ondragstart","onloadstart","onmousedown","onmousemove","onmouseover","ontouchmove","onafterprint","onhashchange","onloadeddata","onmouseenter","onmouseleave","onratechange","ontimeupdate","ontouchstart","onbeforeprint","oncontextmenu","ontouchcancel","onbeforeunload","onvolumechange","oncanplaythrough","ondurationchange","onloadedmetadata"];this.NDXD_BLN_ATRBS = ["open","async","defer","ismap","hidden","checked","default","controls","disabled","multiple","readonly","reversed","selected"];this.WFF_ID_PFXS = ["S","C"];this.taskValues = {T0:0,T1:1,T2:2,T3:3,T4:4,T5:5,T6:6,T7:7,T8:8,T9:9,T10:10,T11:11,T12:12,T13:13,T14:14,T15:15,T16:16,T17:17,T18:18,T19:19,T20:20,T21:21,T22:22,T23:23,T24:24,T25:25,T26:26,T27:27,T28:28,T29:29,T30:30,T31:31,T32:32,T33:33,T34:34,T35:35,T36:36,T37:37,T38:38,T39:39,T40:40,T41:41,T42:42,T43:43,T44:44,T45:45,T46:46};this.uriEventInitiator = {SERVER_CODE:0,CLIENT_CODE:1,BROWSER:2,size:3};this.WS_URL = "ws://webfirmframework.com";this.INSTANCE_ID = "instance-id-1234585-451";this.NODE_ID = "fd974a6f-460a-4a4b-8e36-542c5fa95cd1";this.REMOVE_PREV_BP_ON_INITTAB = true;this.REMOVE_PREV_BP_ON_TABCLOSE = true;this.WS_RECON = 2000;this.WS_HRTBT = 1000;this.LOSSLESS_COMM = true;this.onPayloadLoss = function() {if (!this.onPLI) { this.onPLI = true; location.reload();}};if ((typeof TextEncoder) === "undefined") {
63+
var prevCLoc = cLoc;var l = window.location;var h = l.href.endsWith('#') ? '#' : l.hash;cLoc = {pathname: l.pathname, search: l.search, hash: h};return prevCLoc;};this.CPRSD_DATA = true;this.NDXD_TGS = ["#","$","%","@","a","b","i","p","q","s","u","br","dd","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","li","ol","rp","rt","td","th","tr","ul","bdi","bdo","col","del","dfn","div","img","ins","kbd","map","nav","pre","qfn","sub","sup","svg","var","wbr","abbr","area","base","body","cite","code","data","form","head","html","line","link","main","mark","math","menu","meta","path","rect","ruby","samp","span","text","time","aside","audio","embed","input","label","meter","param","small","style","table","tbody","tfoot","thead","title","track","video","button","canvas","circle","dialog","figure","footer","header","hgroup","iframe","keygen","legend","object","option","output","script","select","source","strong","address","article","caption","details","ellipse","picture","polygon","section","summary","basefont","colgroup","datalist","fieldset","menuitem","noscript","optgroup","polyline","progress","template","textarea","blockquote","figcaption"];this.NDXD_ATRBS = ["id","alt","dir","for","low","max","min","rel","rev","src","cols","face","form","high","href","lang","list","loop","name","open","role","rows","size","step","type","wrap","align","async","class","color","defer","ismap","media","muted","nonce","oncut","scope","shape","sizes","style","title","value","width","accept","action","border","coords","height","hidden","method","nohref","onblur","oncopy","ondrag","ondrop","onload","onplay","onshow","poster","sorted","srcset","target","usemap","charset","checked","colspan","content","default","dirname","enctype","headers","onabort","onclick","onended","onerror","onfocus","oninput","onkeyup","onpaste","onpause","onreset","onwheel","optimum","pattern","preload","rowspan","sandbox","autoplay","controls","datetime","disabled","download","dropzone","hreflang","multiple","onchange","ononline","onresize","onscroll","onsearch","onseeked","onselect","onsubmit","ontoggle","onunload","readonly","required","reversed","selected","tabindex","accesskey","autofocus","draggable","maxlength","minlength","oncanplay","ondragend","onemptied","onfocusin","oninvalid","onkeydown","onmouseup","onoffline","onplaying","onseeking","onstalled","onstorage","onsuspend","onwaiting","translate","formaction","formmethod","formtarget","http-equiv","ondblclick","ondragover","onfocusout","onkeypress","onmouseout","onpagehide","onpageshow","onpopstate","onprogress","ontouchend","spellcheck","cellpadding","cellspacing","contextmenu","data-wff-id","formenctype","ondragenter","ondragleave","ondragstart","onloadstart","onmousedown","onmousemove","onmouseover","ontouchmove","placeholder","animationend","autocomplete","onafterprint","onhashchange","onloadeddata","onmouseenter","onmouseleave","onratechange","ontimeupdate","ontouchstart","onbeforeprint","oncontextmenu","ontouchcancel","transitionend","accept-charset","animationstart","formnovalidate","onbeforeunload","onvolumechange","contenteditable","oncanplaythrough","ondurationchange","onloadedmetadata","animationiteration"];this.NDXD_VNT_ATRBS = ["oncut","onblur","oncopy","ondrag","ondrop","onload","onplay","onshow","onabort","onclick","onended","onerror","onfocus","oninput","onkeyup","onpaste","onpause","onreset","onwheel","onchange","ononline","onresize","onscroll","onsearch","onseeked","onselect","onsubmit","ontoggle","onunload","oncanplay","ondragend","onemptied","onfocusin","oninvalid","onkeydown","onmouseup","onoffline","onplaying","onseeking","onstalled","onstorage","onsuspend","onwaiting","ondblclick","ondragover","onfocusout","onkeypress","onmouseout","onpagehide","onpageshow","onpopstate","onprogress","ontouchend","ondragenter","ondragleave","ondragstart","onloadstart","onmousedown","onmousemove","onmouseover","ontouchmove","onafterprint","onhashchange","onloadeddata","onmouseenter","onmouseleave","onratechange","ontimeupdate","ontouchstart","onbeforeprint","oncontextmenu","ontouchcancel","onbeforeunload","onvolumechange","oncanplaythrough","ondurationchange","onloadedmetadata"];this.NDXD_BLN_ATRBS = ["open","async","defer","ismap","hidden","checked","default","controls","disabled","multiple","readonly","reversed","selected"];this.WFF_ID_PFXS = ["S","C"];this.taskValues = {T0:0,T1:1,T2:2,T3:3,T4:4,T5:5,T6:6,T7:7,T8:8,T9:9,T10:10,T11:11,T12:12,T13:13,T14:14,T15:15,T16:16,T17:17,T18:18,T19:19,T20:20,T21:21,T22:22,T23:23,T24:24,T25:25,T26:26,T27:27,T28:28,T29:29,T30:30,T31:31,T32:32,T33:33,T34:34,T35:35,T36:36,T37:37,T38:38,T39:39,T40:40,T41:41,T42:42,T43:43,T44:44,T45:45,T46:46};this.uriEventInitiator = {SERVER_CODE:0,CLIENT_CODE:1,BROWSER:2,size:3};this.WS_URL = "ws://webfirmframework.com";this.INSTANCE_ID = "instance-id-1234585-451";this.NODE_ID = "4791c82e-8071-4ae5-8906-78a6a2d74041";this.REMOVE_PREV_BP_ON_INITTAB = true;this.REMOVE_PREV_BP_ON_TABCLOSE = true;this.WS_RECON = 2000;this.WS_HRTBT = 1000;this.LOSSLESS_COMM = true;this.onPayloadLoss = function() {if (!this.onPLI) { this.onPLI = true; location.reload();}};if ((typeof TextEncoder) === "undefined") {
6464
this.encoder = new function TextEncoder(charset) {
6565
if (charset === "utf-8") {
6666
this.encode = function(text) {
@@ -441,18 +441,7 @@ public class WffJsFileTest {
441441
var v21 = existingTag.parentNode;v21.removeChild(existingTag);}
442442
}
443443
parentTag.appendChild(v90);}
444-
}else if(taskValue == wffGlobal.taskValues.T11){
445-
var tagName = wffTagUtil.f6(v77[1].name);var v101 = wffTagUtil.f25(v77[1].values[0]);var parentTag = wffTagUtil.f18(tagName, v101);var v51 = wffTagUtil.f6(v77[2].name);var v87;if(v51 === '#'){
446-
var v20 = v77[2].values[0];v87 = wffTagUtil.f23(parentTag, v20);}else{
447-
var v43 = wffTagUtil.f25(v77[2].values[0]);v87 = wffTagUtil.f18(v51,
448-
v43);}
449-
for (var i = 3; i < v77.length; i++){
450-
var nm = v77[i].name;var values = v77[i].values;var v90 = wffTagUtil.f20(values[0]);if(nm.length == 1){
451-
var existingTag = wffTagUtil.f18(
452-
v90.nodeName, v90
453-
.getAttribute("data-wff-id"));var v21 = existingTag.parentNode;v21.removeChild(existingTag);}
454-
parentTag.insertBefore(v90, v87);}
455-
parentTag.removeChild(v87);}else if(taskValue == wffGlobal.taskValues.T21){
444+
}else if(taskValue == wffGlobal.taskValues.T21){
456445
location.reload(true);}else if(taskValue == wffGlobal.taskValues.T22){
457446
location.reload();}else if(taskValue == wffGlobal.taskValues.T20){
458447
var js = f32(v47.values[1]);var op = v47.values[2][0];if(op == 1){
@@ -1159,25 +1148,7 @@ public class WffJsFileTest {
11591148
}
11601149
}
11611150
});}
1162-
MutationObserver = window.MutationObserver
1163-
|| window.WebKitMutationObserver;var attrObserver = new MutationObserver(function(mutations,
1164-
observer){
1165-
var v57s = {};for (var i = 0; i < mutations.length; i++){
1166-
var mutation = mutations[i];v57s[mutation.attributeName] = mutation.target
1167-
.getAttribute(mutation.attributeName);}
1168-
});attrObserver.observe(document, {
1169-
subtree : true,
1170-
attributes : true
1171-
});var tagObserver = new MutationObserver(
1172-
function(mutations, observer){
1173-
for (var i = 0; i < mutations.length; i++){
1174-
var mutation = mutations[i];var addedNodes = mutation.addedNodes;for (var j = 0; j < addedNodes.length; j++){
1175-
var addedNode = addedNodes[j];}
1176-
}
1177-
});tagObserver.observe(document, {
1178-
childList : true,
1179-
subtree : true
1180-
});});setInterval(function(){try{wffWS.send([]);}catch(e){wffWS.closeSocket();}},1000);""";
1151+
});setInterval(function(){try{wffWS.send([]);}catch(e){wffWS.closeSocket();}},1000);""";
11811152

11821153
@Test
11831154
public void testGetAllOptimizedContent() {

0 commit comments

Comments
 (0)