New Features of ZK 9.5.0"
From Documentation
Line 46: | Line 46: | ||
== Default ViewModel ID== | == Default ViewModel ID== | ||
− | Default ViewModel ID is <tt>vm</tt> | + | Default ViewModel ID is <tt>vm</tt> without explicitly specified. |
<source lang='xml'> | <source lang='xml'> | ||
− | <!-- original --> | + | <!-- original syntax --> |
<div viewModel="@id('vm') @init('MyViewModel')" > | <div viewModel="@id('vm') @init('MyViewModel')" > | ||
+ | |||
<!-- new syntax --> | <!-- new syntax --> | ||
<div viewModel="@('MyViewModel')"> | <div viewModel="@('MyViewModel')"> | ||
</source> | </source> | ||
+ | |||
+ | == Auto ViewModel Lookup == | ||
+ | By default, ZK looks for a ViewModel in the same [https://www.zkoss.org/wiki/ZK%20Developer's%20Reference/UI%20Composing/ID%20Space ID space]. | ||
+ | |||
+ | <source lang='xml'> | ||
+ | <!-- original syntax --> | ||
+ | <label value="@load(vm.aaa)"/> | ||
+ | |||
+ | <!-- new syntax --> | ||
+ | <label value="@load(aaa)"/> | ||
+ | |||
+ | </source> | ||
+ | |||
+ | == Auto Binding Name Mapping == | ||
+ | |||
+ | <source lang='xml'> | ||
+ | <!-- original syntax --> | ||
+ | |||
+ | |||
+ | <!-- new syntax --> | ||
+ | @load(vm.aaa) -> @(aaa) | ||
+ | @bind(vm.aaa) -> @(aaa) //auto bind in input element | ||
+ | @commnad('cmd') -> @('cmd') //auto bind in event (ex. onClick, onXxx...) | ||
+ | </source> | ||
+ | |||
<!-- | <!-- |
Revision as of 10:29, 11 September 2020
Author
Hawk Chen, Engineer, Potix Corporation
Hawk Chen, Engineer, Potix Corporation
Date
Sep. 22, 2020
Sep. 22, 2020
Version
ZK 9.5.0
ZK 9.5.0
Introduction
In ZK 9.5, we focus on User Experience and Developer Experience. Therefore, we pay lots of effort to make components
Download
Highlighted Features
accessibility
Components
Data Binding Syntax Sugar
ZK supports a simplified syntax with a built-in convention. You can type fewer characters without an annotation name.
Default ViewModel ID
Default ViewModel ID is vm without explicitly specified.
<!-- original syntax -->
<div viewModel="@id('vm') @init('MyViewModel')" >
<!-- new syntax -->
<div viewModel="@('MyViewModel')">
Auto ViewModel Lookup
By default, ZK looks for a ViewModel in the same ID space.
<!-- original syntax -->
<label value="@load(vm.aaa)"/>
<!-- new syntax -->
<label value="@load(aaa)"/>
Auto Binding Name Mapping
<!-- original syntax -->
<!-- new syntax -->
@load(vm.aaa) -> @(aaa)
@bind(vm.aaa) -> @(aaa) //auto bind in input element
@commnad('cmd') -> @('cmd') //auto bind in event (ex. onClick, onXxx...)
Theme Customization
AJAX/WebSocket
[ZK-4175] - replace XHR with the fetch() API to allow SSO redirect handling [ZK-4451] - iOS 13 cause iPad to set "request desktop mode" for all website by default [ZK-4530] - Provide a "heart beat"/"ping pong" mechanism for websocket connections [ZK-4546] - Caching of EL method invocations [ZK-4562] - Introduce OWASP Dependency-Check
Enhancements
Upgrade Notes
Comments
Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License. |