zk中combobox控件实现即时刷新

出现及时数据
a)         页面

    
        
    


后台方法
/**
     * 及时刷新
     * @param ctype 搜索数据
     * @param event 当前键盘事件
     */
    @NotifyChange("lsdictype")
    @Command
    public void queryTypeExt(@BindingParam("type") String ctype,
 @ContextParam(ContextType.TRIGGER_EVENT)InputEvent event){
     List lsdictall = productService.getAll();//获取到数据
     lsdictype= new ArrayList();//封装搜索到数据
     for (Product product:lsdictall) {
           //判断是否具有相同数据
           if(product.getProductname().indexOf(ctype) > -1){                  //添加进list   
                lsdictype.add(product);
           }else{
              continue;
           }
       }
     comb.setOpen(true); //展开Combox
     }

转载于:https://my.oschina.net/u/1403237/blog/362751

你可能感兴趣的:(zk中combobox控件实现即时刷新)