i am using jsf 2.2 primefaces 5. I have a composite component with an input text field and a dialog. And i have reset button with resetInput. Inside composite component:
<cc:implementation>
<h:inputText value="#{cc.attrs.inputValue}" id="selectCountry" size="5" />
<p:dialog header="Select" modal="true" appendTo="@(body)" dynamic="true" >
<p:dataGrid var="item" columns="4" ...
And reset button :
<p:commandButton value="Reset" immediate="true">
<p:resetInput target="@form" />
</p:commandButton>
The problem is when i press the reset button the form, the composite component, the dialog box and the datagrid inside the dialog are reloaded. But i wish only to reset the input fields inside the form and the input field composite component.
I think i can do by moving dialog outside of the form in the component tree. How can i move it? Or any other solution to this problem?
- Note : I tried to use parent attribute for dialog(eg. parent="@body"). But everything i write to parent gives exception.