-
1. Re: Wich contexts can be accesed directly by JSF ?
matt.drees Aug 20, 2007 7:28 PM (in response to yacho)You should be able to access all scopes from your view.
-
2. Re: Wich contexts can be accesed directly by JSF ?
yacho Aug 20, 2007 7:38 PM (in response to yacho)so if i can acces all scopes from the view why should i use @out ?
-
3. Re: Wich contexts can be accesed directly by JSF ?
yacho Aug 20, 2007 7:45 PM (in response to yacho)I mean if i Can acces all scopied variables without @out annotation when should i use it ?
When i want to put in context some local or bean instance variable ? -
4. Re: Wich contexts can be accesed directly by JSF ?
yacho Aug 20, 2007 7:53 PM (in response to yacho)Sorry i cant find edit button - heres the quick example :
BeanA
BeanB
BeanA outjects variable named myVar for example - myVar gets outjected to session scope.
Bean B invokes some view - since myVar is Session scoped i can use it directly in my view without needing to outjecting it in BeanB ? -
5. Re: Wich contexts can be accesed directly by JSF ?
pmuir Aug 21, 2007 5:02 AM (in response to yacho)yes
-
6. Re: Wich contexts can be accesed directly by JSF ?
yacho Aug 21, 2007 9:10 AM (in response to yacho)okey - one last question - i have form with 2 fields named A and B - form gets submitted. In wich scope do the A and B variables reside ?
-
7. Re: Wich contexts can be accesed directly by JSF ?
fhh Aug 21, 2007 9:54 AM (in response to yacho)In whatever scope you declared them to be.
Just for clarification: You really do have to use @Out if the scope of your action bean and your form backing bean differ, e.g. your action bean is stateless and you want your data to do to page context.
Regards
Felix -
8. Re: Wich contexts can be accesed directly by JSF ?
yacho Aug 21, 2007 9:59 AM (in response to yacho)OK but i do not define scopie of fields in my JSF view (i cant see any example where scope is defined in template)
i Mean from wich scope do the data fravel between JSF templlate and ActionBean ? -
9. Re: Wich contexts can be accesed directly by JSF ?
yacho Aug 21, 2007 10:18 AM (in response to yacho)"fhh" wrote:
In whatever scope you declared them to be.
Just for clarification: You really do have to use @Out if the scope of your action bean and your form backing bean differ, e.g. your action bean is stateless and you want your data to do to page context.
Regards
Felix
Okay another thing i dont understand :P
One of seam fundamentals is that i dont need to write backing beans (since as i understand it) Action Beans are seam backing beans for JSF templates.
So you say that i need to use @Out only when i want my variable in a different scope than ActionBean that the variable is in ? -
10. Re: Wich contexts can be accesed directly by JSF ?
yacho Aug 21, 2007 10:35 AM (in response to yacho)OK Sorry ive read the tutorial once again (thats probably the 20th time ai read it) and now i catch everything - forgot that the @scope defines default scope.
One last thing.
Suppose i have a form wich is quite complex.
Form is bound to two entities. A and B.
Before i persist the A and B beans id like to manipulate their values - can i do that using getters and setters like in normal POJO ?
Also after persisting A and B i want to create object C (
from C entity bean) manipulate its values and persist it - so i need new C object - can i Instantinate it like normal POJO ? (e.g C cObj = new C();) -
11. Re: Wich contexts can be accesed directly by JSF ?
matt.drees Aug 21, 2007 10:47 AM (in response to yacho)Sure, for both questions. JPA Entity beans *are* pojos. This is not really a Seam question. You may find the hibernate entity manager docs useful.
http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/objectstate.html