Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DIALOG:
- ====================================
- <p:dialog
- header="New Person"
- widgetVar="newPersonDialog"
- resizable="false" modal="true"
- closeListener="#{newPersonBean.handleDialogClose}">
- <h:form id="newPersonForm">
- <h:panelGrid columns="2">
- <h:outputText value="First name" />
- <h:panelGroup>
- <p:inputText value="#{newPersonBean.person.firstName}" id="firstname" size="30" required="true">
- <f:validateLength maximum="45"/>
- </p:inputText>
- <br/>
- <h:message for="firstname" />
- </h:panelGroup>
- <h:outputText value="Other value" />
- <p:inputText value="#{newPersonBean.person.value}" required="false" />
- </h:panelGrid>
- <!-- Is empty after updating the form and reopening the dialog while the inputText with the same value is not empty -->
- <h:outputText value="#{newPersonBean.person.value}" />
- <p:commandButton value="Save"
- actionListener="#{newPersonBean.processPerson}"
- update="@form notifications"
- oncomplete="handleNewPersonDialogClose(xhr, status, args)"
- />
- </h:form>
- </p:dialog>
- COMMANDBUTTON
- ====================================
- <p:commandButton
- value="New person"
- oncomplete="newPersonDialog.show();"
- update="newPersonForm"
- />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement