JCatapult uses this little trick to discover new FreeMarker objects
that you can use in the Views. You extend our AbstractControl class
and then register it in a module like that. When JCatapult sets up the
view, it looks in the Injector for everything that is a Control and
then adds those to the FreeMarker context. Looks like this:
public class MyModule extends AbstractModule {
public void bind() {
bind(MyCoolControl.class);
}
}
Makes it a lot simpler to setup tags and functions than JSP. I'm
thinking of also allowing Action classes to reveal functions and
provide tags as well. Make it even easier...
-bp
On Aug 10, 2009, at 10:48 PM, Ken wrote:
>
> I 'm reading Guice's source code
> when i saw this code
> ""
>
> bind(ManagedServletPipeline.class);
>
> ""
>
> what happen just binding a type ?
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---