[Resolved] RF 4 - JSF 2.0 - ViewScoped problem
denebj Mar 28, 2011 12:56 PMGood afternoon
Like usual, I have an issue
My problem is that when I use @ViewScoped for some beans, the bean is still being re-initialized - And I am still in the same view.
It happens like that :
<h:form>
<rich:extendeddatatable id="test"
var="archive" ...>
...
<rich:column width="80px" >
<f:facet name="header">
<h:outputText value="Status" />
</f:facet>
<a4j:commandLink
id="uploadImgWarning"
execute="@this"
oncomplete="#{rich:component('modal')}.show()"
render="modal"
rendered="#{archive.status eq '2'}">
<h:graphicImage
onmouseover="this.src='/images/warningHover.png';"
onmouseout="this.src='/images/warning.png';"
url="/images/warning.png"
style="border:0px" />
<f:setPropertyActionListener
value="#{archive}"
target="#{bean.selectedArchive}" />
</a4j:commandLink>
</rich:column>
<rich:popupPanel
id="modal"
modal="true"
width="350"">
<f:facet name="header">
<h:outputText value="Modal" />
</f:facet>
<h:outputText
id="idInput"
value="#{bean.selectedArchive.id}" />
<a4j:commandButton
id="ok"
value="Validate"
execute="modal"
action="#{bean.validate}">
<a4j:ajax
event="complete"
render="test"
oncomplete="#{rich:component('modal')}.hide();"/>
</a4j:commandButton>
</rich:popupPanel>
</h:form>
In my bean the <f:setPropertyActionListener> is working properly, the value is being set and the value is displayed in the pop up.
But when I am going into "#{bean.validate}", all the values of my bean have been re-initialized !!!
If I put the bean in session scope it is working :-/
With the RF 3.3.3 I had set the bean with keepAlive and it was in request mode and it was perfectly working :-/
Any idea ?
Thank you very much !!!