The conversation is propagated, but also ended immediately. The 
TestNonConversationalPage is rendered with count = 3, but this count is 
lost on the next increment (rendering of the page is a different request as 
clicking the increment link).

On Friday 10 January 2014 08:38:24 John Sarman wrote:
> Emond,
> I understand that.  However whether the Conversation is began 
manually or
> automatically should not dictate how the Conversation is propagated.  In
> the  TestConversationalPage starts the conversation via the
> ConversationalComponent interface then increments the counter.  The 
counter
> increment does not call setResponsePage().  When the next Link is 
clicked,
>  setResponsePage(new TestNonConversationalPage()); is fired.  This is a
> non-bookmarkable page, but the Conversation is not propagated.  This 
means
> that the ConversationPropagation is not working.
> 
> Thanks,
> John
> 
> 
> 
> On Fri, Jan 10, 2014 at 3:02 AM, Emond Papegaaij 
<[email protected]
> > wrote:
> > 
> > Hi John,
> > 
> > You are mixing two concepts here: conversation propagation and 
auto-
> > conversations. These two operate separately. Auto-conversations are
> > started _and_ ended automatically. You can use this, for example, on a
> > page where a conversational component is added and later removed
> > again. The conversation will stay active for as long as the component 
is
> > on
> > the page. If you wish to take control of an auto-conversation, you 
need to
> > inject AutoConversation and call setAutomatic(false).
> > 
> > Best regards,
> > Emond
> > 
> > On Thursday 09 January 2014 15:34:30 John Sarman wrote:
> > > Emond,
> > > I finally had some time to go over the cdi rewrite and I on the first
> > 
> > test
> > 
> > > I was reviewing I do not think the Conversation propagation is 
working
> > > correctly.  In the test Class ConversationPropagatorTest, the first
> > > test testAutoConversationNonBookmarkable uses the Wicket
> > > page TestConversationalPage which extends 
ConversationalComponent
> > 
> > to notify
> > 
> > > the framework the conversations should be managed automatically.  
The
> > > initial for loop iterates through the increment clicks to verify
> > > the TestConversationBean counter is incremented properly.  This 
works
> > 
> > fine.
> > 
> > >  Then the test clicks the next link, which goes to a non 
bookmarkable
> > 
> > page
> > 
> > > that also injects the TestConversationBean.  At this point
> > > the TestConversationBean current count should be equal to the last
> > > increment from the first page, but it is 0. The increment link is
> > > clicked
> > > on that page and the count is incremented to 1, and every call after
> > 
> > that
> > 
> > > the TestConversationBean is reinjected but not part of the 
conversation
> > 
> > so
> > 
> > > the count is 0 then 1 and the test asserts (1) not the continuous
> > > incremented count.  I realize that the test passes, but I think the 
test
> > 
> > on
> > 
> > > the second for loop should read
> > > 
> > >                         tester.clickLink("increment");
> > > 
> > > tester.assertCount(i);  // The value of i continues to increment from
> > > the
> > > first for loop.
> > > I have not went through the code yet, but it seems that as soon as 
next
> > > page that does not implement the ConversationalComponent 
interface,
> > > although it is a nonbookmarkable page, the conversation is not
> > 
> > propagated.
> > 
> > > My understanding of how Igor built 1.0 was that the
> > > 
> > >  ConversationalComponent could be used to automate the code to
> > 
> > begin a
> > 
> > > Conversation if one was not already active and the propagation was 
a
> > 
> > method
> > 
> > > to continue the conversation based on the way a page was created.
> > 
> > That is
> > 
> > > if a conversation was active and the next page in the pipeline was a
> > > nonbookmarkable page then the conversation was propagated
> > 
> > regardless if it
> > 
> > > implemented ConversationalComponent (assuming CDIConfiguration
> > 
> > propagation
> > 
> > > was set to NONBOOKMARKABLE) .  I will continue to debug through 
the

Reply via email to