Revision history [back]

click to hide/show revision 1
initial version

answered 2023-02-01 10:10:15 +0800

hawk gravatar image hawk

http://hawkphoenix.blogsp... ZK Team

If your prefix n mean zk 'native' namespace, then native HTML tags don't support data binding. See https://www.zkoss.org/wiki/ZKDeveloper%27sReference/UIPatterns/HTMLTags

If your prefix n mean zk 'native' namespace, then native HTML tags don't support data binding. See https://www.zkoss.org/wiki/ZKDeveloper%27sReference/UIPatterns/HTMLTags

You can replace it with xhtml component set like:

<zk xmlns:n="native" xmlns:x="xhtml">
    <zscript><![CDATA[
    ListModelList items = new ListModelList();
    items.add("a");
    items.add("b");
    ]]></zscript>
    <div apply="org.zkoss.bind.BindComposer">
        <x:ul children="@load(items)">
            <template name="children">
                <n:li>${each}</n:li>
            </template>
        </x:ul>
    </div>
</zk>

If your prefix n mean zk 'native' namespace, then native HTML tags don't support data binding. See https://www.zkoss.org/wiki/ZKDeveloper%27sReference/UIPatterns/HTMLTags

You can replace it with with:

  • xhtml component set like:

    set
  • <forEach>

    <zk xmlns:n="native" xmlns:x="xhtml"> <zscript><![CDATA[ ListModelList items = new ListModelList(); items.add("a"); items.add("b"); ]]></zscript> <div apply="org.zkoss.bind.BindComposer"> <zscript>

    <x:ul children="@load(items)"> <template name="children"> <n:li>${each}</n:li> </template> </x:ul> </x:ul>

        <!-- native with forEach   -->
        <n:ul>
            <forEach items="@init(items)">
                <n:li>${each}</n:li>
            </forEach>
        </n:ul>
    </div>
    </zk>
    

    </zk>

If your prefix n mean zk 'native' namespace, then native HTML tags don't support data binding. See https://www.zkoss.org/wiki/ZKDeveloper%27sReference/UIPatterns/HTMLTags

You can replace it with:

  • with xhtml component set
  • set or <forEach>:

    <zk xmlns:n="native" xmlns:x="xhtml">
        <zscript>
        

    <zscript><![CDATA[ ListModelList items = new ListModelList(); items.add("a"); items.add("b"); ]]></zscript> <div apply="org.zkoss.bind.BindComposer"> <x:ul children="@load(items)"> <template name="children"> <n:li>${each}</n:li> </template> </x:ul>

    </x:ul>
            <!-- native with forEach   -->
         <n:ul>
             <forEach items="@init(items)">
                 <n:li>${each}</n:li>
             </forEach>
         </n:ul>
     </div>
    </zk>
    

    </zk>

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