You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Steve Eynon <st...@alienfactory.co.uk> on 2011/10/19 05:10:44 UTC

Re: Ordering Constraints for @Startup

I mentioned this for until ordering constraints are added to @Startup,
it can not be a complete replacement for contributing to
RegistryStartup (which I assume was the point).

And as there is already an @Order annotation for use with decorators,
I thought it'd be handy if it also worked with @Startup.

I only ask because I really like @Startup and wish it to reach it's
full potential!

Steve.

On 29 September 2011 22:41, Steve Eynon <st...@alienfactory.co.uk> wrote:
> I like using the @Startup annotation in my Modules for it makes my
> code a lot more succinct than contributing Runnables to the
> RegistryStartup service.
>
> But when I need to order the startup method I am forced to use the
> later for @Startup does not seem to take ordering constraints.
>
> For instance, I would like to replace:
>
> public static void
> contributeRegistryStartup(OrderedConfiguration<Runnable>
> configuration) {
>    configuration.add("loadTraingData", new Runnable() {
>        public void run() {
>            trainer.load();
>        }
>    }, "after:ConfigSetup");
> }
>
> with
>
> @Startup("after:ConfigSetup")
> public static loadTrainingData() {
>    trainer.load();
> }
>
> or even
>
> @Startup @Order("after:ConfigSetup")
> public static loadTrainingData() {
>    trainer.load();
> }
>
> Any thoughts?
>
> Steve.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org