-
1. Re: @Factory problem
gavin.king Feb 11, 2006 7:09 PM (in response to emsa)Well, the combination of @In and @Factory is working in all the examples.
And I would not have expected @Factory to be called when you are calling an action method. Why would it be called? -
2. Re: @Factory problem
emsa Feb 12, 2006 1:23 PM (in response to emsa)"gavin.king@jboss.com" wrote:
Why would it be called?
Well - you tell me :-)
I did the following test - I added a @Factory in HotelBookingAction.java, like this:@Factory("hotels") @Begin(join=true) public String find() { ... }
This result in that the find() method is called twice when 'posting' for hotels from the main page in the booking app. The find() method is called once when entering the page without posting - this is what happens in my app as well ...
/Magnus -
3. Re: @Factory problem
emsa Feb 13, 2006 3:40 AM (in response to emsa)Gavin this cannot be a correct behaviour?
It seems like the factory method is called at the start of the cycle before the action method is called. Shouldn't the the factory method be called at the end of the cycle if the requested context-variable is still null after the action invokation?
/Magnus -
4. Re: @Factory problem
gavin.king Feb 13, 2006 11:20 AM (in response to emsa)I don't see why the @Factory method should be called at all. But then, you have not show us enough code for me to really be able to make that call...
-
5. Re: @Factory problem
emsa Feb 13, 2006 1:37 PM (in response to emsa)Is there anything special you'd like to see? Please note that adding @Factory as above in this thread create a call to the factory method.
-
6. Re: @Factory problem
gavin.king Feb 13, 2006 1:57 PM (in response to emsa)See this thread:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=77297