|
As of October 27th, please open all new issues in the Red Hat Customer Portal . |
|
interesting idea! Using JAXRS controllers with things like Jersey works like this. It makes total sense to support IoC in the same way too.
Initially I was thinking the namespace would basically just map to an import; so the "org.acme.MyTags" just basically does... import org.acme.MyTags._
but maybe we need to support instantiation of a tag library as a variable; then instantiate that. So something like this... val myTagLib = injector.createInstance(classOf[org.acme.MyTags])
import myTagLib._
Maybe we need a slight different namespace URI to differentiate against the IoC created instance versus the straight import. maybe something like this... <html xmlns:foo="import:org.acme.MyTags._"> ...
where the import is basically in the namespace URI so that you could exclude some imports or rename methods etc. Then we have explicit injection of a type... <html xmlns:foo="inject:com.acme.Foo"> ...
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Or maybe the uri scheme could be pluggable, for example "guice:org.acme.MyTags" and I could extend Scalate with a Guice provider. Or Spring etc.