-
Bug
-
Resolution: Fixed
-
Normal
-
6.0.1
-
this is my zul file
<window width="100%" apply="Test1Controller">
<combobox id="testCb" width="100px">
<attribute name="onCreate"><![CDATA[
List list2 = new ArrayList();
list2.add("David");
list2.add("Thomas");
list2.add("Steven");
ListModelList lm2 = new ListModelList(list2);
lm2.addSelection(lm2.get(0));
testCb.setModel(lm2);
]]></attribute>
</combobox>
</window>this is my controller
public class Test1Controller extends GenericForwardComposer{
protected Combobox testCb;
{ super.doAfterCompose(comp); }
public void doAfterCompose(Component comp) throws Exceptionpublic void onSelect$testCb()
{ System.out.println("triggered"); }}
this is my zul file <window width="100%" apply="Test1Controller"> <combobox id="testCb" width="100px"> <attribute name="onCreate"><![CDATA[ List list2 = new ArrayList(); list2.add("David"); list2.add("Thomas"); list2.add("Steven"); ListModelList lm2 = new ListModelList(list2); lm2.addSelection(lm2.get(0)); testCb.setModel(lm2); ]]></attribute> </combobox> </window> this is my controller public class Test1Controller extends GenericForwardComposer{ protected Combobox testCb; public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); } public void onSelect$testCb() { System.out.println("triggered"); } }
i created a combobox with selected value "David",
CASE1
Step 1,open the zul file,
Step 2, clear the combobox by using "backspace",
Expected : onSelect Event is triggered.
Actual : onSelected Event is not triggered
CASE2
Step 1,open the zul file,
Step 2, select "Thomas" for the combobox,
Step 3, clear the combobox by using "backspace",
Expected : onSelect Event is triggered.
Actual : onSelected Event is triggered.
CASE1 and CASE2 should have the same behaviour, but actully is not.