[seam-dev] Expanding Seam Render to support additional template APIs as a source for Seam Mail and Reports

Jason Porter lightguard.jp at gmail.com
Fri Aug 12 18:48:52 EDT 2011


Good points Dan, I'd forgotten about that.

On Fri, Aug 12, 2011 at 16:34, Dan Allen <dan.j.allen at gmail.com> wrote:

> The qualifier approach is more in the spirit of the CDI design.
>
> Plus, when you use qualifiers, you have a built-in mechanism for selection
> via the Instance SPI.
>
> @Inject @Any Instance<TemplateCompiler> compilerSelector;
>
> compilerSelector.select(new VelocityLiteral() {}).get();
>
> In this way, we are building on the flexibility that CDI affords.
>
> -Dan
>
> On Wed, Aug 10, 2011 at 14:49, Jason Porter <lightguard.jp at gmail.com>wrote:
>
>> Both actually accomplish the same thing, only difference is you don't need
>> the extra qualifier class.
>>
>> Sent from my iPhone
>>
>> On Aug 10, 2011, at 12:34, George Gastaldi <gegastaldi at gmail.com> wrote:
>>
>> > That would be better, but I think that we may use qualifiers for that,
>> > just as is being used in Seam Reports:
>> >
>> > Like:
>> >
>> > @Inject @Velocity
>> > TemplateCompiler compiler;
>> >
>> > and then just:
>> > compiler.compile("tpl/file.tpl");
>> >
>> >
>> >
>> > 2011/8/10 Lincoln Baxter, III <lincolnbaxter at gmail.com>:
>> >> I think in Render it's a matter of refactoring the TemplateCompiler
>> >> interface to support a TemplatingProvider service, for which you choose
>> >> implementation with:
>> >>
>> >> @Inject
>> >> private TemplateCompiler<VelocityProvider> compiler;
>> >>
>> >> or
>> >>
>> >> @Inject
>> >> private TemplateCompiler compiler;
>> >>
>> >> Then
>> >>
>> >> compiler.compile(VelocityProvider.class, "tpl/file.tpl")
>> >>
>> >> or
>> >>
>> >> @Inject
>> >> private TemplateCompiler compiler;
>> >>
>> >> @Inject
>> >> private VelocityProvider provider;
>> >>
>> >> Then
>> >>
>> >> compiler.compile(provider, "tpl/file.tpl");
>> >>
>> >> etc...
>> >>
>> >> George, does this fit your needs?
>> >>
>> >> ~Lincoln
>> >>
>> >>
>> >>
>> >> On Mon, Aug 8, 2011 at 6:57 PM, Jason Porter <lightguard.jp at gmail.com>
>> >> wrote:
>> >>>
>> >>> I haven't had time to look at this yet. Perhaps you (Lincoln and
>> George)
>> >>> can start things off with what you think would need to change for each
>> of
>> >>> the modules.
>> >>>
>> >>> On Mon, Aug 8, 2011 at 16:50, George Gastaldi <gegastaldi at gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> Any evolution so far ? It would be nice to get that ready before the
>> >>>> Beta release.
>> >>>>
>> >>>> Regards,
>> >>>>
>> >>>> George
>> >>>>
>> >>>> 2011/8/3 Jason Porter <lightguard.jp at gmail.com>:
>> >>>>> I need to spend some time looking at the APIs for these (Render,
>> >>>>> Reports and
>> >>>>> Mail) and see what needs to happen. I really like the idea of Seam
>> >>>>> Render
>> >>>>> being our pluggable template solution .
>> >>>>>
>> >>>>> On Wed, Aug 3, 2011 at 15:38, Lincoln Baxter, III
>> >>>>> <lincolnbaxter at gmail.com>
>> >>>>> wrote:
>> >>>>>>
>> >>>>>> Thoughts?
>> >>>>>>
>> >>>>>> --
>> >>>>>> Lincoln Baxter, III
>> >>>>>> http://ocpsoft.com
>> >>>>>> http://scrumshark.com
>> >>>>>> "Keep it Simple"
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> seam-dev mailing list
>> >>>>>> seam-dev at lists.jboss.org
>> >>>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> --
>> >>>>> Jason Porter
>> >>>>> http://lightguard-jp.blogspot.com
>> >>>>> http://twitter.com/lightguardjp
>> >>>>>
>> >>>>> Software Engineer
>> >>>>> Open Source Advocate
>> >>>>> Author of Seam Catch - Next Generation Java Exception Handling
>> >>>>>
>> >>>>> PGP key id: 926CCFF5
>> >>>>> PGP key available at: keyserver.net, pgp.mit.edu
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> seam-dev mailing list
>> >>>>> seam-dev at lists.jboss.org
>> >>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>> >>>>>
>> >>>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Jason Porter
>> >>> http://lightguard-jp.blogspot.com
>> >>> http://twitter.com/lightguardjp
>> >>>
>> >>> Software Engineer
>> >>> Open Source Advocate
>> >>> Author of Seam Catch - Next Generation Java Exception Handling
>> >>>
>> >>> PGP key id: 926CCFF5
>> >>> PGP key available at: keyserver.net, pgp.mit.edu
>> >>
>> >>
>> >>
>> >> --
>> >> Lincoln Baxter, III
>> >> http://ocpsoft.com
>> >> http://scrumshark.com
>> >> "Keep it Simple"
>> >>
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>
>
>
> --
> Dan Allen
> Principal Software Engineer, Red Hat | Author of Seam in Action
> Registered Linux User #231597
>
> http://www.google.com/profiles/dan.j.allen#about
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
>
>


-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20110812/1f883140/attachment-0001.html 


More information about the seam-dev mailing list