jquery - PrimeFaces ajax update of form inside p:dialog is not working -
I'm not able to update an ajax of hour: form inside p: dialog Here's how my XHTML has been designed. I do not have nested form.
The men page The management is compatible with XHTML -> ManPage Bean.
Searchwiki Similar management bean with XHTML -> SearchWebban
MainPage.xhtml
& lt; Ui: structure template = '/ template / layout.xHML' & gt; & Lt; Ui: Define name = 'content' & gt; & Lt; H: form prependId = 'false' id = 'dataForm' & gt; ... & lt; H: output text value = "# {home page .name}" /> & Lt; P: command button value = "search" onclick = "display content content; show ();" / & Gt; ... and & lt; / H: form & gt; & Lt; P: Dialog ID = "Dialog search" view "Widget" = "Dialog search" model = "true" append teobody = "true" dynamic = "true" & gt; & Lt; Ui: Include src = "searchView.xhtml" /> & Lt; / P: Dialog & gt; & Lt; / Ui: defined & gt; & Lt; / Ui: Composition & gt;
searchView.xhtml
& lt; H: form prependId = 'false' id = 'sv_dataform' & gt; ... & lt; P: "sv_messagesId" "errorMessages" for messages id = = closeable = "true" /> & Lt; P: inputText value = "# {searchViewBean.lastName}" id = "lastName" required = "true" /> & Lt; P: Command Button Value = "Search" verb = "# {searchViewBean.search}" Update = ": sv_dataForm" ajax = "true" /> & Lt; H: outputText value = '# {searchViewBean.numberOfCustomers}' / & gt; ... and & lt; / H: form & gt;
When a button is clicked on MainPage.xhtml, it displays a P: dialogue. P: Includes SearchView.xhtml in the dialogSearchView.xhtml contains a form when a simple search is performed on the last name, the numbers are determined. When I debug the code I can search in searchViewBean value in numberOfCustomers but P: dialog is not updating. But if I have a verification error, then I can see P: displaying messages. I do not know why: dialogue is being updated if I am doing something wrong, please tell me.
Thank you.
is illegal in nesting forms when you include seachView.xhtml then you do something like this Are:
& lt; H: form prependId = 'false' id = 'dataForm' & gt; ..... & lt; H: form prependId = 'false' id = 'sv_dataform' & gt; ..... and & lt; / H: form & gt; & Lt; / H: form & gt;
You should put P: dialogue element outside the main element: form.
Ajax = true of the button in the default command, so you do not need to define it.
Comments
Post a Comment