1

I have form inside dialog and I need to update it when user click button. Button is for showing new fields in this form. Fields are not rendered by default in dialog(render="#{gettForBoolean}").

When I am trying to use RequestContext.getCurrentInstance().update(formID); in backing bean and always all data are gone.

2 Answers2

1

Problem solved. Normal input is not saving to variable when writing, but it can be done by ajax: <p:ajax event="keyup" process="@widgetVar(inputID)"/>

0

The process attribute avoid you loosing data in AJAX calls:

<p:ajax update="formId" actionListener="#{bean.method}" />
Lorenzo Lerate
  • 3,552
  • 3
  • 26
  • 25
  • 1
    `process="@form"` is the default: https://stackoverflow.com/questions/25339056/understanding-primefaces-process-update-and-jsf-fajax-execute-render-attributes – Kukeltje Aug 03 '17 at 13:12
  • `` defaults to `@form` while `` and `` defaults to `@this` – sinclair May 08 '19 at 12:01