I have a SearchAction class (ScopeType.CONVERSATION) which has its properties bound to the
user interface (for such things as "name" and "key words" to search
on) and passes these off to a class called Finder that actually does the search and
returns the results to SearchAction to pass back to the client. Essentially, when I call
searchAction.setName(), for example, that calls finder.setName() with the same value. An
instance of Finder is injected into SearchAction with @In(create = true).
Here is where things get interesting--at least to me. I am running a SeamTest where I am
testing the operation of SearchAction between between faces requests, and it is using a
mock implementation of Finder. In the first request, searchAction.setName() is called,
which as mentioned calls finder.setName() with the same given value. The funny thing is
that in the next request, finder.getName(), which once had the given value, is now null.
I have tried applying @Out to the Finder instance within SearchAction to no avail. I
applied ScopeType.CONVERSATION to the mock Finder class to no avail.
The question then is how I maintain the state between faces requests for this Finder
object injected into SearchAction.
Please let me know if I need to be more clear. Thanks for any insight.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115863#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...