0

Update Listbox children bound with method using View Model

asked 2013-05-13 08:36:33 +0800

JustinFrost gravatar image JustinFrost
145 1 6

Hi All,

I have an accordion tabbox, each tabpanel contails a list box which is bound using a view model method call:

<tabpanels children="@bind(vm.topLevelNav)">
    <template name="children" var="parent">
        <tabpanel>
            <listbox children="@bind(vm.getChildNav(parent.hierId))">
               <template name="children" var="navItem">
               <listitem> 
                   <listcell label="@bind(navItem.name)"/>
               </listitem>  
               </template>  
            </listbox>
        </tabpanel>
    </template>

</tabpanels>

How do I update only the listbox using the model ? If I do a NotifyChange("topLevelNav"), it refreshes but resets the accordion to its orginal state (top tab expanded) which is not what I want.

Any help appreciated.

Thanks.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-05-22 12:33:59 +0800

cor3000 gravatar image cor3000
6280 2 7

Hi Justin,

this can be done like using BindUtils.postNotifyChange(...) as in this example here on ZK fiddle

Robert

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2013-05-13 08:36:33 +0800

Seen: 37 times

Last updated: May 22 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More