# Composite component and bind in ZK 6

jaan
88 3

Hi,

I get a composite component working like in this smalltalk: Define Composite Component using Java Annotation in ZK6.
My component has tree comboboxes (country, province and city).
The tree comboboxes works perfectly as expected. But now I want to use them in a master/detail scenario.
When a user selects a record in a list, a default city must be bind to the component

<geocombobox id="gc" defaultCity="@bind(school.city)" />

The binding does not work. It never updates the defaultCity after selecting a record. All other properties work as expected.

Do composite component not allow binding yet?
How can I solve this in a MVVM way?

Thanks,
jaan

delete retag edit

## 3 Replies

shumy
244 1

I what to do exactly what it's described. Does this works now with zk 6.5 ?

Note: I was unable to put a comment in this thread! So this is not an answer.

guiye
28 1

hi, your composite have setDefaultCity and getDefaultCity methods?

did you try with: <textbox id="tx" value="@bind(school.city.name)"/> or something similar? (this is only for know that binding is working)

mujawarv
45 4

hi ; you should define binding property in lang-addon.xml for defaultCity check with this example. link text in this example check lovID bindingg property in lang-addon.xml file .

[hide preview]