[ https://issues.apache.org/jira/browse/MYFACES-4642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17789174#comment-17789174 ]
Thomas Andraschko edited comment on MYFACES-4642 at 11/23/23 3:31 PM: ---------------------------------------------------------------------- Could you just try to add something like this {code:java} if (viewScopeId == null) { viewScopeId = Integer.toString(new Random().nextInt()); } {code} in ViewScopeProxyMap#ln 75 if yes, we could fix it easily in old branches but we would need quite a big refactoring in this whole area in our master was (Author: tandraschko): Could you just try to add something like this ```if (viewScopeId == null) { viewScopeId = Integer.toString(new Random().nextInt()); }` in ViewScopeProxyMap#ln 75 if yes, we could fix it easily in old branches but we would need quite a big refactoring in this whole area in our master > ViewScope doesn't work in non CDI environment > --------------------------------------------- > > Key: MYFACES-4642 > URL: https://issues.apache.org/jira/browse/MYFACES-4642 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 4.0.1 > Reporter: Carsten Dimmek > Priority: Major > Attachments: demo.zip, myfaces-viewmap.zip > > > We use Spring Boot with Joinfaces and Myfaces. I noticed that the ViewScope > is not working properly. The controller is re-instantiated with every Ajax > request on the page. I have tried to analyze the problem and suspect it is > because no viewScopeId is created in > org.apache.myfaces.view.ViewScopeProxyMap for the non-CDI case. -- This message was sent by Atlassian Jira (v8.20.10#820010)