2013-05-20 2 views
1

내 JSF 백킹 빈은 ViewScoped입니다.
다른 조치 수신기를 추가 했으므로보기가 변경되지 않은 경우에도 bean은 다시 작성됩니다.`<f : actionListener>`가 추가 된 후`ViewScoped` 빈이 다시 생성됩니까?

@ManagedBean (name="EncryptionBean") 
@ViewScoped 
public class EncryptionBean extends ClientBeanBase implements Serializable, ActionListener 
{ 
    . 
    . 
    . 

    @Override 
    public void processAction(ActionEvent arg0) throws AbortProcessingException 
    { 
     refresh(); 
    } 
} 

HTML

<p:commandButton value="OK" type="submit" actionListener="#{FileSelectBean.actionOk}" oncomplete="dlgFileSelect.hide();" update=":formEncryptionDialog,:formTranscodingPage:streamInfoId" styleClass="buttonOK">   
    <f:actionListener type="com.company.rews.webclient.beans.EncryptionBean" /> 
</p:commandButton> 

내가 OK 버튼을 누르면, 나는 그것이 그러나이 다시 만들어 (생성자가 호출) 도착, ViewScoped이기 때문에 콩이 다시 생성되는 것을 기대하지 않을 것이다 나는 느슨한 일부 변수. <f:actionListener> 행을 삭제하면 OK에 다시 표시되지 않습니다.

어떻게해야합니까?

답변