You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by gr...@intellicare.com on 2005/11/30 01:00:47 UTC

method of managed bean is not hit unless it is in session scope..?

I have a Shale/MyFaces/tiles application which "almost" works. I have been 
staring at this so long I think I'm confusing myself even further.. Here's 
my problem (which may or may not be related to opening new windows using 
Javascript):

I have the foll. code in worklist/nextAssignment.jsp:

<h:commandLink action="#{worklist$nextAssignmentHome.startAssignment}" 
immediate="true">
        <h:outputText value="#{assignment.urlDisplay} />
</h:commandLink>

The backing bean corresponding to worklist$nextAssignmentHome is 
AssignmentBean. AssignmentBean.startAssignment() returns the String 
"twoWindows" which maps to /twoWindows.jsp which has Javascript so that a 
child window is opened. The idea is that when people have finished their 
work on the child window, they will (close it and) return to the parent 
window and click on a button/link which says they are done.

The backing bean for "twoWindows" is TwoWindowsBean.

Now in the "parent" window I have the following:
<h:commandLink action="#{twoWindows.activityDone}" value="Done" />

This is what I have noticed: if the managed bean "twoWindows" has session 
scope then things work. However if it has request scope then the 
activityDone method is not even hit. I am not sure why this is so..?

Thanks very much for your time,
Geeta