Hi Craig,

We’ve had this discussion regarding the $ separator on this list not long ago.

 

I am aware of and have been using the spring resolver, however there is a namespace collision between spring beans and jsf beans—the resolver will prefer spring beans of the same id (assuming the spring delegating resolver is first). There is no way to discriminate between them without ugly global renames or naming policies that may be cumbersome to the business. Admittedly (in the spring docs), the delegating resolver is quite a rudimentary integration solution.

 

Tapestry 4 supports a “service protocol” where injection id’s prefixed with a service name will delegate to different resolver (i.e.: “spring:myBean” as opposed to “myBean”). The naming convention is also elegant. Anyway it is just a suggestion—if spring and other (seam?) integration compatibility is going to be a consideration for jsf 1.3(?).

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig McClanahan


There is no special support for "namespaces" in JSF 1.2 (the most recent finalized spec), but nothing really stops you from simulating this.  I tend to use "$" instead of ":" as a separator, because it is a legal character in identifiers so you don't have to go quoting things.

 

Or the more adventurous of us who want to try (or need) and delegate some DI to spring or hivemind. ;)


I don't know of any Hivemind integration, but it's already there for Spring.  In 1.2.5 they started offering a custom variable resolver that can use Spring to create singletons or a new bean on each request -- and it happens transparently to your usage of value binding and method binding expressions.  In Spring 2, the story is even better since they've added the concept of scopes, so you can tell Spring to create a new session scoped bean.  From the JSF perspective, you just use expressions like you always have ... it's just that Spring will be used instead of managed beans to construct and return the instances.

Craig

 

This correspondence is for the named persons only.
It may contain confidential or privileged information or both.
No confidentiality or privilege is waived or lost by any mis transmission.
If you receive this correspondence in error please delete it from your system immediately and notify the sender.
You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient.
Any opinions expressed in this message are those of the individual sender except where the sender expressly,
and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.

Reply via email to