setSelectedIndex of Listbox doesn't work in doAfterCompse method

asked 2017-07-23 22:04:46 +0800

ddbullfrog gravatar image ddbullfrog
3 2

updated 2017-07-23 22:06:06 +0800

setSelectedIndex of Listbox doesn't work in doAfterCompse method

See ZK Fiddle.


delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-24 03:00:30 +0800

cor3000 gravatar image cor3000
4351 2 7
ZK Team

When working with a ListModel you have to set the selection on the ListModelList instance:


Also adding removing new items need to be done through the model. Don't change the component state when using a model controlling that state.

I hope this helps.


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

1 follower



Asked: 2017-07-23 22:04:46 +0800

Seen: 13 times

Last updated: Jul 24 '17

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