-
1. Re: Seam conversation propogation issue
wilczarz.wilczarz.gmail.com Apr 9, 2009 10:40 AM (in response to arshadm)Robert,
I'm not sure why you're ending conversation when switching to parent. Can't you pass the new id and reload categoryHome in a page action, inside the same conversation? Unless, you have your reasons not to do that. How do you start the conversation anyway? -
2. Re: Seam conversation propogation issue
arshadm Apr 9, 2009 11:58 AM (in response to arshadm)Hi Tomasz,
The problem is not with the categoryHome, I could just reload the instance as yiou say.
The problem is with the category, this is fetched via a factory definition of the following form
<factory name="category" value="#{categoryHome.instance}2 />
Because this scoped to the conversation, I can't get an upadted category without ending the current conversation and starting a new one (because seam will find a not null value and hence not re-evaluate the expression).
Maybe, I am doing this wrong. Perhaps, the category should be scoped to event. I was just following Dan Allens example, and really the end-conversation should work.
As for when I start the conversation, well that is done on the index page which lists the root categories (i.e. those without parents) when a specific root caegory is viewed. -
3. Re: Seam conversation propogation issue
wilczarz.wilczarz.gmail.com Apr 10, 2009 1:04 PM (in response to arshadm)You could set category to null and outject it. Facotry method would be triggered every time you hit the page:
<page view-id="/views/viewCategory.xhtml"> <param name="categoryId" value="#{categoryHome.id}" /> <action execute="#{categoryHome.find}" /> ... </page>
@In @Out Category category; @Override public Category find() super.find(); category = null; }
I'm nut sure which method it would best to override, but find() should do. It seems to me you need one long-running conversation, scoping category to event shouldn't be justified by factory not being recalled. Alternatively, you can give up the factory alias and use categotyHome.instance instead of category. In that case, all you need would be reloading instance on page action.