diff --git a/prepare-upload.sh b/prepare-upload.sh index dae1a0fd..1cd9a6e5 100644 --- a/prepare-upload.sh +++ b/prepare-upload.sh @@ -17,6 +17,3 @@ cp zats/target/zats-mimic-$VERSION.zip $BIN_FOLDER cp zats-common/target/zats-common-$VERSION-bundle.jar $MVN_FOLDER cp zats-mimic/target/zats-mimic-$VERSION-bundle.jar $MVN_FOLDER -cp zats-mimic-ext6/target/zats-mimic-ext6-$VERSION-bundle.jar $MVN_FOLDER -cp zats-mimic-ext7/target/zats-mimic-ext7-$VERSION-bundle.jar $MVN_FOLDER -cp zats-mimic-ext96/target/zats-mimic-ext96-$VERSION-bundle.jar $MVN_FOLDER \ No newline at end of file diff --git a/upVer b/upVer index 2bb1a53f..1e7fb1f8 100644 --- a/upVer +++ b/upVer @@ -35,15 +35,9 @@ if [ "$Zats" = "" ] ; then if [ ! -d "./zats-mimic" ] ; then echo "zats-mimic path is not found!!" fi - if [ ! -d "./zats-mimic-ext6" ] ; then - echo "zats-mimic-ext6 path is not found!!" - fi if [ ! -d "./zats-mimic-ext7" ] ; then echo "zats-mimic-ext7 path is not found!!" fi - if [ ! -d "./zats-mimic-ext96" ] ; then - echo "zats-mimic-ext96 path is not found!!" - fi Zats=$maindir fi @@ -102,7 +96,4 @@ upVer zats upVer zats-common upVer zats-example upVer zats-mimic -upVer zats-mimic-ext6 upVer zats-mimic-ext7 -upVer zats-mimic-ext96 -upVer zats-example \ No newline at end of file diff --git a/version b/version index 4a36342f..fcdb2e10 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.0.0 +4.0.0 diff --git a/zats-common/pom.xml b/zats-common/pom.xml index 86606be2..5ded08d2 100644 --- a/zats-common/pom.xml +++ b/zats-common/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.zkoss.zats zats-common - 3.0.0-SNAPSHOT + 4.0.0-SNAPSHOT ZK Application Test Suite - Common ZK Application Test Suite - Common https://www.zkoss.org/zats @@ -44,6 +44,16 @@ UTF-8 + + + ZK CE + https://mavensync.zkoss.org/maven2 + + + ZK EE Eval + https://mavensync.zkoss.org/eval/ + + junit @@ -54,7 +64,7 @@ org.zkoss.zk zul - 6.0.0 + 9.6.0-jakarta-Eval provided @@ -106,4 +116,4 @@ - \ No newline at end of file + diff --git a/zats-example/pom.xml b/zats-example/pom.xml index d6a06ca9..8e9da6cf 100644 --- a/zats-example/pom.xml +++ b/zats-example/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.zkoss.zats zats-example - 3.0.0-SNAPSHOT + 4.0.0-SNAPSHOT ZK Application Test Suite - Example https://www.zkoss.org/zats @@ -45,7 +45,7 @@ yyyyMMdd 1.6 1.6 - 8.5.0 + 9.6.0-jakarta-Eval @@ -63,9 +63,14 @@ zhtml ${zk.version} + + org.zkoss.zk + zkex + ${zk.version} + org.zkoss.zats - zats-mimic-ext7 + zats-mimic ${project.version} test @@ -82,11 +87,17 @@ - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 5.0.0 provided + + org.slf4j + slf4j-simple + 1.7.31 + test + Examples code for ZATS Essentials and other examples. diff --git a/zats-example/src/main/java/org/zkoss/zats/essentials/CookieComposer.java b/zats-example/src/main/java/org/zkoss/zats/essentials/CookieComposer.java index 94b85973..b7437e66 100644 --- a/zats-example/src/main/java/org/zkoss/zats/essentials/CookieComposer.java +++ b/zats-example/src/main/java/org/zkoss/zats/essentials/CookieComposer.java @@ -11,8 +11,8 @@ */ package org.zkoss.zats.essentials; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletResponse; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Executions; diff --git a/zats-example/src/main/webapp/WEB-INF/web.xml b/zats-example/src/main/webapp/WEB-INF/web.xml index d6740ab1..4c6af2e6 100644 --- a/zats-example/src/main/webapp/WEB-INF/web.xml +++ b/zats-example/src/main/webapp/WEB-INF/web.xml @@ -137,7 +137,6 @@ Copyright (C) 2004 Potix Corporation. All Rights Reserved. dspLoader org.zkoss.web.servlet.dsp.InterpreterServlet @@ -150,6 +149,7 @@ Copyright (C) 2004 Potix Corporation. All Rights Reserved. dspLoader *.dsp + --> diff --git a/zats-example/src/test/java/org/zkoss/zats/example/testcase/EnvironmentTest.java b/zats-example/src/test/java/org/zkoss/zats/example/testcase/EnvironmentTest.java index c255fac3..aea8ec6c 100644 --- a/zats-example/src/test/java/org/zkoss/zats/example/testcase/EnvironmentTest.java +++ b/zats-example/src/test/java/org/zkoss/zats/example/testcase/EnvironmentTest.java @@ -3,7 +3,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.junit.*; import org.zkoss.zats.junit.AutoClient; diff --git a/zats-example/src/test/java/org/zkoss/zats/example/testcase/EnvironmentTest2.java b/zats-example/src/test/java/org/zkoss/zats/example/testcase/EnvironmentTest2.java index ddcba734..151205ca 100644 --- a/zats-example/src/test/java/org/zkoss/zats/example/testcase/EnvironmentTest2.java +++ b/zats-example/src/test/java/org/zkoss/zats/example/testcase/EnvironmentTest2.java @@ -3,7 +3,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.junit.*; import org.zkoss.zats.junit.AutoClient; diff --git a/zats-example/src/test/java/org/zkoss/zats/example/testcase/LoginLogoutTest.java b/zats-example/src/test/java/org/zkoss/zats/example/testcase/LoginLogoutTest.java index fd0b1656..76631bee 100644 --- a/zats-example/src/test/java/org/zkoss/zats/example/testcase/LoginLogoutTest.java +++ b/zats-example/src/test/java/org/zkoss/zats/example/testcase/LoginLogoutTest.java @@ -2,7 +2,7 @@ import static org.junit.Assert.assertEquals; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.junit.*; import org.zkoss.zats.example.testcase.util.LoginOperation; diff --git a/zats-example/src/test/java/org/zkoss/zats/example/testcase/util/LoginOperation.java b/zats-example/src/test/java/org/zkoss/zats/example/testcase/util/LoginOperation.java index 6a33b1c5..a618a2e8 100644 --- a/zats-example/src/test/java/org/zkoss/zats/example/testcase/util/LoginOperation.java +++ b/zats-example/src/test/java/org/zkoss/zats/example/testcase/util/LoginOperation.java @@ -1,7 +1,7 @@ package org.zkoss.zats.example.testcase.util; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.zkoss.zats.mimic.ComponentAgent; import org.zkoss.zats.mimic.Zats; diff --git a/zats-mimic-ext6/README.txt b/zats-mimic-ext6/README.txt new file mode 100644 index 00000000..432eb802 --- /dev/null +++ b/zats-mimic-ext6/README.txt @@ -0,0 +1 @@ +obsolete since ZATS 4.0.0 \ No newline at end of file diff --git a/zats-mimic-ext6/pom.xml b/zats-mimic-ext6/pom.xml deleted file mode 100644 index 7fe54e74..00000000 --- a/zats-mimic-ext6/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ - - 4.0.0 - org.zkoss.zats - zats-mimic-ext6 - 3.0.0-SNAPSHOT - ZK Application Test Suite - Mimic Library Extension for ZK6 - ZK Application Test Suite - Mimic Library Extension for ZK6 - https://www.zkoss.org/zats - - - GNU GENERAL PUBLIC LICENSE, Version 2 - http://www.gnu.org/licenses/gpl-2.0.txt - repo - - - - https://github.com/zkoss/zats - scm:git:git@github.com:zkoss/zats.git - - - Potix Corporation - https://www.zkoss.org - - - - zkteam - ZK Team - info@zkoss.org - https://www.zkoss.org - Potix Corporation - https://www.zkoss.org - - architect - developer - - 8 - - https://www.zkoss.org - - - - jar - - UTF-8 - 6.5.8.2-Eval - - - - zk repository - https://mavensync.zkoss.org/maven2 - - - ZK PE Evaluation - https://mavensync.zkoss.org/zk/pe-eval - - - ZK EE Evaluation - https://mavensync.zkoss.org/zk/ee-eval - - - - - junit - junit - 4.13.1 - test - - - org.zkoss.zk - zhtml - ${zk.version} - test - - - org.zkoss.zk - zkbind - ${zk.version} - provided - - - org.zkoss.zk - zkex - ${zk.version} - test - - - org.zkoss.zk - zkmax - ${zk.version} - test - - - org.zkoss.zats - zats-mimic - ${project.version} - - - org.zkoss.zats - zats-mimic - ${project.version} - tests - test - - - org.zkoss.zkforge - ckez - 3.6.0.0 - provided - - - org.zkoss.zk - zkplus - ${zk.version} - test - - - org.zkoss.zk - zul - ${zk.version} - provided - - - commons-io - commons-io - 2.7 - test - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.4 - - - false - - true - true - - - - - - test-jar - package - - test-jar - - - - - - - - - - disable-java8-doclint - - [1.8,) - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0 - - -Xdoclint:none - - - - - - - diff --git a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/BindValueResolver.java b/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/BindValueResolver.java deleted file mode 100644 index 14e62bcf..00000000 --- a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/BindValueResolver.java +++ /dev/null @@ -1,37 +0,0 @@ -/* BindValueResolver.java - - Purpose: - - Description: - - History: - 2012/5/10 Created by dennis - -Copyright (C) 2011 Potix Corporation. All Rights Reserved. -*/ -package org.zkoss.zats.mimic.impl; - -import org.zkoss.bind.Binder; -import org.zkoss.bind.impl.BinderImpl; -import org.zkoss.zats.mimic.Agent; -import org.zkoss.zats.mimic.ComponentAgent; - -/** - * @author dennis - * - */ -public class BindValueResolver implements ValueResolver{ - @SuppressWarnings("unchecked") - public T resolve(Agent agent, Class clazz) { - if(agent instanceof ComponentAgent){ - Object binder = ((ComponentAgent)agent).getAttribute(BinderImpl.BINDER); - if(binder != null && binder instanceof Binder){ - Object vm = ((Binder)binder).getViewModel(); - if (vm!=null && clazz.isInstance(vm)) { - return (T)vm; - } - } - } - return null; - } -} diff --git a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/Ext6Initiator.java b/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/Ext6Initiator.java deleted file mode 100644 index 10bee715..00000000 --- a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/Ext6Initiator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* Initial.java - - Purpose: - - Description: - - History: - 2012/3/23 Created by dennis - -Copyright (C) 2011 Potix Corporation. All Rights Reserved. -*/ -package org.zkoss.zats.mimic.impl; - -import org.zkoss.zats.mimic.impl.operation.GenericCheckAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.GenericOpenAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.input.DateTypeAgentBuilderZK6; -import org.zkoss.zats.mimic.impl.operation.input.TimeTypeAgentBuilderZK6; -import org.zkoss.zats.mimic.impl.operation.select.SelectboxSelectByIndexAgentBuilder; -import org.zkoss.zats.mimic.impl.response.EchoEventHandler; -import org.zkoss.zats.mimic.impl.response.EchoEventHandlerExt6; -import org.zkoss.zk.ui.WebApp; -import org.zkoss.zk.ui.util.WebAppInit; -import org.zkoss.zul.Combobutton; -import org.zkoss.zul.Datebox; -import org.zkoss.zul.Selectbox; -import org.zkoss.zul.Timebox; -import org.zkoss.zul.Toolbarbutton; - -/** - * @author dennis - * - */ -public class Ext6Initiator implements WebAppInit{ - - public void init(WebApp wapp) throws Exception { - - //testcases and mimic server is in the same vm. - //so it is ok to register builder by webapp init - - // operation - OperationAgentManager.getInstance().registerBuilder("6.0.0", "*", Toolbarbutton.class, - new GenericCheckAgentBuilder()); // toolbarbutton on check in zk6 only - OperationAgentManager.getInstance().registerBuilder("6.0.0", "*", Datebox.class, - new DateTypeAgentBuilderZK6()); // date format changed in zk6 - OperationAgentManager.getInstance().registerBuilder("6.0.0", "*", Timebox.class, - new TimeTypeAgentBuilderZK6()); // date format changed in zk6 - OperationAgentManager.getInstance().registerBuilder("6.0.0", "*", Combobutton.class, - new GenericOpenAgentBuilder()); // combobutton introduced since zk6 - OperationAgentManager.getInstance().registerBuilder("6.0.0", "*", Selectbox.class, - new SelectboxSelectByIndexAgentBuilder()); // selectbox introduced since zk6 - - // event data - - // resolvers - // resolve view model - if (Util.hasClass("org.zkoss.bind.Binder")) { - ValueResolverManager.getInstance().registerResolver("6.0.0", "*", "bind", - "org.zkoss.zats.mimic.impl.BindValueResolver"); - } - - // layout response handlers - ResponseHandlerManager.getInstance().registerHandler("6.0.0", "*", EchoEventHandler.REGISTER_KEY, - (LayoutResponseHandler) new EchoEventHandlerExt6()); - - // update response handlers - // ZATS-11: note that, the key can be used for replacing previous one and prevent duplicate handlers - ResponseHandlerManager.getInstance().registerHandler("6.0.0", "*", EchoEventHandler.REGISTER_KEY, - (UpdateResponseHandler) new EchoEventHandlerExt6()); - } - -} diff --git a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/input/DateTypeAgentBuilderZK6.java b/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/input/DateTypeAgentBuilderZK6.java deleted file mode 100644 index 84e8cdba..00000000 --- a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/input/DateTypeAgentBuilderZK6.java +++ /dev/null @@ -1,54 +0,0 @@ -/* DateTypeAgentBuilderZK6.java - - Purpose: - - Description: - - History: - Mar 26, 2012 Created by pao - -Copyright (C) 2011 Potix Corporation. All Rights Reserved. - */ -package org.zkoss.zats.mimic.impl.operation.input; - -import java.util.Date; -import java.util.Map; - -import org.zkoss.json.JSONs; -import org.zkoss.lang.Strings; -import org.zkoss.zats.mimic.ComponentAgent; -import org.zkoss.zats.mimic.impl.operation.input.DateInputAgentBuilder; -import org.zkoss.zats.mimic.operation.InputAgent; -import org.zkoss.zul.impl.FormatInputElement; - -/** - * A date type agent builder for ZK6. - * - * @author pao - */ -public class DateTypeAgentBuilderZK6 extends DateInputAgentBuilder { - public InputAgent getOperation(ComponentAgent agent) { - return new InputAgentZK6Impl(agent); - } - - static protected class InputAgentZK6Impl extends InputAgentImpl{ - - public InputAgentZK6Impl(ComponentAgent target) { - super(target); - } - - @Override - protected void putValue(ComponentAgent target, String raw, Map data) { - if(Strings.isBlank(raw)) { - data.put("value", null); - }else{ - Object comp = target.getDelegatee(); - String f = ((FormatInputElement) comp).getFormat(); - Date date = parseDate(f == null ? DEFAULT_DATE_FORMAT : f, raw.trim()); - data.put("value", "$z!t#d:" + JSONs.d2j(date)); - } - } - } - - -} diff --git a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/input/TimeTypeAgentBuilderZK6.java b/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/input/TimeTypeAgentBuilderZK6.java deleted file mode 100644 index 663efa6a..00000000 --- a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/input/TimeTypeAgentBuilderZK6.java +++ /dev/null @@ -1,53 +0,0 @@ -/* TimeTypeAgentBuilderZK6.java - - Purpose: - - Description: - - History: - Mar 26, 2012 Created by pao - -Copyright (C) 2011 Potix Corporation. All Rights Reserved. - */ -package org.zkoss.zats.mimic.impl.operation.input; - -import java.util.Date; -import java.util.Map; - -import org.zkoss.json.JSONs; -import org.zkoss.lang.Strings; -import org.zkoss.zats.mimic.ComponentAgent; -import org.zkoss.zats.mimic.impl.operation.input.TimeInputAgentBuilder; -import org.zkoss.zats.mimic.operation.InputAgent; -import org.zkoss.zul.impl.FormatInputElement; - -/** - * A time type agent builder for ZK6. - * - * @author pao - */ -public class TimeTypeAgentBuilderZK6 extends TimeInputAgentBuilder { - public InputAgent getOperation(ComponentAgent agent) { - return new InputAgentZK6Impl(agent); - } - static class InputAgentZK6Impl extends InputAgentImpl{ - - public InputAgentZK6Impl(ComponentAgent target) { - super(target); - } - - @Override - protected void putValue(ComponentAgent target, String raw, Map data) { - if(Strings.isBlank(raw)) { - data.put("value", null); - }else{ - Object comp = target.getDelegatee(); - String f = ((FormatInputElement) comp).getFormat(); - Date time = parseDate(f == null ? DEFAULT_TIME_FORMAT : f, raw.trim()); - data.put("value", "$z!t#d:" + JSONs.d2j(time)); - } - } - } - - -} diff --git a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/select/SelectboxSelectByIndexAgentBuilder.java b/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/select/SelectboxSelectByIndexAgentBuilder.java deleted file mode 100644 index 506e674a..00000000 --- a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/operation/select/SelectboxSelectByIndexAgentBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -/* GenericSelectByIndexBuilder.java - - Purpose: - - Description: - - History: - Apr 10, 2012 Created by pao - -Copyright (C) 2011 Potix Corporation. All Rights Reserved. -*/ -package org.zkoss.zats.mimic.impl.operation.select; - -import java.util.HashMap; -import java.util.Map; - -import org.zkoss.zats.mimic.AgentException; -import org.zkoss.zats.mimic.ComponentAgent; -import org.zkoss.zats.mimic.impl.ClientCtrl; -import org.zkoss.zats.mimic.impl.OperationAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.AgentDelegator; -import org.zkoss.zats.mimic.operation.SelectByIndexAgent; -import org.zkoss.zk.ui.event.Events; -import org.zkoss.zul.Selectbox; - -/** - * A builder for selection by index agent at Selectbox component. - * @author pao - */ -public class SelectboxSelectByIndexAgentBuilder implements OperationAgentBuilder { - - public SelectByIndexAgent getOperation(final ComponentAgent target) { - return new SelectByIndexAgentImpl(target); - } - public Class getOperationClass() { - return SelectByIndexAgent.class; - } - class SelectByIndexAgentImpl extends AgentDelegator implements SelectByIndexAgent { - - public SelectByIndexAgentImpl(ComponentAgent target) { - super(target); - } - - public void select(int index) { - // check target - if (!target.is(Selectbox.class)) - throw new AgentException("target is not a Selectbox"); - - // check bounds - Selectbox sb = target.as(Selectbox.class); - if (index < 0 || index >= sb.getModel().getSize()) - throw new AgentException("index out of bounds: " + index); - - // post AU - String cmd = Events.ON_SELECT; - Map data = new HashMap(); - data.put("", index); - ClientCtrl ctrl = (ClientCtrl) target.getClient(); - String desktopId = target.getDesktop().getId(); - ctrl.postUpdate(desktopId, target.getUuid(), cmd, data, false); - ctrl.flush(desktopId); - } - } -} diff --git a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/response/EchoEventHandlerExt6.java b/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/response/EchoEventHandlerExt6.java deleted file mode 100644 index 1bd5a2da..00000000 --- a/zats-mimic-ext6/src/main/java/org/zkoss/zats/mimic/impl/response/EchoEventHandlerExt6.java +++ /dev/null @@ -1,28 +0,0 @@ -/* EchoEventHandlerExt6.java - - Purpose: - - Description: - - History: - Apr 25, 2013 Created by pao - -Copyright (C) 2011 Potix Corporation. All Rights Reserved. -*/ -package org.zkoss.zats.mimic.impl.response; - -import org.zkoss.zats.common.json.JSONObject; -import org.zkoss.zats.common.json.JSONValue; - -/** - * The response handler for echo event in ZK 6. - * @author pao - */ -public class EchoEventHandlerExt6 extends EchoEventHandler { - - @Override - protected String parseUuid(Object object) { - JSONObject json = (JSONObject) JSONValue.parse(object.toString()); - return json.get("$u").toString(); - } -} diff --git a/zats-mimic-ext6/src/main/resources/metainfo/zk/config.xml b/zats-mimic-ext6/src/main/resources/metainfo/zk/config.xml deleted file mode 100644 index 23d62f12..00000000 --- a/zats-mimic-ext6/src/main/resources/metainfo/zk/config.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - zats-mimic-ext6 - zul - - - - - org.zkoss.zats.mimic.impl.Ext6Initiator - - diff --git a/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/IncludeViewModel.java b/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/IncludeViewModel.java deleted file mode 100644 index a6476d2f..00000000 --- a/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/IncludeViewModel.java +++ /dev/null @@ -1,34 +0,0 @@ -/* IncludeViewModel.java - - Purpose: - - Description: - - History: - Jul 3, 2012 Created by pao - -Copyright (C) 2011 Potix Corporation. All Rights Reserved. -*/ -package org.zkoss.zats.testapp; - -/** - * for include-ext6.zul - * @author pao - */ -public class IncludeViewModel { - - private String message; - - public IncludeViewModel() { - message = "Hello! ZK!"; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - -} diff --git a/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/bind/B00810ListboxMultiple.java b/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/bind/B00810ListboxMultiple.java deleted file mode 100644 index 064244d4..00000000 --- a/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/bind/B00810ListboxMultiple.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.zkoss.zats.testapp.bind; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; -import java.util.Set; - -import org.zkoss.bind.annotation.Command; -import org.zkoss.bind.annotation.DependsOn; -import org.zkoss.bind.annotation.NotifyChange; - -public class B00810ListboxMultiple { - private List model; - private Set selected; - boolean multiple = true; - - public B00810ListboxMultiple() { - generateModel(10); - } - - private void generateModel(int size) { - model = new ArrayList(); - for (int i = 0; i < size; i++) { - model.add(String.valueOf(i)); - } - } - - public Set getSelected() { - return selected; - } - - public void setSelected(Set selected) { - this.selected = selected; - } - - @DependsOn("selected") - public List getSortedSelected(){ - if(selected==null) return null; - List l = new ArrayList(selected); - Collections.sort(l); - return l; - } - - public List getModel() { - return model; - } - - - public boolean isMultiple() { - return multiple; - } - - @Command @NotifyChange("multiple") - public void toggle(){ - multiple = !multiple; - } - - - @Command @NotifyChange("selected") - public void update(){ - } - -} diff --git a/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/bind/B00821SelectedIndex.java b/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/bind/B00821SelectedIndex.java deleted file mode 100644 index 0344cc2c..00000000 --- a/zats-mimic-ext6/src/test/java/org/zkoss/zats/testapp/bind/B00821SelectedIndex.java +++ /dev/null @@ -1,92 +0,0 @@ -/* CollectionIndexComposer.java - - Purpose: - - Description: - - History: - Created by Dennis - -Copyright (C) 2011 Potix Corporation. All Rights Reserved. - */ - -package org.zkoss.zats.testapp.bind; - -import java.util.ArrayList; -import java.util.List; - -import org.zkoss.zul.ListModelList; - -/** - * @author Dennis Chen - * - */ -public class B00821SelectedIndex { - - List items ; - int index = -1; - - public B00821SelectedIndex() { - items = new ListModelList(); - items.add(new Item("A")); - items.add(new Item("B")); - items.add(new Item("C")); - items.add(new Item("D")); - } - - public List getItems() { - return items; - } - - public int getIndex() { - return index; - } - - public void setIndex(int index) { - this.index = index; - } - - - - - static public class Item { - String name; - - List + + org.zkoss.zats + zats-common + ${project.version} + junit junit @@ -72,7 +77,7 @@ org.eclipse.jetty.websocket - websocket-javax-server + websocket-jakarta-server ${jetty.version} @@ -86,23 +91,12 @@ ${zk.version} test - - org.zkoss.zk - zkex - ${zk.version} - test - org.zkoss.zk zkmax ${zk.version} test - - org.zkoss.zats - zats-common - ${project.version} - org.zkoss.zkforge ckez @@ -117,7 +111,19 @@ org.zkoss.zk - zul + zkplus-legacy + ${zk.version} + test + + + org.zkoss.zk + zkmax + ${zk.version} + provided + + + org.zkoss.zk + zkbind ${zk.version} provided diff --git a/zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/BindValueResolver.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/BindValueResolver.java similarity index 100% rename from zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/BindValueResolver.java rename to zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/BindValueResolver.java diff --git a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/EventDataManager.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/EventDataManager.java index 52856533..9e719d13 100644 --- a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/EventDataManager.java +++ b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/EventDataManager.java @@ -63,27 +63,25 @@ public static synchronized EventDataManager getInstance(){ public EventDataManager() { builders = new HashMap, EventDataBuilder>(); - - registerBuilder("5.0.0", "*", new MouseEventDataBuilder()); - registerBuilder("5.0.0", "*", new InputEventDataBuilder()); - registerBuilder("5.0.0", "*", new CheckEventDataBuilder()); - registerBuilder("5.0.0", "*", new DefaultEventDataBuilder()); - registerBuilder("5.0.0", "*", new OpenEventDataBuilder()); - registerBuilder("5.0.0", "*", new SelectEventDataBuilder()); - registerBuilder("5.0.0", "*", new KeyEventDataBuilder()); - registerBuilder("5.0.0", "*", new RenderEventDataBuilder()); - registerBuilder("5.0.0", "*", new MaximizeEventDataBuilder()); - registerBuilder("5.0.0", "*", new MinimizeEventDataBuilder()); - registerBuilder("5.0.0", "*", new DropEventDataBuilder()); - registerBuilder("5.0.0", "*", new SelectionEventDataBuilder()); - registerBuilder("5.0.0", "*", new SizeEventDataBuilder()); - registerBuilder("5.0.0", "*", new PagingEventDataBuilder()); - registerBuilder("5.0.0", "*", new BookmarkEventDataBuilder()); - registerBuilder("5.0.0", "*", new ColSizeEventDataBuilder()); - registerBuilder("5.0.0", "*", new SortEventDataBuilder()); - registerBuilder("5.0.0", "*", new ScrollEventDataBuilder()); - registerBuilder("5.0.0", "*", new MoveEventDataBuilder()); - //TODO more + registerBuilder("9.6.0", "*", new MouseEventDataBuilder()); + registerBuilder("9.6.0", "*", new InputEventDataBuilder()); + registerBuilder("9.6.0", "*", new CheckEventDataBuilder()); + registerBuilder("9.6.0", "*", new DefaultEventDataBuilder()); + registerBuilder("9.6.0", "*", new OpenEventDataBuilder()); + registerBuilder("9.6.0", "*", new SelectEventDataBuilder()); + registerBuilder("9.6.0", "*", new KeyEventDataBuilder()); + registerBuilder("9.6.0", "*", new RenderEventDataBuilder()); + registerBuilder("9.6.0", "*", new MaximizeEventDataBuilder()); + registerBuilder("9.6.0", "*", new MinimizeEventDataBuilder()); + registerBuilder("9.6.0", "*", new DropEventDataBuilder()); + registerBuilder("9.6.0", "*", new SelectionEventDataBuilder()); + registerBuilder("9.6.0", "*", new SizeEventDataBuilder()); + registerBuilder("9.6.0", "*", new PagingEventDataBuilder()); + registerBuilder("9.6.0", "*", new BookmarkEventDataBuilder()); + registerBuilder("9.6.0", "*", new ColSizeEventDataBuilder()); + registerBuilder("9.6.0", "*", new SortEventDataBuilder()); + registerBuilder("9.6.0", "*", new ScrollEventDataBuilder()); + registerBuilder("9.6.0", "*", new MoveEventDataBuilder()); } @SuppressWarnings({ "rawtypes", "unchecked" }) diff --git a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/OperationAgentManager.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/OperationAgentManager.java index d423a49c..3b8d9f19 100644 --- a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/OperationAgentManager.java +++ b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/OperationAgentManager.java @@ -41,65 +41,15 @@ import org.zkoss.zats.mimic.impl.operation.TextboxOpenAgentBuilder; import org.zkoss.zats.mimic.impl.operation.TreecolSortAgentBuilder; import org.zkoss.zats.mimic.impl.operation.WindowSizeAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.input.DateInputAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.input.DecimalInputAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.input.DecimalStringInputAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.input.IntegerInputAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.input.IntegerStringInputAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.input.TextInputAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.input.TimeInputAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.select.ComboitemSelectAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.select.LisitemSelectAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.select.ListitemMultipleSelectAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.select.TabSelectAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.select.TreeSelectAgentBuilder; -import org.zkoss.zats.mimic.impl.operation.select.TreeitemMultipleSelectAgentBuilder; +import org.zkoss.zats.mimic.impl.operation.input.*; +import org.zkoss.zats.mimic.impl.operation.select.*; import org.zkoss.zats.mimic.operation.OperationAgent; import org.zkoss.zk.ui.AbstractComponent; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Desktop; import org.zkoss.zk.ui.HtmlBasedComponent; -import org.zkoss.zul.A; -import org.zkoss.zul.Bandbox; -import org.zkoss.zul.Button; -import org.zkoss.zul.Center; -import org.zkoss.zul.Checkbox; -import org.zkoss.zul.Column; -import org.zkoss.zul.Combobox; -import org.zkoss.zul.Comboitem; -import org.zkoss.zul.Datebox; -import org.zkoss.zul.Decimalbox; -import org.zkoss.zul.Detail; -import org.zkoss.zul.Doublebox; -import org.zkoss.zul.Doublespinner; -import org.zkoss.zul.East; -import org.zkoss.zul.Fileupload; -import org.zkoss.zul.Grid; -import org.zkoss.zul.Group; -import org.zkoss.zul.Groupbox; -import org.zkoss.zul.Intbox; -import org.zkoss.zul.Listbox; -import org.zkoss.zul.Listgroup; -import org.zkoss.zul.Listheader; -import org.zkoss.zul.Listitem; -import org.zkoss.zul.Longbox; -import org.zkoss.zul.Menuitem; -import org.zkoss.zul.North; -import org.zkoss.zul.Paging; -import org.zkoss.zul.Panel; -import org.zkoss.zul.Popup; -import org.zkoss.zul.Slider; -import org.zkoss.zul.South; -import org.zkoss.zul.Spinner; -import org.zkoss.zul.Splitter; -import org.zkoss.zul.Tab; -import org.zkoss.zul.Timebox; -import org.zkoss.zul.Toolbarbutton; -import org.zkoss.zul.Tree; -import org.zkoss.zul.Treecol; -import org.zkoss.zul.Treeitem; -import org.zkoss.zul.West; -import org.zkoss.zul.Window; +import org.zkoss.zkmax.zul.Navitem; +import org.zkoss.zul.*; import org.zkoss.zul.impl.InputElement; /** @@ -138,132 +88,144 @@ public OperationAgentManager() { resolvedBuilders = Collections.synchronizedMap(new HashMap>()); //most common agents - registerBuilder("5.0.0", "*", Desktop.class, new DesktopBookmarkAgentBuilder()); + registerBuilder("9.6.0", "*", Desktop.class, new DesktopBookmarkAgentBuilder()); - registerBuilder("5.0.0", "*", AbstractComponent.class, new GenericClickAgentBuilder()); - registerBuilder("5.0.0", "*", AbstractComponent.class, new GenericKeyStrokeAgentBuilder()); - registerBuilder("5.0.0", "*", Component.class, new AuAgentBuilder()); + registerBuilder("9.6.0", "*", AbstractComponent.class, new GenericClickAgentBuilder()); + registerBuilder("9.6.0", "*", AbstractComponent.class, new GenericKeyStrokeAgentBuilder()); + registerBuilder("9.6.0", "*", Component.class, new AuAgentBuilder()); // the focus - registerBuilder("5.0.0", "*", InputElement.class, new GenericFocusAgentBuilder()); - registerBuilder("5.0.0", "*", A.class, new GenericFocusAgentBuilder()); - registerBuilder("5.0.0", "*", Button.class, new GenericFocusAgentBuilder()); - registerBuilder("5.0.0", "*", Checkbox.class, new GenericFocusAgentBuilder()); - registerBuilder("5.0.0", "*", Listbox.class, new GenericFocusAgentBuilder()); - registerBuilder("5.0.0", "*", Tree.class,new GenericFocusAgentBuilder()); + registerBuilder("9.6.0", "*", InputElement.class, new GenericFocusAgentBuilder()); + registerBuilder("9.6.0", "*", A.class, new GenericFocusAgentBuilder()); + registerBuilder("9.6.0", "*", Button.class, new GenericFocusAgentBuilder()); + registerBuilder("9.6.0", "*", Checkbox.class, new GenericFocusAgentBuilder()); + registerBuilder("9.6.0", "*", Listbox.class, new GenericFocusAgentBuilder()); + registerBuilder("9.6.0", "*", Tree.class,new GenericFocusAgentBuilder()); // the inputs - registerBuilder("5.0.0", "*", InputElement.class, new TextInputAgentBuilder()); - registerBuilder("5.0.0", "*", Intbox.class, new IntegerInputAgentBuilder()); - registerBuilder("5.0.0", "*", Longbox.class, new IntegerStringInputAgentBuilder()); - registerBuilder("5.0.0", "*", Spinner.class, new IntegerInputAgentBuilder()); + registerBuilder("9.6.0", "*", InputElement.class, new TextInputAgentBuilder()); + registerBuilder("9.6.0", "*", Intbox.class, new IntegerInputAgentBuilder()); + registerBuilder("9.6.0", "*", Longbox.class, new IntegerStringInputAgentBuilder()); + registerBuilder("9.6.0", "*", Spinner.class, new IntegerInputAgentBuilder()); - registerBuilder("5.0.0", "*", Decimalbox.class, new DecimalStringInputAgentBuilder()); - registerBuilder("5.0.0", "*", Doublebox.class, new DecimalInputAgentBuilder()); - registerBuilder("5.0.0", "*", Doublespinner.class, new DecimalInputAgentBuilder()); + registerBuilder("9.6.0", "*", Decimalbox.class, new DecimalStringInputAgentBuilder()); + registerBuilder("9.6.0", "*", Doublebox.class, new DecimalInputAgentBuilder()); + registerBuilder("9.6.0", "*", Doublespinner.class, new DecimalInputAgentBuilder()); - registerBuilder("5.0.0", "*", Datebox.class, new DateInputAgentBuilder()); - registerBuilder("5.0.0", "*", Timebox.class, new TimeInputAgentBuilder()); + registerBuilder("9.6.0", "*", Datebox.class, new DateTypeAgentBuilderZK96()); + registerBuilder("9.6.0", "*", Timebox.class, new TimeTypeAgentBuilderZK96()); // the check - registerBuilder("5.0.0", "*", Menuitem.class,new GenericCheckAgentBuilder()); + registerBuilder("9.6.0", "*", Menuitem.class,new GenericCheckAgentBuilder()); // the check of check box and radio button - registerBuilder("5.0.0", "*", Checkbox.class, new GenericCheckAgentBuilder()); - + registerBuilder("9.6.0", "*", Checkbox.class, new GenericCheckAgentBuilder()); + registerBuilder("9.6.0", "*", Toolbarbutton.class, new GenericCheckAgentBuilder()); + // the single select - registerBuilder("5.0.0", "*", Comboitem.class, new ComboitemSelectAgentBuilder()); - registerBuilder("5.0.0", "*", Tab.class, new TabSelectAgentBuilder()); - registerBuilder("5.0.0", "*", Listitem.class, new LisitemSelectAgentBuilder()); - registerBuilder("5.0.0", "*", Treeitem.class, new TreeSelectAgentBuilder()); - + registerBuilder("9.6.0", "*", Comboitem.class, new ComboitemSelectAgentBuilder()); + registerBuilder("9.6.0", "*", Tab.class, new TabSelectAgentBuilder()); + registerBuilder("9.6.0", "*", Listitem.class, new LisitemSelectAgentBuilder()); + registerBuilder("9.6.0", "*", Treeitem.class, new TreeSelectAgentBuilder()); + // the multiple select - registerBuilder("5.0.0", "*", Listitem.class, new ListitemMultipleSelectAgentBuilder()); - registerBuilder("5.0.0", "*", Treeitem.class, new TreeitemMultipleSelectAgentBuilder()); - + registerBuilder("9.6.0", "*", Listitem.class, new ListitemMultipleSelectAgentBuilder()); + registerBuilder("9.6.0", "*", Treeitem.class, new TreeitemMultipleSelectAgentBuilder()); + + // select by index + registerBuilder("9.6.0", "*", Selectbox.class, new SelectboxSelectByIndexAgentBuilder()); + // the open - registerBuilder("5.0.0", "*", Groupbox.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Detail.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Group.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Listgroup.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Treeitem.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Window.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Panel.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Center.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", North.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", East.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", West.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", South.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Splitter.class, new GenericOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Popup.class, new GenericOpenAgentBuilder()); - - registerBuilder("5.0.0", "*", Bandbox.class, new TextboxOpenAgentBuilder()); - registerBuilder("5.0.0", "*", Combobox.class, new TextboxOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Groupbox.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Detail.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Group.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Listgroup.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Treeitem.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Window.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Panel.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Center.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", North.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", East.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", West.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", South.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Splitter.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Popup.class, new GenericOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Bandbox.class, new TextboxOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Combobox.class, new TextboxOpenAgentBuilder()); + registerBuilder("9.6.0", "*", Combobutton.class, new GenericOpenAgentBuilder()); + // the close - registerBuilder("5.0.0", "*", Window.class,new GenericCloseAgentBuilder()); - registerBuilder("5.0.0", "*", Panel.class, new GenericCloseAgentBuilder()); - registerBuilder("5.0.0", "*", Tab.class,new GenericCloseAgentBuilder()); + registerBuilder("9.6.0", "*", Window.class,new GenericCloseAgentBuilder()); + registerBuilder("9.6.0", "*", Panel.class, new GenericCloseAgentBuilder()); + registerBuilder("9.6.0", "*", Tab.class,new GenericCloseAgentBuilder()); // the render - registerBuilder("5.0.0", "*", Listbox.class, new ListboxRenderAgentBuilder()); - registerBuilder("5.0.0", "*", Grid.class, new GridRenderAgentBuilder()); + registerBuilder("9.6.0", "*", Listbox.class, new ListboxRenderAgentBuilder()); + registerBuilder("9.6.0", "*", Grid.class, new GridRenderAgentBuilder()); // the resize - registerBuilder("5.0.0", "*", Window.class, new WindowSizeAgentBuilder()); - registerBuilder("5.0.0", "*", Panel.class, new PanelSizeAgentBuilder()); -// registerBuilder("5.0.0", "*", Column.class, new HeaderSizeAgentBuilder()); -// registerBuilder("5.0.0", "*", Listheader.class, new HeaderSizeAgentBuilder()); -// registerBuilder("5.0.0", "*", Treecol.class, new HeaderSizeAgentBuilder()); + registerBuilder("9.6.0", "*", Window.class, new WindowSizeAgentBuilder()); + registerBuilder("9.6.0", "*", Panel.class, new PanelSizeAgentBuilder()); +// registerBuilder("9.6.0", "*", Column.class, new HeaderSizeAgentBuilder()); +// registerBuilder("9.6.0", "*", Listheader.class, new HeaderSizeAgentBuilder()); +// registerBuilder("9.6.0", "*", Treecol.class, new HeaderSizeAgentBuilder()); //drag & drop - registerBuilder("5.0.0", "*", HtmlBasedComponent.class, new GenericDragAgentBuilder()); + registerBuilder("9.6.0", "*", HtmlBasedComponent.class, new GenericDragAgentBuilder()); //hover - registerBuilder("5.0.0", "*", HtmlBasedComponent.class, new GenericHoverAgentBuilder()); + registerBuilder("9.6.0", "*", HtmlBasedComponent.class, new GenericHoverAgentBuilder()); //paging - registerBuilder("5.0.0", "*", Paging.class, new PagingAgentBuilder()); + registerBuilder("9.6.0", "*", Paging.class, new PagingAgentBuilder()); //group - registerBuilder("5.0.0", "*", Column.class, new GenericGroupAgentBuilder()); + registerBuilder("9.6.0", "*", Column.class, new GenericGroupAgentBuilder()); //sort - registerBuilder("5.0.0", "*", Column.class, new ColumnSortAgentBuilder()); - registerBuilder("5.0.0", "*", Listheader.class, new ListheaderSortAgentBuilder()); - registerBuilder("5.0.0", "*", Treecol.class, new TreecolSortAgentBuilder()); + registerBuilder("9.6.0", "*", Column.class, new ColumnSortAgentBuilder()); + registerBuilder("9.6.0", "*", Listheader.class, new ListheaderSortAgentBuilder()); + registerBuilder("9.6.0", "*", Treecol.class, new TreecolSortAgentBuilder()); // the scroll - registerBuilder("5.0.0", "*", Slider.class, new SliderInputAgentBuilder()); + registerBuilder("9.6.0", "*", Slider.class, new SliderInputAgentBuilder()); // the move - registerBuilder("5.0.0", "*", Window.class, new GenericMoveAgentBuilder()); - registerBuilder("5.0.0", "*", Panel.class, new GenericMoveAgentBuilder()); + registerBuilder("9.6.0", "*", Window.class, new GenericMoveAgentBuilder()); + registerBuilder("9.6.0", "*", Panel.class, new GenericMoveAgentBuilder()); // upload - registerBuilder("5.0.0", "*", Button.class, new ButtonUploadAgentBuilder()); - registerBuilder("5.0.0", "*", Fileupload.class, new ButtonUploadAgentBuilder()); - registerBuilder("5.0.0", "*", Toolbarbutton.class, new ButtonUploadAgentBuilder()); - registerBuilder("5.0.0", "*", Menuitem.class, new MenuitemUploadAgentBuilder()); - registerBuilder("5.0.0", "*", Desktop.class, new DialogUploadAgentBuilder()); + registerBuilder("9.6.0", "*", Button.class, new ButtonUploadAgentBuilder()); + registerBuilder("9.6.0", "*", Fileupload.class, new ButtonUploadAgentBuilder()); + registerBuilder("9.6.0", "*", Toolbarbutton.class, new ButtonUploadAgentBuilder()); + registerBuilder("9.6.0", "*", Menuitem.class, new MenuitemUploadAgentBuilder()); + registerBuilder("9.6.0", "*", Desktop.class, new DialogUploadAgentBuilder()); //----------special case --- - - - String extClz; - - //colorbox in zkex.jar which is optional - extClz = "org.zkoss.zkex.zul.Colorbox"; - if(Util.hasClass(extClz)){ - registerBuilder("5.0.0", "*", extClz, + + if (Util.hasClass("org.zkoss.bind.Binder")) { // zkbind + ValueResolverManager.getInstance().registerResolver("9.6.0", "*", "bind", + "org.zkoss.zats.mimic.impl.BindValueResolver"); + } + + String colorboxClassName = "org.zkoss.zkex.zul.Colorbox"; // zkex + if(Util.hasClass(colorboxClassName)){ + registerBuilder("9.6.0", "*", colorboxClassName, "org.zkoss.zats.mimic.impl.operation.input.ColorboxInputAgentBuilder"); } - + + String navitemClassName = "org.zkoss.zkmax.zul.Navitem"; // zkmax only + if(Util.hasClass(navitemClassName)){ + registerBuilder("9.6.0", "*", navitemClassName, + "org.zkoss.zats.mimic.impl.operation.select.NavitemSelectAgentBuilder"); + } + // the ckeditor (optional) - extClz = "org.zkforge.ckez.CKeditor"; - if(Util.hasClass(extClz)){ - registerBuilder("5.0.0", "*", extClz, + String ckeditorClassName = "org.zkforge.ckez.CKeditor"; + if(Util.hasClass(ckeditorClassName)){ + registerBuilder("9.6.0", "*", ckeditorClassName, "org.zkoss.zats.mimic.impl.operation.input.TextInputAgentBuilder"); - } + } } /** diff --git a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/ResponseHandlerManager.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/ResponseHandlerManager.java index 757b9567..52253aa9 100644 --- a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/ResponseHandlerManager.java +++ b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/ResponseHandlerManager.java @@ -19,6 +19,7 @@ import org.zkoss.zats.mimic.impl.response.DownloadHandler; import org.zkoss.zats.mimic.impl.response.EchoEventHandler; import org.zkoss.zats.mimic.impl.response.AuLogHandler; +import org.zkoss.zats.mimic.impl.response.EchoEventHandlerExt96; /** * The manager of response handler. @@ -43,14 +44,14 @@ public ResponseHandlerManager() { updateHandlers = new HashMap(); // layout response handler - registerHandler("5.0.0", "*", DownloadHandler.REGISTER_KEY, (LayoutResponseHandler)new DownloadHandler()); - registerHandler("5.0.0", "5.*.*", EchoEventHandler.REGISTER_KEY, (LayoutResponseHandler)new EchoEventHandler()); - registerHandler("5.0.0", "*", AuLogHandler.REGISTER_KEY, (LayoutResponseHandler)new AuLogHandler()); + registerHandler("9.6.0", "*", DownloadHandler.REGISTER_KEY, (LayoutResponseHandler)new DownloadHandler()); + registerHandler("9.6.0", "*", EchoEventHandler.REGISTER_KEY, (LayoutResponseHandler) new EchoEventHandlerExt96()); + registerHandler("9.6.0", "*", AuLogHandler.REGISTER_KEY, (LayoutResponseHandler)new AuLogHandler()); // AU response handler - registerHandler("5.0.0", "*", DownloadHandler.REGISTER_KEY, (UpdateResponseHandler)new DownloadHandler()); - registerHandler("5.0.0", "5.*.*", EchoEventHandler.REGISTER_KEY, (UpdateResponseHandler)new EchoEventHandler()); - registerHandler("5.0.0", "*", AuLogHandler.REGISTER_KEY, (UpdateResponseHandler)new AuLogHandler()); + registerHandler("9.6.0", "*", DownloadHandler.REGISTER_KEY, (UpdateResponseHandler)new DownloadHandler()); + registerHandler("9.6.0", "*", EchoEventHandler.REGISTER_KEY, (UpdateResponseHandler) new EchoEventHandlerExt96()); + registerHandler("9.6.0", "*", AuLogHandler.REGISTER_KEY, (UpdateResponseHandler)new AuLogHandler()); } public void registerHandler(String startVersion, String endVersion, String key, String className) { diff --git a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/ValueResolverManager.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/ValueResolverManager.java index 00cc6170..cccfe3e2 100644 --- a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/ValueResolverManager.java +++ b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/ValueResolverManager.java @@ -36,7 +36,7 @@ public static synchronized ValueResolverManager getInstance(){ public ValueResolverManager() { //ComponentAgent resolver - registerResolver("5.0.0","*", "agent", new ValueResolver(){ + registerResolver("9.6.0","*", "agent", new ValueResolver(){ @SuppressWarnings("unchecked") public T resolve(Agent agent, Class clazz) { if (OperationAgent.class.isAssignableFrom(clazz)) { @@ -50,7 +50,7 @@ public T resolve(Agent agent, Class clazz) { } }); //ZK native component resolver - registerResolver("5.0.0","*", "component", new ValueResolver(){ + registerResolver("9.6.0","*", "component", new ValueResolver(){ @SuppressWarnings("unchecked") public T resolve(Agent agent, Class clazz) { if (clazz.isInstance(agent.getDelegatee())) { diff --git a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/emulator/Emulator.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/emulator/Emulator.java index 6e15bbb6..69c93842 100644 --- a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/emulator/Emulator.java +++ b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/emulator/Emulator.java @@ -14,7 +14,7 @@ import java.io.Closeable; import java.util.Map; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; /** * The application server emulator interface. diff --git a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/emulator/JettyEmulator.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/emulator/JettyEmulator.java index 77533298..cd82714e 100644 --- a/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/emulator/JettyEmulator.java +++ b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/emulator/JettyEmulator.java @@ -21,13 +21,13 @@ import org.eclipse.jetty.util.resource.Resource; import org.eclipse.jetty.util.resource.ResourceCollection; import org.eclipse.jetty.webapp.WebAppContext; -import org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer; +import org.eclipse.jetty.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationHandler; @@ -124,7 +124,7 @@ public void doHandle(String target, Request baseRequest, HttpServletRequest requ server.setHandler(handlers); //enable websocket support - JavaxWebSocketServletContainerInitializer.configure(contextHandler, null); + JakartaWebSocketServletContainerInitializer.configure(contextHandler, null); // synchronize initial step final BlockingQueue queue = new ArrayBlockingQueue(1, true); diff --git a/zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/operation/input/DateTypeAgentBuilderZK96.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/operation/input/DateTypeAgentBuilderZK96.java similarity index 100% rename from zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/operation/input/DateTypeAgentBuilderZK96.java rename to zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/operation/input/DateTypeAgentBuilderZK96.java diff --git a/zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/operation/input/TimeTypeAgentBuilderZK96.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/operation/input/TimeTypeAgentBuilderZK96.java similarity index 100% rename from zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/operation/input/TimeTypeAgentBuilderZK96.java rename to zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/operation/input/TimeTypeAgentBuilderZK96.java diff --git a/zats-mimic-ext7/src/main/java/org/zkoss/zats/mimic/impl/operation/select/NavitemSelectAgentBuilder.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/operation/select/NavitemSelectAgentBuilder.java similarity index 100% rename from zats-mimic-ext7/src/main/java/org/zkoss/zats/mimic/impl/operation/select/NavitemSelectAgentBuilder.java rename to zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/operation/select/NavitemSelectAgentBuilder.java diff --git a/zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/operation/select/SelectboxSelectByIndexAgentBuilder.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/operation/select/SelectboxSelectByIndexAgentBuilder.java similarity index 100% rename from zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/operation/select/SelectboxSelectByIndexAgentBuilder.java rename to zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/operation/select/SelectboxSelectByIndexAgentBuilder.java diff --git a/zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/response/EchoEventHandlerExt96.java b/zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/response/EchoEventHandlerExt96.java similarity index 100% rename from zats-mimic-ext96/src/main/java/org/zkoss/zats/mimic/impl/response/EchoEventHandlerExt96.java rename to zats-mimic/src/main/java/org/zkoss/zats/mimic/impl/response/EchoEventHandlerExt96.java diff --git a/zats-mimic/src/test/java/org/zkoss/zats/testcase/EmulatorTest.java b/zats-mimic/src/test/java/org/zkoss/zats/testcase/EmulatorTest.java index b0c0b31e..aa1ac654 100644 --- a/zats-mimic/src/test/java/org/zkoss/zats/testcase/EmulatorTest.java +++ b/zats-mimic/src/test/java/org/zkoss/zats/testcase/EmulatorTest.java @@ -17,11 +17,11 @@ import java.net.HttpURLConnection; import java.net.URL; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.junit.After; import org.junit.Test; diff --git a/zats-mimic/src/test/java/org/zkoss/zats/testcase/EnvironmentTest.java b/zats-mimic/src/test/java/org/zkoss/zats/testcase/EnvironmentTest.java index 4ec7b06a..80054218 100644 --- a/zats-mimic/src/test/java/org/zkoss/zats/testcase/EnvironmentTest.java +++ b/zats-mimic/src/test/java/org/zkoss/zats/testcase/EnvironmentTest.java @@ -23,7 +23,7 @@ import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import junit.framework.Assert; diff --git a/zats-mimic/src/test/java/org/zkoss/zats/testcase/UtilTest.java b/zats-mimic/src/test/java/org/zkoss/zats/testcase/UtilTest.java index 2d55e97f..7451475f 100644 --- a/zats-mimic/src/test/java/org/zkoss/zats/testcase/UtilTest.java +++ b/zats-mimic/src/test/java/org/zkoss/zats/testcase/UtilTest.java @@ -35,8 +35,8 @@ public void testClose() { @Test public void testVersion() { - Assert.assertTrue(Util.isZKVersion(5)); - Assert.assertFalse(Util.isZKVersion(6)); + Assert.assertTrue(Util.isZKVersion(9)); + Assert.assertFalse(Util.isZKVersion(10)); } @Test @@ -70,6 +70,8 @@ public void testParseVersion() { assertEquals(Util.parseVersion("7.0.0"), Util.parseVersion("7.0.0-FL")); assertEquals(Util.parseVersion("7.0.0"), Util.parseVersion("7.0.0.FL.1")); assertEquals(Util.parseVersion("7.0.0"), Util.parseVersion("7.0.0.FL.123456789")); + assertEquals(Util.parseVersion("9.6.0"), Util.parseVersion("9.6.0-jakarta")); + assertEquals(Util.parseVersion("9.6.0"), Util.parseVersion("9.6.0-jakarta.FL.123456789")); // test wrong cases assertNull(Util.parseVersion("dfasdflj")); diff --git a/zats-mimic/src/test/resources/web/basic/cookie.zul b/zats-mimic/src/test/resources/web/basic/cookie.zul index ed4d2b9e..8ad7b82a 100644 --- a/zats-mimic/src/test/resources/web/basic/cookie.zul +++ b/zats-mimic/src/test/resources/web/basic/cookie.zul @@ -1,32 +1,32 @@ - - - - - -