0

ZK6. forEach on macro

asked 2011-12-18 08:57:55 +0800

ctapobep gravatar image ctapobep
163 2

updated 2011-12-18 08:59:40 +0800

I have this code:

  <window  apply="org.zkoss.bind.BindComposer"
          viewModel="@id('vm') @init(branchPermissionManagementVm)">
    <user-groups-block forEach="@load(vm.blocks)" block="${each}" />
  </window>
If I use @load, it passes a string, if I use it as a Spring bean, it resolves properties correctly:
  <window apply="org.zkoss.bind.BindComposer"
          viewModel="@id('vm') @init(branchPermissionManagementVm)">
    <user-groups-block forEach="${branchPermissionManagementVm.blocks}" block="${each}" />
  </window>
Probably it's not a good idea to mash ${} and @load() up together in the same tag, but what's the correct way then?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-12-18 09:38:50 +0800

ctapobep gravatar image ctapobep
163 2

In this blog they say about templates for collection binding, but this implies I need to use 'Listbox/Grid/Tree/Combobox' which is not what I planned.

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2011-12-18 08:57:55 +0800

Seen: 228 times

Last updated: Dec 18 '11

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