Clear form values in dialog
I have a form within a dialog. No matter what I type into the InputFields the values are always cached if I submit the form or not. I have researched and found a few solutions online but they don't seem to be working within a dialog. Has anyone been successful doing this and could explain to me the best approach to clearing out a form within a dialog?
One approach would be to use a method such as theBean.handleOpenDialogClicked to clear/initialize the dialogs data:
Code: Select all
<p:commandButton value="Open Dialog" action="#{theBean.handleOpenDialogClicked}"
update="theDialogContent" oncomplete="theDialogVar.show()"/>
<p:dialog id="theDialog" widgetVar="theDialogVar">
<p:outputPanel id="theDialogContent">
...
</p:outputPanel>
</p:dialog>
-
- Posts: 43
- Joined: 16 Nov 2010, 17:52
How could I do that in an example like this?
Thanks.
Thanks.
Eclipse Helios.
JSF-2.0 (Mojarra 2.1.0-b11).
GlassFish 3.1.
PrimeFaces 2.2.1
EclipseLink 2.1.x - EclipseLink 2.1.x.
PostgreSQL 9.0
JSF-2.0 (Mojarra 2.1.0-b11).
GlassFish 3.1.
PrimeFaces 2.2.1
EclipseLink 2.1.x - EclipseLink 2.1.x.
PostgreSQL 9.0
-
- Information
-
Who is online
Users browsing this forum: Google [Bot] and 19 guests