Sorry I can't be of more help Rich - we've migrated over to T5.2.0 so I
don't have a pre T5.2.0 environment I can test this under at the moment.
You're right though it shouldn't be difficult at all - I've found a lot of
these minor things have me banging my head on the desk until someone chips
in with the solution, before having the 'ahhh' moment. Hopefully someone
here can steer you straight - what exact version of Tapestry are you using?
Regards,
Jim.
-----Original Message-----
From: Rich [mailto:rich...@moremagic.com]
Sent: 22 July 2010 20:51
To: Tapestry users
Subject: Re: blackbird.js and IE breaking fixed CSS background image
No luck still =/
I tried it many ways:
decorateClientInfrastructure with contributeAliasOverride with bind:
java.lang.IllegalStateException: Construction of service
'AliasOverrides' has failed due to recursion: the service depends on
itself in some way. Please check
org.apache.tapestry5.internal.services.AliasManagerImpl(Logger,
Collection) (at AliasManagerImpl.java:32) via
org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
TapestryModule.java:251) for references to another service that is
itself dependent on service 'AliasOverrides'.
decorateClientInfrastructure without contributeAliasOverride without bind:
java.lang.IllegalStateException: Construction of service
'ClientInfrastructure' has failed due to recursion: the service depends
on itself in some way. Please check
org.apache.tapestry5.internal.services.ClientInfrastructureImpl(SymbolSource
,
AssetSource, ThreadLocale) (at ClientInfrastructureImpl.java:64) via
org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
TapestryModule.java:251) for references to another service that is
itself dependent on service 'ClientInfrastructure'.
decorateClientInfrastructure without contributeAliasOverride with bind:
java.lang.RuntimeException: Service interface
org.apache.tapestry5.services.ClientInfrastructure is matched by 2
services: ClientInfrastructure, MyClientInfrastructure. Automatic
dependency resolution requires that exactly one service implement the
interface.
buildMyClientInfrastructure with contributeAlias:
java.lang.IllegalStateException: Construction of service 'Alias' has
failed due to recursion: the service depends on itself in some way.
Please check
org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
AliasManager, Collection) (at TapestryModule.java:325) for references to
another service that is itself dependent on service 'Alias'.
buildMyClientInfrastructure without contributeAlias:
java.lang.RuntimeException: Service interface
org.apache.tapestry5.services.ClientInfrastructure is matched by 2
services: ClientInfrastructure, MyClientInfrastructure. Automatic
dependency resolution requires that exactly one service implement the
interface.
buildMyClientInfrastructure with contributeAliasOverrides:
java.lang.IllegalStateException: Construction of service
'AliasOverrides' has failed due to recursion: the service depends on
itself in some way. Please check
org.apache.tapestry5.internal.services.AliasManagerImpl(Logger,
Collection) (at AliasManagerImpl.java:32) via
org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
TapestryModule.java:251) for references to another service that is
itself dependent on service 'AliasOverrides'.
Errors were pretty similar, and this was about as many permutations as I
could imagine. Can anyone shed some light towards a reasonable way to
decorate the ClientInfrastructure so I can swap the blackbird.js? I find
it hard to believe decoration is this complicated.
Thanks,
Rich
Jim O'Callaghan wrote:
Rich,
I'm on T5.2.0 so the code has been updated accordingly - looking through
my
file history, I have:
public static MyClientInfrastructure
buildMyClientInfrastructure(@InjectService("ClientInfrastructure")
ClientInfrastructure original, @InjectService("AssetSource") AssetSource
assetSource)
{
return new MyClientInfrastructure(original,
assetSource);
}
public static void contributeAlias(
@InjectService("MyClientInfrastructure")
ClientInfrastructure cInfraService,
org.apache.tapestry5.ioc.Configuration<AliasContribution> configuration) {
configuration.add(AliasContribution.create(ClientInfrastructure.class,
cInfraService));
}
... in my AppModule. It's been a while since I looked at it so can't say
for sure but perhaps this is more in line with what is required for
T5.1.0.x. I think ClientInfrastructure is deprecated in T5.2.0. Hope
this
is of use.
Regards,
Jim.
-----Original Message-----
From: Rich [mailto:rich...@moremagic.com]
Sent: 22 July 2010 16:32
To: Tapestry users
Subject: Re: blackbird.js and IE breaking fixed CSS background image
Hi,
attempt 6 at getting through spam blocker. I used the code mentioned but
the "original" object from the decorate method is always null. I'm not
sure what to do about that?
-Rich
Jim O'Callaghan wrote:
Hi Rich,
Yep same guy, guilty as charged. This may not be the best solution, you
may
get some better advice from some of the more experienced Tapestry people
on
the forum, but it's the approach I used. The post I included earlier was
indeed about just ensuring a specific order was enforced in the js
includes
for the ClientInfrastructure, but I have used a variation on it to
include
my local version of blackbird.js, rather than the one that comes with
T5.1.0.5. The code is as follows:
AppModule.java:
public ClientInfrastructure
decorateClientInfrastructure(ClientInfrastructure original,
@InjectService("AssetSource") AssetSource assetSource) {
return new MyClientInfrastructure(original, assetSource);
}
MyClientInfrastructure.java:
public class MyClientInfrastructure implements ClientInfrastructure {
@Inject
AssetSource assetSource;
ClientInfrastructure clientInfrastructure;
List javascriptStack = new ArrayList();
@SuppressWarnings("unchecked")
public MyClientInfrastructure(ClientInfrastructure
clientInfrastructure, AssetSource assetSource) {
this.assetSource = assetSource;
this.clientInfrastructure = clientInfrastructure;
// Add jQuery assets in ahead of Prototype - IE8 was burping
otherwise, despite jQuery.noConflict being set
javascriptStack.add(assetSource.getAsset(null,
"context:/scripts/jquery-1.4.2.min.js", null));
javascriptStack.add(assetSource.getAsset(null,
"context:/scripts/jquery-ui-1.8.1.custom.min.js", null));
List assets = this.clientInfrastructure.getJavascriptStack();
for (Iterator i = assets.iterator(); i.hasNext();) {
Asset asset = (Asset) i.next();
if (!asset.toString().contains("blackbird.js")) {
javascriptStack.add(asset);
} else {
javascriptStack.add(assetSource.getAsset(null,
"context:/scripts/blackbird_1_0/blackbird.js", null));
}
}
}
public List<Asset> getJavascriptStack() {
//return clientInfrastructure.getJavascriptStack();
return javascriptStack;
}
public List<Asset> getStylesheetStack() {
return clientInfrastructure.getStylesheetStack();
}
}
I have my local blackbird.js physically located in the project under
src\main\webapp\scripts\blackbird_1_0\blackbird.js.
Obviously the jQuery ordering is not relevant to your specific problem,
just
the replacement of blackbird.js is. Probably could be more
elegant/efficient, but it's just called once at startup so I wasn't too
concerned about it.
Hope this get things working for you <and I don't get chewed by the more
enlightened forum members!>.
Regards,
Jim.
-----Original Message-----
From: Rich [mailto:rich...@moremagic.com]
Sent: 20 July 2010 17:25
To: users@tapestry.apache.org
Subject: blackbird.js and IE breaking fixed CSS background image
Hi,
I'm aware blackbird.js is not directly Tapestry code, but I'm looking
for advice on how to handle an issue with the blackbird.js file. I had
been having problems with getting the fixed background image in my
tapestry webapp to stay fixed in Internet Explorer. I'd given up
searching for a solution (it appeared to be beyond the CSS I was using)
until someone recently pointed out that a line of code in blackbird.js
breaks the fixed background for IE.
I went and re-jared the tapestry-core with the line of code commented
out and it now works in internet explorer. However, having to manage my
own version of the tapestry-core jar to fix an IE bug does not seem like
a good idea. Is there a way to exclude blackbird from my projects all
together? Or maybe there is some other, better solution?
Regards,
Rich
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org