Revision history [back]

click to hide/show revision 1
initial version

answered 2016-03-02 18:03:06 +0800

gganassin gravatar image gganassin flag of Luxembourg

http://www.hybris.com/

Hello!

Shouldn't be like this?

<grid>
    <rows>
        <row children="@load(vm.arj)">
            <template name="children">
                <cell>
                    <label value="@bind(each)"/>
                </cell>
            </template>
        </row>
    </rows>
</grid>

Gio

click to hide/show revision 2
update and fiddle created

Hello!

Shouldn't be like this?

<grid>
    <rows>
        <row children="@load(vm.arj)">
            <template name="children">
                <cell>
                    <label value="@bind(each)"/>
                </cell>
            </template>
        </row>
    </rows>
</grid>

UPDATE

http://zkfiddle.org/sample/1n3h9pi/4-Grid-dynamic-number-of-cells-zul-only

Gio

Hello!

Shouldn't be like this?

<grid>
    <rows>
        <row children="@load(vm.arj)">
            <template name="children">
                <cell>
                    <label value="@bind(each)"/>
                </cell>
            </template>
        </row>
    </rows>
</grid>

UPDATE

<window id="win" title="Hello World!!" border="normal"
     apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('test.TestTwo')">
    <grid model="@bind(vm.data)">
        <columns children="@load(vm.arj)">
            <template name="children">
                <column label="@bind(each.name)" />
            </template>
        </columns>
        <rows>
            <template name="model" var="r">
                <row children="@load(vm.arj)">
                    <template name="children" var="c">
                        <cell>
                            <label value="@bind(r.get(c.name))"/>
                        </cell>
                    </template>
                </row>
            </template>
        </rows>
    </grid>
</window>
</zk>

http://zkfiddle.org/sample/1n3h9pi/4-Grid-dynamic-number-of-cells-zul-only

Gio

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