Cascader"

From Documentation
(Created page with "{{ZKComponentReferencePageHeader}} = Cascader = *Demonstration: *Java API: [http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkmax/zul/Cascader.html Cascader] *JavaScript API...")
 
Line 18: Line 18:
 
         DefaultTreeModel tm = new DefaultTreeModel(new DefaultTreeNode("ROOT",
 
         DefaultTreeModel tm = new DefaultTreeModel(new DefaultTreeNode("ROOT",
 
         Arrays.asList(new DefaultTreeNode[]{
 
         Arrays.asList(new DefaultTreeNode[]{
                 new DefaultTreeNode("David", Arrays.asList(new TreeNode[]{new DefaultTreeNode("David-1"), new DefaultTreeNode("David-2")})),
+
                 new DefaultTreeNode("David", Arrays.asList(new TreeNode[]{new DefaultTreeNode("David-1"),
                new DefaultTreeNode("Thomas",new ArrayList()),
+
                                new DefaultTreeNode("David-2")})), new DefaultTreeNode("Thomas",new ArrayList()),
 
                 new DefaultTreeNode("Steven",new ArrayList())})));
 
                 new DefaultTreeNode("Steven",new ArrayList())})));
 
     ]]></zscript>
 
     ]]></zscript>

Revision as of 09:54, 12 November 2019

Cascader

Employment/Purpose

Cascader is a tree-based selectbox.

Example

<source lang="xml" >
<zscript><![CDATA[
        DefaultTreeModel tm = new DefaultTreeModel(new DefaultTreeNode("ROOT",
        Arrays.asList(new DefaultTreeNode[]{
                new DefaultTreeNode("David", Arrays.asList(new TreeNode[]{new DefaultTreeNode("David-1"),
                                 new DefaultTreeNode("David-2")})), new DefaultTreeNode("Thomas",new ArrayList()),
                new DefaultTreeNode("Steven",new ArrayList())})));
    ]]></zscript>
    <cascader width="300px" model="${tm}" />

Users can select in layers, and the selection path would be converted into text. (Default is joining by slashes, i.g. "A/B/C")

Properties

Model

Placeholder

Open

Renderer

ItemConverter

Supported Events

Name
Event Type
onSelect
Event: SelectEvent

Represents an event caused by user's the selection changed at the client.

onOpen
Event: OpenEvent

Represents an event that indicates an open state that is changed at the client.


Supported Children

* None

Use Cases

Version Description Example Location
     

Version History

Last Update : 2019/11/12


Version Date Content
9.0.0 November, 2019 Anchornav was introduced.



Last Update : 2019/11/12

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.