-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
The main issue is about the EL resolver to evaluate the expression for about 100,000 times. 100 * 100 * 5 (@converter parameters) * 2 (ReferenceBinding for converter parameters)
For example,
<zk xmlns:x="xhtml"> <zscript><![CDATA[ public class MyVM { public void setChildren(List children) {} public List getChildren() { int size = 100; List s = new ArrayList(size); for (int i = 0; i < size; i++) s.add(i); return s; } public void setConcatConverter(Converter c) {} public Converter getConcatConverter() { return new ConcatConverter();} class ConcatConverter implements Converter { public Object coerceToUi(Object val, Component comp, BindContext ctx) { return ""; } public Object coerceToBean(Object val, Component comp, BindContext ctx) { return null; } } } ]]></zscript> <div id="bind" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('MyVM')"> <x:table id="host" border="1" children="@load(vm.children)"> <template name="children" var="r"> <x:tr children="@load(vm.children)"> <template name="children" var="gb"> <x:td> <label style='@load(vm.children) @converter(vm.concatConverter,x=r,y=gb,z=gb, format="background:rgb(%s,%s,%s)")' /> </x:td> </template> </x:tr> </template> </x:table> </div> </zk>