Skip to content

Commit

Permalink
ZK-5596: Simplify the JavaScript url when enable embedded mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JamsonChan committed Dec 13, 2023
1 parent 2519b23 commit 07ff370
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions zkdoc/release-note
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ZK 10.0.0
* Features
ZK-5221: Show websocket close reason
ZK-5018: Enhance simplified MVVM syntax
ZK-5596: Simplify the JavaScript url when enable embedded mode

* Bugs
ZK-5393: Update ZK jars to jakarta-friendly uploads
Expand Down
9 changes: 9 additions & 0 deletions zktest/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,13 @@ Copyright (C) 2004 Potix Corporation. All Rights Reserved.
<!-- <filter-name>embeddedCORSFilter</filter-name>-->
<!-- <url-pattern>/*</url-pattern>-->
<!-- </filter-mapping>-->

<servlet>
<servlet-name>zkEmbedded</servlet-name>
<servlet-class>org.zkoss.zkmax.ui.http.EmbeddedServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>zkEmbedded</servlet-name>
<url-pattern>/zkEmbedded</url-pattern>
</servlet-mapping>
</web-app>
15 changes: 15 additions & 0 deletions zktest/src/main/webapp/test2/F100-ZK-5596.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<script src="/zktest/zkEmbedded"></script>
</head>
<body>
<button id="btn">load zk</button>
<div id="zkapp"/>
<script>
btn.addEventListener('click', () => {
zEmbedded.load('zkapp', '/zktest/test2/F100-ZK-5596.zul');
});
</script>
</body>
</html>
16 changes: 16 additions & 0 deletions zktest/src/main/webapp/test2/F100-ZK-5596.zul
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
F100-ZK-5596.zul
Purpose:
Description:
History:
Wed Dec 13 18:26:12 CST 2023, Created by jamson
Copyright (C) 2023 Potix Corporation. All Rights Reserved.
-->
<zk>
<ckeditor/>
</zk>
1 change: 1 addition & 0 deletions zktest/src/main/webapp/test2/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3167,6 +3167,7 @@ B90-ZK-4431.zul=A,E,Multislider
##zats##B100-ZK-5522.zul=A,E,CommonFns,formatNumber
##zats##B100-ZK-5569.zul=A,E,Radiogroup,onCheck
##zats##B100-ZK-5161.zul=A,E,XSS,Security,Page
##manully##F100-ZK-5596.zul=A,E,Embedded,Url

##
# Features - 3.0.x version
Expand Down

0 comments on commit 07ff370

Please sign in to comment.