Doublespinner"
From Documentation
Jumperchen (talk | contribs) (Created page with '{{ZKComponentReferencePageHeader}} = Doublespinner = *Demonstration: [http://www.zkoss.org/zkdemo/input/form_sample Spinner] *Java API: <javadoc>org.zkoss.zul.Doublespinner</ja…') |
Jumperchen (talk | contribs) |
||
Line 109: | Line 109: | ||
|- | |- | ||
| 5.0.6 | | 5.0.6 | ||
− | | Dec. | + | | Dec. 2010 |
| add new component | | add new component | ||
|} | |} |
Revision as of 08:27, 20 December 2010
Doublespinner
- Demonstration: Spinner
- Java API: Doublespinner
- JavaScript API: Doublespinner
- Style Guide: Doublespinner
Employment/Purpose
An edit box for holding a constrained double.
Example
<window title="Double Spinner" border="normal" width="150px">
<doublespinner />
</window>
In-place Editing
Fixed Width
<doublespinner width="100px" inplace="true" value="30" />
Dynamic Width
Because inplace editing function in ZK is pure client side action, so we can use client api to modify the width (server side do not need to know)
<zk xmlns:c="client">
<doublespinner inplace="true" value="240" width="30px" c:onFocus='this.setWidth("60px")' c:onBlur='this.setWidth("30px")' />
</zk>
Properties
Constraint
You could specify what value to accept for input controls by use of the constraint property. It could be a combination of no empty and the minimum and maximum to doublespinner.
To specify two or more constraints, use comma to separate them as follows.
<doublespinner step="0.5" constraint="no empty,min -2.5 max 6.5"/>
If you prefer to display different message to the default one, you can append the error message to the constraint with a colon.
<doublespinner step="0.5" constraint="no empty,min -2.5 max 6.5: between -2.5 to 6.5"/>
Notes:
- The error message, if specified, must be the last element and start with colon.
- To support multiple languages, you could use the 「l」 function as depicted in the Internationalization chapter.
<doublespinner step="0.5" constraint="no empty,min -2.5 max 6.5: ${c:l('err.msg.doublespinner')}"/>
Inherited Functions
Please refer to NumberInputElement for inherited functions.
Supported Events
None | None |
- Inherited Supported Events: NumberInputElement
Supported Molds
Available molds of a component are defined in lang.xml embedded in zul.jar.
Supported Children
*None
Use Cases
Version | Description | Example Location |
---|---|---|
Version History
Version | Date | Content |
---|---|---|
5.0.6 | Dec. 2010 | add new component |