Reputation:
The modules of our web application shows a datatable in the center and the detail of the selected record on the right. Every time the user selects a record of the mastertable we update the detail page and show the details of the selected record. Now we have the following problem:
Is there any way to solve this problem? I've seen a pe:resetInput component from Primefaces extensions but this component needs a UICommand component to work. I need a solution that works if the user selects another entry of the mastertable.
Upvotes: 2
Views: 2750
Reputation: 1108632
You can use the ResetInputAjaxActionListener
of OmniFaces for this. Apart from being registered as a <f:actionListener>
, it can also be globally registered as a PhaseListener
.
ResetInputAjaxActionListener
showcase exampleResetInputAjaxActionListener
API documentationResetInputAjaxActionListener
source codeIf you intend to take it in your own hands, then you basically need to write code yourself which does basically the following things:
UIInput
components which are not been executed/processed by the ajax request.resetValue()
method on them.Upvotes: 2