小编San*_*ndy的帖子

验证错误后没有字段更新

我有一个primefaces对话框,我可以在其中创建或更新Employee.它会打开

    </p:dialog><p:dialog id="employeeEditDialog" header="#{msg.employeeEdit}"
        widgetVar="dlgEmployeeEdit" resizable="false">

        <p:ajax  event="close" listener="#{employeeView.cancel}"
              update=":showEmployees:liste" />

        <ui:include src="/content/Employee/ShowEmployeeContent.xhtml" />
    </p:dialog>
Run Code Online (Sandbox Code Playgroud)

这是Dialog Page

<h:form id="editContent">
<p:growl id="growl" showDetail="true" sticky="false" life="5000" />
<p:focus id="focusEdit" for="emSalutation" />
<h:panelGrid columns="2" id="contentGrid">
    <h:panelGrid columns="2" id="allgemein">                                                            <h:outputText value="#{msg.id}" />
        <h:outputText value="#{employeeView.newEmployee.id}" />

        <h:outputText value="#{msg.salutation}" />
        <p:selectOneMenu value="#{employeeView.newEmployee.salutation}"
            id="emSalutation">
            <f:selectItem itemLabel="" itemValue="" />
            <f:selectItems value="#{employeeView.salutations}" var="salutations"
                itemLabel="#{salutations.description}" itemValue="#{salutations}" />
        </p:selectOneMenu>

        <h:outputText value="#{msg.title}" />
        <p:inputText value="#{employeeView.newEmployee.title}" id="emTitle" />

        <h:outputText value="#{msg.name}" />
        <p:inputText value="#{employeeView.newEmployee.name}" id="emName"
            validatorMessage="#{msg.valName}" />

        <h:outputText value="#{msg.prename}" />
        <p:inputText value="#{employeeView.newEmployee.prename}"
            id="emPrename" /> …
Run Code Online (Sandbox Code Playgroud)

validation ajax user-interface primefaces jsf-2

5
推荐指数
1
解决办法
8026
查看次数

标签 统计

ajax ×1

jsf-2 ×1

primefaces ×1

user-interface ×1

validation ×1