Dialog with field validation

UI Components for JSF
Post Reply
bphalak
Posts: 34
Joined: 28 Jun 2011, 15:12

01 Jul 2011, 07:38

Hi,
I have dialog box with some input filed. This field marked as required. when i submit the dialog box using p:commandButton
So if i submit the dialog and close it via oncomplete the error message which is within the dialog is not displayed. How can i do it?


bphalak
Posts: 34
Joined: 28 Jun 2011, 15:12

02 Jul 2011, 09:28

how i can refresh or clear p:message on cancel button on dialog.

phyu
Posts: 11
Joined: 11 May 2011, 11:59

04 Jul 2011, 08:18

hi,
I had the same problem. how to clear the p:message when user click "Cancel" button.

Thanks,
Phyu

robert.m
Posts: 226
Joined: 07 Dec 2010, 22:52
Location: Salzburg/Austria

04 Jul 2011, 10:44

you don't need to clear it then the user clicks cancel, but you can update the message-component before opening. e.g.:

Code: Select all

<p:commandButton update="dialogForm:messages" oncomplete="dialog.show();" value="Open" />
or

Code: Select all

<p:commandButton update="dialogForm" oncomplete="dialog.show();" value="Open" />

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 45 guests