You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Martin Reurings <ma...@windgazer.nl> on 2007/10/15 06:39:49 UTC
T5 Order in which modules load
Hey Guys,
I've quite happily been working on creating my own module to enhance
Tapestry5. This module is a generic patch so that I can more rapidly
create new WebApps based on T5. I've added some components and a service
and all seemed to be working quite well. Now I've run into a problem though.
In a recent project we had created our own ValidationDecorator and
pushed it into the environment, thus overriding T5's default validator.
Now that I've been creating my own plugable module I've been trying to
move this solution in there, but it seems that my plugable module runs
before T5 adds it's Services. As a result, the T5 default is now
overruling my own ValidationDecorator :(
Anybody here have a clue how I can change the order in which AppModules
load?!?
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 Order in which modules load
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Sorry, "order" in the message title diverted my attention.
You want to override DefaultValidationDelegateCommand using Alias:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html
That documentation is a bit thin, but if you can search the list for more.
HLS:
"You supply a new implementation with a new id, and contribute to the Alias
service configuration. This will allow injections based on type to prefer
your implementation over the built-in one."
Cheers,
Nick.
Martin Reurings wrote:
> Hmm, actually the order of resolving all such configurations is the part
> where I'm having problems. You see, this piece of code:
> public void contributePageRenderInitializer(
> final OrderedConfiguration<PageRenderCommand> configuration,
> final ThreadLocale threadLocale,
> final SymbolSource symbolSource,
> final AssetSource assetSource) {
>
> //Displacing the default Validation-decorator with our own clean
> interpretation.
> configuration.add("TempTapestryToolsValidationDelegate",
> new CustomValidationDecoratorCommand());
> }
>
> When it's running in my webapps' AppModule will override T5's default,
> in doing so it gets rid of the error-icons and does a few things that I
> find really usefull.
> When that piece of code runs in my pluggable module (for lack of better
> wording) it seems to run that piece of code before Tapestrys' equivalent
> and T5s' default will override my custom code.
> I just have a clue if I can override that, or where I would even start
> to look :)
>
> Thanx for the tips though, at least I don't appear to be going crazy ;)
>
> Martin
>
> Nick Westgate wrote:
>> Doesn't an ordered configuration help you there?
>> http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html#Ordered%20List
>>
>>
>> The order of module processing shouldn't be important since the final
>> ordering is imposed by resolving all such configurations after loading.
>>
>> (Sorry, I haven't explored this area much.)
>>
>> Cheers,
>> Nick.
>>
>>
>> Martin Reurings wrote:
>>> Hey Guys,
>>>
>>> I've quite happily been working on creating my own module to enhance
>>> Tapestry5. This module is a generic patch so that I can more rapidly
>>> create new WebApps based on T5. I've added some components and a
>>> service and all seemed to be working quite well. Now I've run into a
>>> problem though.
>>> In a recent project we had created our own ValidationDecorator and
>>> pushed it into the environment, thus overriding T5's default
>>> validator. Now that I've been creating my own plugable module I've
>>> been trying to move this solution in there, but it seems that my
>>> plugable module runs before T5 adds it's Services. As a result, the
>>> T5 default is now overruling my own ValidationDecorator :(
>>>
>>> Anybody here have a clue how I can change the order in which
>>> AppModules load?!?
>>>
>>> Regards,
>>>
>>> Martin
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 Order in which modules load
Posted by Martin Reurings <ma...@windgazer.nl>.
Hmm, actually the order of resolving all such configurations is the part
where I'm having problems. You see, this piece of code:
public void contributePageRenderInitializer(
final OrderedConfiguration<PageRenderCommand> configuration,
final ThreadLocale threadLocale,
final SymbolSource symbolSource,
final AssetSource assetSource) {
//Displacing the default Validation-decorator with our own clean
interpretation.
configuration.add("TempTapestryToolsValidationDelegate",
new CustomValidationDecoratorCommand());
}
When it's running in my webapps' AppModule will override T5's default,
in doing so it gets rid of the error-icons and does a few things that I
find really usefull.
When that piece of code runs in my pluggable module (for lack of better
wording) it seems to run that piece of code before Tapestrys' equivalent
and T5s' default will override my custom code.
I just have a clue if I can override that, or where I would even start
to look :)
Thanx for the tips though, at least I don't appear to be going crazy ;)
Martin
Nick Westgate wrote:
> Doesn't an ordered configuration help you there?
> http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html#Ordered%20List
>
>
> The order of module processing shouldn't be important since the final
> ordering is imposed by resolving all such configurations after loading.
>
> (Sorry, I haven't explored this area much.)
>
> Cheers,
> Nick.
>
>
> Martin Reurings wrote:
>> Hey Guys,
>>
>> I've quite happily been working on creating my own module to enhance
>> Tapestry5. This module is a generic patch so that I can more rapidly
>> create new WebApps based on T5. I've added some components and a
>> service and all seemed to be working quite well. Now I've run into a
>> problem though.
>> In a recent project we had created our own ValidationDecorator and
>> pushed it into the environment, thus overriding T5's default
>> validator. Now that I've been creating my own plugable module I've
>> been trying to move this solution in there, but it seems that my
>> plugable module runs before T5 adds it's Services. As a result, the
>> T5 default is now overruling my own ValidationDecorator :(
>>
>> Anybody here have a clue how I can change the order in which
>> AppModules load?!?
>>
>> Regards,
>>
>> Martin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 Order in which modules load
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Doesn't an ordered configuration help you there?
http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html#Ordered%20List
The order of module processing shouldn't be important since the final
ordering is imposed by resolving all such configurations after loading.
(Sorry, I haven't explored this area much.)
Cheers,
Nick.
Martin Reurings wrote:
> Hey Guys,
>
> I've quite happily been working on creating my own module to enhance
> Tapestry5. This module is a generic patch so that I can more rapidly
> create new WebApps based on T5. I've added some components and a service
> and all seemed to be working quite well. Now I've run into a problem
> though.
> In a recent project we had created our own ValidationDecorator and
> pushed it into the environment, thus overriding T5's default validator.
> Now that I've been creating my own plugable module I've been trying to
> move this solution in there, but it seems that my plugable module runs
> before T5 adds it's Services. As a result, the T5 default is now
> overruling my own ValidationDecorator :(
>
> Anybody here have a clue how I can change the order in which AppModules
> load?!?
>
> Regards,
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org