New Features of ZK 5.0.8"
Tmillsclare (talk | contribs) |
m (correct highlight (via JWB)) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 9: | Line 9: | ||
==Databinding composer instead of initiator== | ==Databinding composer instead of initiator== | ||
− | With ZK 5.0.8 users can avoid having to set a page initializer for the annotated databinder by defining a dedicated Composer – AnnotateDataBindingComposer. The code of AnnotateDataBindingComposer.java is simple and easy to read and understand. | + | With ZK 5.0.8 users can avoid having to set a page initializer for the annotated databinder by defining a dedicated Composer – <javadoc>org.zkoss.zkplus.databind.AnnotateDataBindingComposer</javadoc>. The code of AnnotateDataBindingComposer.java is simple and easy to read and understand. |
− | <source lang=" | + | <source lang="xml" > |
− | + | <zk> | |
− | + | <window apply="org.zkoss.demo.MyComposer,org.zkoss.zkplus.databind.AnnotateDataBindingComposer"> | |
− | + | </window> | |
− | + | </zk> | |
− | |||
− | |||
− | |||
− | |||
</source> | </source> | ||
Line 56: | Line 52: | ||
==A method to prevent the use of zscript in a project== | ==A method to prevent the use of zscript in a project== | ||
− | + | ZScript is employed to great effect for prototyping purposes, however, when moving into production systems development teams prefer to use compiled Java code for the performance increase and the better clustering support. | |
− | This can be achieved using a system configuration property. | + | Therefore ZK 5.0.8 introduces a system which enables developers to turn off zscript thus guaranteeing that an application cannot use it. This can be achieved using a system configuration property. |
<source lang="xml"> | <source lang="xml"> | ||
Line 70: | Line 66: | ||
==Allow users to specify the error-box position== | ==Allow users to specify the error-box position== | ||
+ | With ZK 5.0.8 users can now specify the position of the error box. This is done by setting the constraint followed by a comma and then the position. For example: | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <textbox constraint="no empty, end_after"/> | ||
+ | <textbox constraint="no empty, start_before"/> | ||
+ | </source> | ||
+ | |||
+ | Possible values include end_before, end_after, after_start and after_end. | ||
+ | |||
+ | For more information and other possible values please refer to the [[ZK_Component_Reference/Base_Components/InputElement#Constraint | ZK Component Reference]]. | ||
==A way to name the composer GenericAutowireComposer== | ==A way to name the composer GenericAutowireComposer== | ||
− | In ZK 5.0.8 it is now possible to specify the name of the composer using an called < | + | In ZK 5.0.8 it is now possible to specify the name of the composer using an called <code>composerName</code>. For example, |
<source lang="xml"> | <source lang="xml"> |
Latest revision as of 04:18, 20 January 2022
Timothy Clare, Technology Evangelist, Potix Corporation
August 31, 2011
ZK 5.0.8
ZK 5.0.8 is a maintenance release focusing on fixing bugs and releasing new improved features for ZK components.
Databinding composer instead of initiator
With ZK 5.0.8 users can avoid having to set a page initializer for the annotated databinder by defining a dedicated Composer – AnnotateDataBindingComposer. The code of AnnotateDataBindingComposer.java is simple and easy to read and understand.
<zk>
<window apply="org.zkoss.demo.MyComposer,org.zkoss.zkplus.databind.AnnotateDataBindingComposer">
</window>
</zk>
For more information please take a look at the associated blog.
JasperReports now upgraded to JasperReports4
ZK has upgraded the included JasperReports to JasperReports 4.
For more information on JasperReports 4 changes click here.
Locale improvements for components
Datebox and Timebox
By default the real format depends on the current Locale (i.e., Locales.getCurrent()). However, developers can now manually specify the locale.
<datebox format="medium+full" locale="de_DE"/>
<datebox format="long" locale="fr"/>
<timebox format="medium" locale="de_DE"/>
<timebox format="long" locale="fr"/>
This has been enhanced in 5.0.8 and the output now uses the locale's language as well as the format.
For more information please see the Datebox and Timebox documentation.
Decimals, integers, long and double components
The Decimalbox, Intbox, Longbox, Doublebox, DoubleSpinner and Spinner have all been upgraded to enable users to specify different locales.
A method to prevent the use of zscript in a project
ZScript is employed to great effect for prototyping purposes, however, when moving into production systems development teams prefer to use compiled Java code for the performance increase and the better clustering support.
Therefore ZK 5.0.8 introduces a system which enables developers to turn off zscript thus guaranteeing that an application cannot use it. This can be achieved using a system configuration property.
<system-config>
<disable-zscript>true</disable-zscript>
</system-config>
For more information please visit our ZK Configuration Reference and ZK Developer's Reference
Allow users to specify the error-box position
With ZK 5.0.8 users can now specify the position of the error box. This is done by setting the constraint followed by a comma and then the position. For example:
<textbox constraint="no empty, end_after"/>
<textbox constraint="no empty, start_before"/>
Possible values include end_before, end_after, after_start and after_end.
For more information and other possible values please refer to the ZK Component Reference.
A way to name the composer GenericAutowireComposer
In ZK 5.0.8 it is now possible to specify the name of the composer using an called composerName
. For example,
<window apply="MyComposer">
<custom-attributes composerName="mc"/> <!-- name the composer as mc -->
<textbox value="${mc.title}"/>
</window>
For more information please visit the ZK Developer Reference.
Comments
Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License. |