Advertisement
Guest User

Untitled

a guest
Apr 28th, 2011
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.24 KB | None | 0 0
  1. DIALOG:
  2. ====================================
  3. <p:dialog
  4.         header="New Person"
  5.         widgetVar="newPersonDialog"
  6.         resizable="false" modal="true"
  7.         closeListener="#{newPersonBean.handleDialogClose}">
  8.  
  9.         <h:form id="newPersonForm">
  10.             <h:panelGrid columns="2">
  11.                 <h:outputText value="First name" />
  12.                 <h:panelGroup>
  13.                     <p:inputText value="#{newPersonBean.person.firstName}" id="firstname" size="30" required="true">
  14.                         <f:validateLength maximum="45"/>
  15.                     </p:inputText>
  16.                     <br/>
  17.                     <h:message for="firstname" />
  18.                 </h:panelGroup>
  19.  
  20.                 <h:outputText value="Other value" />
  21.                 <p:inputText value="#{newPersonBean.person.value}" required="false" />
  22.             </h:panelGrid>
  23.  
  24.             <!-- Is empty after updating the form and reopening the dialog while the inputText with the same value is not empty -->
  25.             <h:outputText value="#{newPersonBean.person.value}" />
  26.  
  27.             <p:commandButton value="Save"
  28.                 actionListener="#{newPersonBean.processPerson}"
  29.                 update="@form notifications"
  30.                 oncomplete="handleNewPersonDialogClose(xhr, status, args)"
  31.             />
  32.         </h:form>
  33. </p:dialog>
  34.  
  35.  
  36. COMMANDBUTTON
  37. ====================================
  38. <p:commandButton
  39.     value="New person"
  40.     oncomplete="newPersonDialog.show();"
  41.     update="newPersonForm"
  42. />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement