-
1. Re: Conversation start with @Factory ?
gavin.king Dec 1, 2005 9:59 AM (in response to lcoetzee)What you are trying to do is conceptually correct and should work.
What does the seam log say is happening?
What happens if you debug into the call to findAllNapContent()? Does ConversationInterceptor start a long-running conversation? -
2. Re: Conversation start with @Factory ?
lcoetzee Dec 1, 2005 10:18 AM (in response to lcoetzee)Unfortunately I am doing this the hard way (haven't tried to setup an interactive environment for debugging). (Another topic I assume .. configure eclipse with JbossIDE and Seam.)
The log file says that a long running conversation has been started. It loads all the things it is suppose to. Displays the page with the correctly populated stuff. On submit if fails however. The log file says Seam did not find a conversation.[org.jboss.seam.interceptors.ConversationInterceptor] Beginning long-running conversation . . 2005-12-01 17:11:46,417 DEBUG [org.jboss.seam.core.Manager] No stored conversation
L -
3. Re: Conversation start with @Factory ?
gavin.king Dec 1, 2005 10:20 AM (in response to lcoetzee)So .... this seems to be unrelated to the @Factory annotation?
-
4. Re: Conversation start with @Factory ?
lcoetzee Dec 1, 2005 10:27 AM (in response to lcoetzee)Correct. The @Factory does what it is suppose to. Load initial stuff. It seems as if the @Begin starts the conversation. But somewhere the conversation gets lost.
Without the @Factory, the conversation behavior is as expected (initiating the process through a a button submit).
Does the @Factory method gets executed everytime Seam sees the variable in the JSF ? (@Factory("variable") with maybe ..renedered="#{variable} occuring a few times in the page).
L -
5. Re: Conversation start with @Factory ?
theute Dec 1, 2005 10:29 AM (in response to lcoetzee)"lcoetzee" wrote:
(haven't tried to setup an interactive environment for debugging). (Another topic I assume .. configure eclipse with JbossIDE and Seam.)
That topic is covered in the Wiki:
http://wiki.jboss.org/wiki/Wiki.jsp?page=UseJBossEclipseIDEToDoJBossSeamsBookingExample
and in a flash movie to show step by step:
http://www.jboss.com/products/seam/EclipseCVS.html -
6. Re: Conversation start with @Factory ?
gavin.king Dec 1, 2005 10:38 AM (in response to lcoetzee)"lcoetzee" wrote:
Does the @Factory method gets executed everytime Seam sees the variable in the JSF ? (@Factory("variable") with maybe ..renedered="#{variable} occuring a few times in the page).
It only gets called when the context variable is null. -
7. Re: Conversation start with @Factory ?
gavin.king Dec 1, 2005 10:39 AM (in response to lcoetzee)Post me the whole seam log of the GET request.
-
8. Re: Conversation start with @Factory ?
lcoetzee Dec 1, 2005 10:48 AM (in response to lcoetzee)Email or through Forum ? (Quite a large file)
In the meantime I tried the email to your jboss account name.
L -
9. Re: Conversation start with @Factory ?
lcoetzee Dec 1, 2005 10:52 AM (in response to lcoetzee)Thomas,
That topic is covered in the Wiki: http://wiki.jboss.org/wiki/Wiki.jsp?page=UseJBossEclipseIDEToDoJBossSeamsBookingExample
Excellent. Just the bandwidth fight to get the JBossIDE into Africa. Painful ;-)
L -
10. Re: Conversation start with @Factory ?
lcoetzee Dec 1, 2005 12:11 PM (in response to lcoetzee)Hi,
I have managed to step through my app (and the Seam code). It seems as if the @Factory stuff gets done (loads all my content). Then it starts the conversation (@Begin) (at least while stepping through the code the endOrBeginLongRunningConversation in ConversationInterceptor.java gets executed after all the stuff was loaded).
I assume that it starts a new conversation at that point, thus throwing away the stuff that inserted in the Conversation context ? But it can't be... as then my JSF won't be showing the loaded content. Confusing...
I am on very thin ice here (not really having looked into the Seam code before).
L -
11. Re: Conversation start with @Factory ?
gavin.king Dec 1, 2005 1:52 PM (in response to lcoetzee)Nope, @Begin methods don't really start conversations. Rather, they promote a short-running conversation to long-running mode. :-)
ie. keeping the existing context around. -
12. Re: Conversation start with @Factory ?
lcoetzee Dec 2, 2005 3:08 AM (in response to lcoetzee)I wrote a small test using both @Factory and @Begin. Works perfectly. Important though to label the @Factory("variable") to have a conversation scope (@Out(scope=ScopeType.Conversation) private String variable;).
Unfortunately my original usage is still broken. But at least I know that it is suppose to work !
L -
13. Re: Conversation start with @Factory ?
gavin.king Dec 2, 2005 6:17 AM (in response to lcoetzee)Please keep us informed.
-
14. Re: Conversation start with @Factory ?
landels Dec 9, 2005 5:00 AM (in response to lcoetzee)Hi lcoetzee,
Did you get it working? We have similar problem right now. And I was wondering about the return value of your @Factory and @Begin method. The docu says:@Begin: Specifies that a long-running conversation begins when this method returns a non-null outcome without exception.
... and your method is void, right? Has this been changed? In the special case of @Factory and @Begin? On the other hand -> which outcome should be returned here...
cu,