-
1. Re: Suggest InterceptionType.ALWAYS as default.
gavin.king Oct 2, 2005 5:02 AM (in response to rdewell)Yes, I've decided to make this change (I was concerned about performance, but it's probably not a big deal).
But I've gotta wonder why you need injection during RENDER_RESPONSE. I never needed this in building the example apps. Are you running database queries while rendering the view?
The one case I know of for @Intercept(ALWAYS) is a non-facelets request (ie. a HTTP GET instead of POST), and in this case it is always needed.
But usually, you should be using facelets requests, I suppose. <h:commandLink/> instead of <a href/>. At least that was the impression I always got. -
2. Re: Suggest InterceptionType.ALWAYS as default.
rdewell Oct 2, 2005 9:00 PM (in response to rdewell)That's great to hear. IMHO it will ease the development of Seam applications.
I'm finding that in my own mileage, I need injection for render_response more often than not. Here are just two examples:
1) A bean with a boolean getter called: getHasMessages. This just returns true/false if FacesContext contains messages. Thus, it needs to be injected with FacesContext to be useful at all.
2) A bean with a boolean getter called: getIsAuthenticated. I'm using this in a view to hide some stuff that non authenticated users don't have access to. This bean requires another bean that actually manages the full authentication lifecycle for a User. In short, this example is just about high bean granularity.
I've got plenty more -- but I'm glad to hear that ALWAYS will become a default. FYI, kudos on Seam. Every once in a while you come across a technology that just "makes sense". Hibernate, EJB3, JSF, and now Seam all come to mind.
Ryan -
3. Re: Suggest InterceptionType.ALWAYS as default.
rdewell Oct 2, 2005 11:31 PM (in response to rdewell)Hopefully this fits in the current thread. A couple of other things I've finding to be "givens" on my injections:
@In(...., required=true, create=true)
This just seems more EJB'ish to me?
Ryan -
4. Re: Suggest InterceptionType.ALWAYS as default.
gavin.king Oct 2, 2005 11:37 PM (in response to rdewell)required=true is already the default.
I dont think create=true is a very safe default.