Friday 16 December 2011

PrimeFaces p:button vs HTML button (or: why does p:button re-GETs the page?)

// NOT GET; NOT POST
<button onclick="foo()">My button</button>

function updateAllCells() {
 ...
 //returns nothing
}
//CAUSES GET; page is redisplayed
<p:button onclick="foo();" value="My button" />
// NOT GET; NOT POST
<p:button onclick="foo();return false;" value="My button" />

No comments:

Post a Comment