commandButton中的操作不会被触发

时间:2017-09-07 06:42:34

标签: jsf primefaces

commandButton中的操作不会被触发。单击按钮时不调用方法“addNewLanguageText()”。我尝试更改过程和更新参数但没有任何改变。我希望使用此按钮单击更新languageTextPanel。我错过了什么吗?

<ui:define name="centerColumn">
    <h:form id="notificationMessageEditForm">

        <p:fieldset id="basicsPanel" styleClass="fieldSet">
            <h:panelGroup id="languageTextTemplatePanelGroup">
                <table width="100%">
                    <tr>
                        <td align="left">
                        </td>
                        <td align="right">
                            <table>
                                <tr>
                                    <td>
                                        <p:selectOneMenu id="fooNameId"
                                                         value="#{notificationGroupSupport.selectedLanguageKey}">
                                            <f:selectItems var="item" value="#{referenceData.languages}"
                                                           itemLabel="#{item.description}"
                                                           itemValue="#{item.languageKey}"/>
                                        </p:selectOneMenu>
                                    </td>
                                    <td>
                                        <p:commandButton
                                                value="Click"
                                                action="#{notificationGroupSupport.addNewLanguageText()}"
                                                process="languageTextTemplatePanel"
                                                update="languageTextPanel" ajax="false" icon="#{icons.plus}"/>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <h:panelGroup id="languageTextPanel">
                    <ui:repeat var="text"
                               value="#{notificationGroupSupport.messageTexts}">
                        <p:panel header="#{text.language.description}">
                            <h:inputTextarea id="notificationMessageText"
                                             styleClass="#{text.language.languageKey}Textarea"
                                             style="width:99%; height:100px;"
                                             label="#{text.language.description}" value="#{text.value}"/>

                            <div>
                                <ui:repeat var="cons"
                                           value="#{notificationGroupSupport.constants}">
                                    <p:commandButton value="#{cons.replaceString}" type="button"
                                                     styleClass="#{text.language.languageKey}Button"/>
                                </ui:repeat>
                            </div>
                            <p:commandButton actionListener="#{notificationGroupSupport.removeMessageText(text)}"
                                             ajax="false"
                                             update="languageTextPanel"
                                             value="Delete Message"
                                             icon="#{icons.delete}"
                                             rendered="#{auth.hasRole('ROLE_CATALOG_DATA_DELETE')}">
                            </p:commandButton>
                        </p:panel>
                        <p:spacer height="8"/>
                    </ui:repeat>
                </h:panelGroup>
            </h:panelGroup>
        </p:fieldset>
    </h:form>

0 个答案:

没有答案