In my code, the postreplace function has this signature:
function checkWrongFields(element, markup, closure)
but when it gets called, element is always null.
I got this example from the CurrencyTrader sample in Netbeans, the sample itself is built on top of "old" components (<ui:> instead of <webuijsf:>) so I don't know it it's my mistake or a technology issue.