SelectOneRadio子表Ajax调用里面不工作 [英] SelectOneRadio inside subtable ajax call not working

查看:105
本文介绍了SelectOneRadio子表Ajax调用里面不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用primefaces 3.4.1,我试图用一个SelectOneRadio与AJAX调用一个的子表 但它不工作,阿贾克斯听者不叫

I'm using primefaces 3.4.1 and I'm trying to use a SelectOneRadio with an ajax call inside a subtable but it doesn't work, the ajax listener isn't called

<p:dataTable id="competenciesTable" var="competency" value="#{evaluationControl.currentEvaluation.evaluatedCompetencies}">
                <f:facet name="header">
                    <h:outputText value="#{gchmsg['global.competencies']}" />
                </f:facet>
                <p:subTable id="descriptorsTable" var="descriptor" value="#{competency.evaluationDescriptors}">
                    <f:facet name="header">
                        <h:outputText class="strong" value="#{competency.competency.name}" />
                    </f:facet>
                    <p:column>#{descriptor.descriptor.description}</p:column>
                    <p:column>
                        <p:selectOneRadio required="true" styleClass="calification_scale" id="descriptorCalification" value="#{descriptor.calification}" converter="calification">  
                            <f:selectItems value="#{competency.competency.calificationSchema.scales}" var="scale" itemLabel="#{scale.qualitativeValue}" itemDescription="#{scale.description}" itemValue="#{scale}" />
                            <p:ajax process="@this" listener="#{evaluationControl.handleRadioChange}" update=":evaluationForm:finalResultText, descriptorCalificationMsg" />
                        </p:selectOneRadio> 
                        <p:message id="descriptorCalificationMsg" for="descriptorCalification" display="icon" />
                    </p:column>
                </p:subTable>
            </p:dataTable>

的evaluationControl是一个SessionBean和方法

The evaluationControl is a SessionBean and the method is

public void handleRadioChange() {
    log.debug("Listener called");
}

帮助是AP preciated。

Help is appreciated.

推荐答案

太多的调试和测试,我终于找到了问题,之后,primefaces子表组件不放回值的辅助Bean本身,你必须处理整个数据表组件,所以我不得不删除 =需要真正的(避免验证错误)每个selectOneRadio并添加程序=competenciesTable 号码:AJAX

After too many debugging and tests I finally found the issue, the primefaces Subtable component doesn't put back the values to the Backing Bean for itself you must process the whole DataTable component, so I had to remove the required="true"(to avoid validation errors) for each selectOneRadio and add the process="competenciesTable" to the p:ajax

这篇关于SelectOneRadio子表Ajax调用里面不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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