如何使用Ajax部分提交特定的jsf组件? [英] How to partial submit with ajax a specific jsf component?
本文介绍了如何使用Ajax部分提交特定的jsf组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的东西:
<h:form id="form">
<p:dialog id="profileDialogId">
<p:panelGrid id="categoryFunctions" columns="2" >
<p:outputPanel id="profileFunctions" >
<p:panelGrid columns="1" >
<p:scrollPanel scrollMode="buttons" mode="native" >
<p:outputLabel for="functionList" value="Functions:" />
<p:selectManyCheckbox id="functionList" value="#{profileConf.selectedCategoryDto.selectedFunctions}" layout="pageDirection" >
<f:selectItems value="#{profileConf.selectedCategoryDto.functionList}" var="function" itemLabel="#{function.functionDesc}" itemValue="#{function.functionCod}" />
</p:selectManyCheckbox>
</p:scrollPanel>
</p:panelGrid>
</p:outputPanel>
</p:panelGrid>
</p:dialog>
</h:form>
我只想用ajax发送带有"functionsList" id的组件.
and I want to send with ajax only the component with "functionsList" id.
我已经尝试过
<f:ajax event="valueChange" execute=":form:functionList" listener="#{profileConf.functionsForCategory}" update=":form:functionList"/>
但是当我在functionsForCategory方法中放置一个断点时,selectedFunctions属性为null. 任何帮助将不胜感激.谢谢!
but when I put a breakpoint in functionsForCategory method selectedFunctions property is null. Any help will be appreciated. Thanks!
推荐答案
尝试一下
<p:ajax event="valueChange" listener="#{profileConf.functionsForCategory}" process="@this" update=":form:functionList"/>
这篇关于如何使用Ajax部分提交特定的jsf组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文