电话号码:对close事件selectCheckboxMenu AJAX行为的名字 [英] p:selectCheckboxMenu ajax behavior name for on close event

查看:255
本文介绍了电话号码:对close事件selectCheckboxMenu AJAX行为的名字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要触发的 P动作:selectCheckboxMenu ,当用户完成他的选择(S)(收盘价)。在数据表需要与新选定的列进行更新(完成)。

我找不到一个适合的 P的菜单。The默认AJAX行为,这个主体作用的AJAX行为的事件名称:selectCheckboxMenu 更新的数据表每一个选择而烦恼,我和用户,我只需要在号码:。selectCheckboxMenu 来触发动作,当它被关闭

下面是我的code:

 <电话号码:selectCheckboxMenu ID =colser
                      scrollHeight属性=100
                      filterMatchMode =包含
                      过滤器=真
                      标签=Colonnes酒店
                      值=#{datatableBean.selectedstateOptions}>
   < F:selectItems的值=#{datatableBean.columner}
                  VAR =清单
                  itemLabel =#{list.listname}
                  itemValue =#{list.headername}/>
   <电话号码:AJAX事件=close_event_name_here
            更新=:窗口1:tabexam
            听众=#{datatableBean.updateCols()}/>
< / P:selectCheckboxMenu>
 

解决方案

您可以尝试的P onhide属性:selectCheckboxMenu。

 <电话号码:selectCheckboxMenu ID =colser
                  scrollHeight属性=100
                  filterMatchMode =包含
                  过滤器=真
                  标签=Colonnes酒店
                  值=#{datatableBean.selectedstateOptions}
                  onHide =executeOnOnhide();>
            < F:selectItems的值=#{datatableBean.columner}
              VAR =清单
              itemLabel =#{list.listname}
              itemValue =#{list.headername}/>
      < / P:selectCheckboxMenu>

      <电话号码:remoteCommand名=executeOnOnhide
        更新=:窗口1:tabexam过程=@这种形式:colser
        行动=#{datatableBean.updateCols()}/>
 

供您参考
为primefaces的链接,文档指南 http://primefaces.org/documentation.html

希望这有助于

I need to trigger action on the p:selectCheckboxMenu when user finishes his selection(s) (on close). the datatable need to be updated with new selected columns(done).

I couldn't find the event name of the ajax behavior that suits this principal role of a Menu.the default ajax behavior of the p:selectCheckboxMenu updates the datatable on every selection which is annoying for me and the user, i need only the p:selectCheckboxMenu to trigger action when it is closed.

Here is my code :

<p:selectCheckboxMenu id="colser"
                      scrollHeight="100"
                      filterMatchMode="contains"
                      filter="true"
                      label="Colonnes"
                      value="#{datatableBean.selectedstateOptions}">  
   <f:selectItems value="#{datatableBean.columner}"
                  var="list"
                  itemLabel="#{list.listname}" 
                  itemValue="#{list.headername}"/>  
   <p:ajax  event="close_event_name_here"
            update=":form1:tabexam"
            listener="#{datatableBean.updateCols()}"/>
</p:selectCheckboxMenu>

解决方案

You can try onhide attribute of the p:selectCheckboxMenu.

      <p:selectCheckboxMenu id="colser"
                  scrollHeight="100"
                  filterMatchMode="contains"
                  filter="true"
                  label="Colonnes"
                  value="#{datatableBean.selectedstateOptions}"
                  onHide="executeOnOnhide();>  
            <f:selectItems value="#{datatableBean.columner}"
              var="list"
              itemLabel="#{list.listname}" 
              itemValue="#{list.headername}"/>  
      </p:selectCheckboxMenu>  

      <p:remoteCommand  name="executeOnOnhide"
        update=":form1:tabexam" process="@this form:colser"
        action="#{datatableBean.updateCols()}"/>  

The link for the documentation guide for primefaces for your reference
http://primefaces.org/documentation.html

Hope this helps

这篇关于电话号码:对close事件selectCheckboxMenu AJAX行为的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆