0

我有 p:selectOneRadio 包含两个选择,根据该选择,我必须显示和隐藏一些其他组件,这些组件呈现为 p:selectOneRadio 选定值。所以我必须在 p:selectOneRadio 的单击事件中更新这些组件正是我所做的,但没有任何更新,似乎我错过了一些东西,我正在使用 Primefaces 3.6。这是我的代码。

<tr>
    <td>
        <p:outputLabel id="newOriginalValDataSource" value="Original Value Datasource" rendered="#{addConditionBean.newCondition.conditionComplexityLevel eq 1 }" />
    </td>
    <td>
        <p:selectOneRadio id="newOriginalValueDSRadio" style="border: white;" value="#{addConditionBean.newCondition.usedParamId}" rendered="#{addConditionBean.newCondition.conditionComplexityLevel eq 1 }">

            <f:selectItems value="#{addConditionBean.usedParameterTypes}" var="used" itemLabel="#{used.lookupValue}" itemValue="#{used.lookupId}"/>
            <p:ajax global="false" process="@this" update="newParameterNameDDLLabel newOriginalValueParameterLbl newParameterNameDDL newOriginalValueFormulaChoice" event="click"/>
        </p:selectOneRadio>
    </td>
</tr>
<tr>
    <td>
        <p:outputLabel rendered="#{addConditionBean.newCondition.conditionComplexityLevel eq 1 and (addConditionBean.newCondition.usedParamId eq 1 or addConditionBean.newCondition.usedParamId eq null)}" id="newParameterNameDDLLabel" value="Original Value Parameter :"/>
        <p:outputLabel rendered="#{addConditionBean.newCondition.conditionComplexityLevel eq 1 and addConditionBean.newCondition.usedParamId eq 2}" id="newOriginalValueParameterLbl" value="Original Value Formula :" />

    </td>
    <td>
        <h:selectOneMenu id="newParameterNameDDL" rendered="#{addConditionBean.newCondition.conditionComplexityLevel eq 1 and (addConditionBean.newCondition.usedParamId eq 1 or addConditionBean.newCondition.usedParamId eq null)}"  value="#{addConditionBean.newCondition.conditionParameterId}">
            <f:selectItem itemLabel="--Select Parameter--" itemValue="#{addConditionBean.defaultDropDownValue}"/>
            <f:selectItems value="#{wFDesignBean.parameterDef}" var="conditionParamName" itemValue="#{conditionParamName.parameter_ID}" itemLabel="#{conditionParamName.parameter_Name}"/>
            <p:ajax global="false" event="change"/>
        </h:selectOneMenu>

        <h:selectOneMenu id="newOriginalValueFormulaChoice" value="#{addConditionBean.newCondition.formulaId}" rendered="#{addConditionBean.newCondition.conditionComplexityLevel eq 1 and addConditionBean.newCondition.usedParamId eq 2}">
            <f:selectItem itemLabel="--Select Fromula--" itemValue="#{addConditionBean.defaultDropDownValue}"/>
            <f:selectItems value="#{addConditionBean.lkFormulas}" var="formulalk" itemValue="#{formulalk.lookupId}" itemLabel="#{formulalk.lookupValue}"/>
            <p:ajax global="false" event="change" />
        </h:selectOneMenu>
    </td>
</tr>
4

0 回答 0