-
FEATURED COMPONENTS
First time here? Check out the FAQ!
zk10 looks very good, Please share how to integrate with spring boot also
Hey there,
ZK 10 is currently still in development phase. The two projects provided with the recent articles are technology demonstrations, and I'd recommend waiting for the actual tutorial projects before doing integration.
Which feature do you plan on testing in a spring-boot project?
Client-side MVVM is pretty easy to test, you can start from the zk springboot project demo of your choice, and then just update the ZK version of the graddle / maven build file to the current ZK 10 FL, and the relevant depedencies:
<dependency>
<groupId>org.zkoss.zephyr</groupId>
<artifactId>zephyr</artifactId>
<version>${zk.version}</version>
</dependency>
<dependency>
<groupId>org.zkoss.zephyr</groupId>
<artifactId>zephyr-ex</artifactId>
<version>${zk.version}</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zkmax</artifactId>
<version>${zk.version}</version>
</dependency>
Once your project is configured, it's just a matter of switching the default BindComposer on your ViewModel binding with a org.zkoss.zephyrex.bind.ClientBindComposer
<div apply="org.zkoss.zephyrex.bind.ClientBindComposer" viewModel="@id()@init()" ...
For the cloud-native feature, the setup is slightly more complicated. I'd recommend waiting for the tutorial on that one. Not only because of the setup, but also because these features are still under development, and you may need to redo it once the final version is out.
The steps required to use this feature under current FL are: - Setup a zk spring-boot project. - Add the zephyr dependencies - Add the configuration for the new DispacherRichletFilter (which process the StatelessRichlet). Should look like:
FilterRegistrationBean reg = new FilterRegistrationBean(new DispatcherRichletFilter());
reg.addInitParameter("basePackages", "foo.bar.your.package.here");
reg.addUrlPatterns(richletFilterMapping);
Then you'd need to setup the relevant @getMapping in your application to target the Richlets declared in your project.
Thankyou, is it possible to configure "org.zkoss.zephyrex.bind.ClientBindComposer" for entire project as default composer instead of writing in each viewmodel?
Oh yes, absolutely. If you want to switch the ClientBindComposer project-wide, there will be a library property to set in zk.xml for that.
If you had a chance to check-out the smalltalks, the performance test project explains how to do so in its readme file: https://github.com/zkoss-demo/zk10-performance-test
Same warning as per previous post: The features are still in development, so I'd recommend waiting for the stable release, as there might be updates to the APIs or configuration from here to release.
There are some limitations on the structures that can be transformed from the default BindComposer to the ClientBindComposer. You can definitely test it out, but if you encounter exceptions while testing, I'd recommend keeping an eye out for the later article explaining how to optimize the MVVM structures for client-side MVVM
Asked: 2022-04-28 09:19:24 +0800
Seen: 16 times
Last updated: May 02 '22
bug with intboxes on mobile devices
zk keikai-how to add custom button/label to formulabar?
zk-keikai- update multiple cells parallel at same time asynchronously
zk-keikai-How to auto fit column width based on text
zk-keikai-ClipboardPateEvent-called twice
Reference a spring bean from VariableResolver