Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
2.1.7
-
None
-
None
-
None
-
Ubuntu 12.04
Description
Given a view scoped bean:
@ManagedBean
@ViewScoped
public class Bean implements Serializable {
@PostConstruct
public void pc()
}
and a simple form:
<h:form>
<h:commandLink value="update">
<f:ajax render="label"/>
</h:commandLink>
<h:outputText id="label" value="#
"/>
</h:form>
Repeatable hitting on "update" button makes the value of label change:
com.denisk.test.Bean@5b62a166
com.denisk.test.Bean@27afca98
com.denisk.test.Bean@3a93ea5f
PostConstruct is fired only once though.
I know that there is plenty of ViewScoped-related havoc in JSF2, which is described in
http://java.net/jira/browse/JAVASERVERFACES-1492
and related JSF spec issue (which will be fixed in spec v. 2.2):
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-787
But current defect seems to be MyFaces-specific since on Mojarra 2.1.8 this works just fine