Since 9.5.0
Before the introduction of Form Proxies in ZK a HashMap based SimpleForm was used, which was removed in ZK 8+. Upgrading to ZK 8/9 may be difficult in case of heavy customization/specialization of the related classes. In order to enable an upgrade strategy, SimpleForm is reintroduced in ZK 9.5.0.
Below an overview of the related classes and availabilities in the affected version history.
SimpleForm and related classes/interfaces
org.zkoss.bind.Form / FormExt
org.zkoss.bind.impl.FormImpl
org.zkoss.bind.SimpleForm
org.zkoss.bind.Form (base interface for Form Proxies)
SimpleForm
is not available in these versions.
Updated class Hierarchy enabling both Form Proxies and SimpleForm.
org.zkoss.bind.Form
org.zkoss.bind.FormLegacy / FormLegacyExt (re-added / deprecated / available for ZK 7 compatibility)
org.zkoss.bind.impl.FormImpl (re-added / deprecated / available for ZK 7 compatibility)
org.zkoss.bind.SimpleForm (re-added / deprecated / available for ZK 7 compatibility)
Renamed interfaces
org.zkoss.bind.Form -> org.zkoss.bind.FormLegacy
org.zkoss.bind.FormExt -> org.zkoss.bind.FormLegacyExt
SimpleForm Usage
The default usage from a zul file will still create a FormProxyObject
(default since ZK 8.0.x)
<div form="@id('fx') @load(...) @save(...)">
Instead a SimpleForm
can be initialized from zul code (compatible to ZK 7 - without changing Java code) using the
TLD function c:new
.
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
...
<div form="@id('fx') @init(c:new('org.zkoss.bind.SimpleForm')) @load(...) @save(...)">
As in ZK 7 a pre-created SimpleForm
instance can be accessed from a view model.
<div form="@id('fx') @init(vm.myForm) @load(...) @save(...)">