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