I am using the immediate="true" attribute to reset the object behind the form without triggering validation. This works but it does not rerender the form. Is this normal? I would expect that the render attributes keeps working when setting immediate="true".

I have a page with a simple backing bean which is annotated with @ViewScoped. I have simple form with a couple of fields which is backed by a POJO through said backing bean. One of the properties of this POJO is annotated with @Max(value=9). I use a rich:message component to show an error message next to the field when a number greater than 9 is entered.

{code:java}
@Controller

@ViewScoped

public class PojoBean {

private Pojo newPojo = new Pojo();

// ... getters and setters ...

public void saveNewPojo() {

// persist

}

public void resetNewPojo() {

newPojo = new Pojo();

}

}

{code}

{code:java}

public class Pojo {

@Max(value=9)

private int property;

// ...getters and setters...

}

{code}

When I enter the number 20 in the text field and hit the tab key, then the error message pops up next to the field. This is ok. After that I hit my cancel button. This button is bound to a reset action. It looks like this in the xhtml code:

The problem is that when I hit the reset It does not rerender my form. It reset the pojo correctly and the error message disappears like it should thanks to the immediate propery, but the number 20 remains in the text field. Even when there is no validation error, the number remains in the text field. When I remove the immediate property, the value for the property is removed from the text field. So my conclusion from this is that the rerender doesn't occur.