-
1. Re: Suggestions on Scope
gavin.king Mar 13, 2006 6:02 PM (in response to emsa)Your CONTINUOUS_PAGE context is just an ordinary conversation with client-side state saving.
YOUR STATIC_CONVERSATION context is just a conversation that never gets ended.
I am -1 on both these things, they seem to complexify the model with very little added capability. -
2. Re: Suggestions on Scope
emsa Mar 14, 2006 3:51 AM (in response to emsa)1. yes you're right but since you cannot mix to have some conversational objects on the server while others are on the client this seems like an good idéa to me. Not important sice I can solve this with @In @Out.
2. Again true but when you start doing kill-all-conversations() will it be possible to kill all but the "top" conversation? Again not imortant but would help me in a few cases. -
3. Re: Suggestions on Scope
rdewell Mar 14, 2006 3:44 PM (in response to emsa)As long as we're on the topic, I could really use a scope that sits between Application and Session. I implemented a quasi-scope myself using an Application scoped bean + a Map, though it's not as clean as using a pure Seam scope.
This is a specific case I realize, but maybe it would be cool if we could have "custom scopes". These custom scopes of course would define their own ID to determine when and where they were active. Actually, I don't have a specific solution to implementing this in Seam -- just thinking out loud.
Ryan -
4. Re: Suggestions on Scope
newlukai Mar 15, 2006 3:20 AM (in response to emsa)I could really use a CONTINOUS scope, too. Right now I'm trying to do this by @In @Out. But it doesn't work. I've two fields annotated with @In @Out. These fields were injected by another component and if I make a request on this component, Seam tells me it couldn't inject those fields, because a value was needed. So I would be happy with a CONTINOUS scope assuring that variables in this scope are available over several requests.
-
5. Re: Suggestions on Scope
emsa Mar 15, 2006 3:50 AM (in response to emsa)Use @In(create=true) to have seam create it for you as needed.
-
6. Re: Suggestions on Scope
newlukai Mar 15, 2006 5:30 AM (in response to emsa)@emsa: "Specifies that a component should be instantiated if the context variable is null.". I want to keep the values of the fields. If I use @In(create=true) I don't get null any more, but the values are lost.
-
7. Re: Suggestions on Scope
newlukai Mar 15, 2006 5:41 AM (in response to emsa)The funny thing is, if I use @In(create=true) I get this:
In attribute requires value for component:
I wanna outject a field from Component A and inject it into Component B during a request. This works. From this time on, the injected field should keep its value during all the next requests. But because the value isn't in the context any more, Seam tries to inject null. So I've to use @In(required=false) to avoid the exception. But this way, Seam injects null, overwriting the existing value. To avoid this, I thought "Let's outject the field", and annotated it @Out. But it doesn't work. Seam furthermore tries to inject null. -
8. Re: Suggestions on Scope
gavin.king Mar 15, 2006 11:56 PM (in response to emsa)"rdewell" wrote:
As long as we're on the topic, I could really use a scope that sits between Application and Session. I implemented a quasi-scope myself using an Application scoped bean + a Map, though it's not as clean as using a pure Seam scope.
This is a specific case I realize, but maybe it would be cool if we could have "custom scopes". These custom scopes of course would define their own ID to determine when and where they were active. Actually, I don't have a specific solution to implementing this in Seam -- just thinking out loud.
A "custom scope" is just a namespace inside one of the "true" scopes. Any component is a custom scope.