java zk mvvm clear datebox and do @command -
i'm trying make filter datebox. when no date inserted, not added query. when date inserted, counts date on.
this works good, stupid little problem have have button clearing date. or @command(...) , set mine queryobject.date null, witch renew mine search correct date still in datebox. (i don't want use autowired datebox)
or searchbegindate.settext(null) , text gone mine list doesn't refresh.
what option have both?
edit : sample code of project.
<datebox id="searchbegindate" value="@bind(vm.loggingvmqueryobject.begindate)" onok="@command('filter')" /> <button onclick="searchbegindate.settext(null);vm.loggingvmqueryobject.setbegindate(null)" image="/img/delete.png" />
this whiping of datebox list isn't refreshed.
<datebox id="searchbegindate" value="@bind(vm.loggingvmqueryobject.begindate)" onok="@command('filter')" /> <button onclick="@command('clearbegindate')" image="/img/delete.png" />
this refresh list correct, in code loggingvmqueryobject.begindate set null datebox still showing last date set.
greetz chill.
you show me code, show solution ;)
in zul
<datebox id="searchbegindate" value="@bind(vm.loggingvmqueryobject.begindate)" onok="@command('filter')" /> <button onclick="@command('clearbegindate', date = searchbegindate)" image="/img/delete.png" />
in java
public void clearbegindate(@bindingparam("date")datebox date){ //your other code here date.settext(null); }
Comments
Post a Comment