1
<p:column headerText="Speed">
            <p:cellEditor>
               <f:facet name="output"><h:outputText value="#{car.speed}" /></f:facet>
               <f:facet name="input"><p:inputText value="#{car.speed}" style="width:100%" label="Year"/></f:facet>
           </p:cellEditor>
       </p:column>

       <p:column style="width:32px">
           <p:rowEditor />
       </p:column>

   </p:dataTable>
 <center>
            <h:commandButton src="add.xhtml" update=":centerForm:centerContent" target=":centerForm:centerContent" value="Create New Record" class="btn btn-success btnSpace" />
    </center>

This is my button through which i want to call add.xhtml in the center layout of index.xhtml

<p:layoutUnit position="center" name="center" id="center">
                <h:form id="centerForm">
                    <p:panel id="centerContent" name="centerContent">
                        <ui:include src="#{dynamicBean.url}"></ui:include>
                    </p:panel>
                </h:form>
            </p:layoutUnit>

This is my index.xhtml center layout tag. Can anyone help please?

  • 1
    1: You don't 'call a page', 2: it is just one page on the client and for the JSF viewroot 3: update is for PrimeFaces buttons, not basic JSF buttons, those have `render` 4: PrimeFaces commandButton has built-in ajax, Basic JSF one does not – Kukeltje Jul 27 '18 at 11:56
  • 1
    Possible duplicate of [Understanding PrimeFaces process/update and JSF f:ajax execute/render attributes](https://stackoverflow.com/questions/25339056/understanding-primefaces-process-update-and-jsf-fajax-execute-render-attributes) – Kukeltje Jul 27 '18 at 11:57

0 Answers0