Updating and presenting Ajax using h: commandButton

How to update a div and make a partial view using <h:commandButton>, I used <p:commandButton>to partially send, setting the ajax attribute to true and the update: statusBlock attribute, where id is <h:panelGroup>statusBlock. I am having problems designing with <p:commandButton>, so I can’t use it, so I need to use <h:commandButton>.

+5
source share
2 answers

This must be done by inserting <f:ajax>.

In effects

<p:commandButton ... process="@form" update=":statusBlock" />

does the same as

<h:commandButton ...>
    <f:ajax execute="@form" render=":statusBlock" />
</h:commandButton>

, PrimeFaces , PrimeFaces @form /, <f:ajax> - @this, execute="@form" process PrimeFaces.

. :

+20

f: ajax, .

<h:form id="myForm">       
  <h:commandButton value="Push Me">
     <f:ajax execute="myForm" render="statusBlock" />
  </h:commandButton>
  <h:panelGroup id="statusBlock">
  </h:panelGroup> 
</h:form>
+3

All Articles