Thank you so much for your reply Peter.
Specifically helpful is the netiquette on posting.
>From now on, I will just include the important stuff.
I am still trying to wrap my head around bi-jection and scopes.
anonymous wrote :
| Also, you would probably have more luck if you actually outjected to the
SESSION scope, rather than the CONVERSATION scope (by default you it outjects
to the scope of it's parent).
|
Is it true that during injection, SEAM will lookup a named component in all
scopes based on the well known precedence (STATELESS, EVENT, PAGE, ...)?
I thought that by default, SEAM will outject to the same scope that it injected
from.
My thinking was that for every function call on my SFSB, SEAM would inject
currentCategory from the SESSION,
let it be changed by the SFSB and outject it back to the SESSION.
I want whatever Category the user selects to be reflected in the session.
How about this approach?
| ...
| @DataModel
| private List<Category> categories;
|
| @DataModelSelection
| private Category selectedCategory;
|
| ...
|
| @Create
| public String init()
| {
| if (currentCategory == null)
| {
| currentCategory = (Category)
em.createNamedQuery("Category.findRoot").getSingleResult();
| }
| return "success";
| }
|
| ...
|
| public void select()
| {
| currentCategory = selectedCategory;
| return;
| }
|
| ...
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053276#4053276
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053276
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user