Okay, so I've tried the override through ModuleManager, but seems like it
don't work in case it's part of stack?

@Contribute(ModuleManager.class)
public static void overrideCoreModules(MappedConfiguration<String,
JavaScriptModuleConfiguration> configuration,
 Resource forms =
assetSource.resourceForPath("/META-INF/modules/t5-custom/core/forms.coffee");
configuration.override("t5/core/forms", new
JavaScriptModuleConfiguration(forms));
}

org.apache.tapestry5.ioc.internal.OperationException: Override for key
t5/core/forms  (at
com.movellas.web.drama.services.AppModule.overrideCoreModules(MappedConfiguration,
AssetSource) (at AppModule.java:614)) does not match an existing key.

Perhaps missing something obvious?

/magnus


On Sat, Jan 25, 2014 at 12:04 AM, Magnus Kvalheim <mag...@kvalheim.eu>wrote:

> Thanks Howard, that's good tip :-)
>
> Not verified, but think that will solve current issue I'm having with with
> 5.4 beta. Ajax radio submit,
> https://issues.apache.org/jira/browse/TAP5-2231
>
> Have been unsuccessful in approach to override forms module and tried
> unsuccessfully approaches like this:
> @Contribute(JavaScriptStack.class)
> @Core
> public static void
> setupCoreJavaScriptStack(OrderedConfiguration<StackExtension>
> configuration) {
>  configuration.override("t5/core/forms", new
> StackExtension(StackExtensionType.MODULE, "t5-custom/core/forms"));
> }
>
> previously forms was not part of stack - so the fix by Thiago to customize
> requirejs helped me patch it in the past that way
>
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/5-4-25-Ajax-submit-with-Radiogroup-submits-all-values-td5724905.html#a5724916
>
> I have verified that Dimitris suggestion with naming works, but agree that
> the ModuleManager approach seems like the best solution now.
>
>
> A bit curious though - is a stack extension override supposed to work?
> Seems like stack module name (override) in core keep name 
> 't5-custom/core/forms',
> while other modules keep referencing 't5/core/forms'. Possibly just a
> documentation issue..?
>
> /magnus
>
>
> On Fri, Jan 24, 2014 at 7:05 PM, Howard Lewis Ship <hls...@gmail.com>wrote:
>
>> Also, you can contribute overrides of modules to the ModuleManager
>> service;
>> this allows you to provide any old resource, including a patched version
>> of
>> a core module.  This is less error-prone that having two different files
>> on
>> the classpath with the same path and name ... you aren't beholden to a
>> specific search order for the jars and files on the classpath.
>>
>> On my projects, I often have a T5PatchModule that contains all such
>> contributions and overrides.
>>
>>
>> On Fri, Jan 24, 2014 at 12:01 AM, Peter Hvass <p.hv...@albourne.com>
>> wrote:
>>
>> > Awesome tip! Thanks Dimitris! :D Even simpler!
>> >
>> > ----- Original Message -----
>> >
>> > From: "Dimitris Zenios" <dimitris.zen...@gmail.com>
>> > To: "Tapestry users" <users@tapestry.apache.org>
>> > Sent: Thursday, January 23, 2014 11:43:58 PM
>> > Subject: Re: [5.4-beta-2] Two JavaScript Errors - Quick Fixes
>> >
>> > Until this is fixed a quick tip.
>> >
>> > You dont have to create custom jars.just create a new js file with the
>> same
>> > filename as the one you want to fix and place it on your meta-inf using
>> the
>> > same folder structure as the originall
>> >
>> > Dimitris Zenios
>> > On 23 Jan 2014 10:26, "Peter Hvass" <p.hv...@albourne.com> wrote:
>> >
>> > > Hi Thiago,
>> > >
>> > > Many, many thanks indeed! Have a great weekend!
>> > >
>> > > Peter
>> > >
>> > > ----- Original Message -----
>> > >
>> > > From: "Thiago H de Paula Figueiredo" <thiag...@gmail.com>
>> > > To: "Tapestry users" <users@tapestry.apache.org>
>> > > Sent: Wednesday, January 22, 2014 6:33:37 PM
>> > > Subject: Re: [5.4-beta-2] Two JavaScript Errors - Quick Fixes
>> > >
>> > > On Wed, 22 Jan 2014 06:40:19 -0200, Peter Hvass <p.hv...@albourne.com
>> >
>> > > wrote:
>> > >
>> > > > Hi all,
>> > >
>> > > Hi!
>> > >
>> > > > Through the alphas and now the betas we've been running with custom
>> > > > tapestry-core JARs given
>> > > > two JavaScript issues; one which cripples AjaxFormLoop and the other
>> > > > causing pageinit.js errors
>> > > > and thus interrupting script execution on IE8.
>> > > >
>> > > > These are both super quick fixes and so was wondering if I could ask
>> > > > that they be included in the
>> > > > upcoming beta-3?
>> > > >
>> > > > Both on the JIRA;
>> > > > https://issues.apache.org/jira/browse/TAP5-2230?filter=-2
>> > > > https://issues.apache.org/jira/browse/TAP5-2272?filter=-2
>> > >
>> > > I'll try to apply the fixes this week.
>> > >
>> > > --
>> > > Thiago H. de Paula Figueiredo
>> > > Tapestry, Java and Hibernate consultant and developer
>> > > http://machina.com.br
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> > > For additional commands, e-mail: users-h...@tapestry.apache.org
>> > >
>> > >
>> > >
>> >
>> >
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>
>

Reply via email to