To assign data to a component (e.g.
listbox), you have to prepare the data in certain data model. For example,
grid accept interfaces
tree only accepts
TreeModel. See the
setModel method of each component for the kind of model it accepts. Using the wrong type of data model will throw a cast error and is a common beginner mistake.
ZK has implemented following Models: