Return-Path: Delivered-To: apmail-tapestry-dev-archive@www.apache.org Received: (qmail 38778 invoked from network); 27 Jun 2008 13:25:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jun 2008 13:25:37 -0000 Received: (qmail 42803 invoked by uid 500); 27 Jun 2008 13:25:37 -0000 Delivered-To: apmail-tapestry-dev-archive@tapestry.apache.org Received: (qmail 42792 invoked by uid 500); 27 Jun 2008 13:25:37 -0000 Mailing-List: contact dev-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tapestry development" Delivered-To: mailing list dev@tapestry.apache.org Received: (qmail 42780 invoked by uid 500); 27 Jun 2008 13:25:37 -0000 Delivered-To: apmail-jakarta-tapestry-dev@jakarta.apache.org Received: (qmail 42772 invoked by uid 99); 27 Jun 2008 13:25:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2008 06:25:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2008 13:24:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3A92A234C14F for ; Fri, 27 Jun 2008 06:24:45 -0700 (PDT) Message-ID: <775675054.1214573085238.JavaMail.jira@brutus> Date: Fri, 27 Jun 2008 06:24:45 -0700 (PDT) From: =?utf-8?Q?Fritz_Pr=C3=B6bstle_=28JIRA=29?= To: tapestry-dev@jakarta.apache.org Subject: [jira] Updated: (TAPESTRY-2486) Make MessageBindingFactory,ComponentBindingFactory ... IOC-Services In-Reply-To: <559351943.1214572485115.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TAPESTRY-2486?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fritz Pr=C3=B6bstle updated TAPESTRY-2486: ------------------------------------- Description:=20 My actual problem:=20 I would like to replace BindingConstants.MESSAGE with my own implemention. This is currently not possible because MessageBindingFactory is not IOC Se= rvice. ( I could decorate it etc. but this is not enough for me) General Solution :=20 Make MessageBindingFactory a IOC service then I could override with contri= buteAliasOverrides(...) This may also make sence for other objects , which are currently instatiate= d with "new" in TapestryModule.java Another soultion: Allow MappedConfiguration.add to overwrite serviceId's ( with warning ). -------------------------------------- instantiotion of MessageBindingFacto= ry with "new" ----------------------------- public static void contributeBindingSource(MappedConfiguration configuration, @InjectService("PropBindingF= actory") BindingFactory propBindingFa= ctory, ObjectLocator locator) { configuration.add(BindingConstants.LITERAL, new LiteralBindingFacto= ry()); configuration.add(BindingConstants.PROP, propBindingFactory); configuration.add(BindingConstants.COMPONENT, new ComponentBindingF= actory()); configuration.add(BindingConstants.MESSAGE, new MessageBindingFacto= ry()); configuration.add(BindingConstants.VALIDATE, locator.autobuild(Vali= dateBindingFactory.class)); configuration.add(BindingConstants.TRANSLATE, locator.autobuild(Tra= nslateBindingFactory.class)); configuration.add(BindingConstants.BLOCK, new BlockBindingFactory()= ); configuration.add(BindingConstants.ASSET, locator.autobuild(AssetBi= ndingFactory.class)); configuration.add(BindingConstants.VAR, new RenderVariableBindingFa= ctory()); configuration.add(BindingConstants.NULLFIELDSTRATEGY, locator.autobuild(NullFieldStrategyBindingFactory= .class)); } was: My actual problem:=20 I would like to replace BindingConstants.MESSAGE with my own implemention. This is currently not possible because MessageBindingFactory is not IOC Se= rvice. ( I could decorate it etc. but this is not enough for me) Solution:=20 Make MessageBindingFactory a IOC service then I could override with contri= buteAliasOverrides(...) General: This may also make sence for other objects , which are currently instatiate= d with "new" in TapestryModule.java -------------------------------------- instantiotion of MessageBindingFacto= ry with "new" ----------------------------- public static void contributeBindingSource(MappedConfiguration configuration, @InjectService("PropBindingF= actory") BindingFactory propBindingFa= ctory, ObjectLocator locator) { configuration.add(BindingConstants.LITERAL, new LiteralBindingFacto= ry()); configuration.add(BindingConstants.PROP, propBindingFactory); configuration.add(BindingConstants.COMPONENT, new ComponentBindingF= actory()); configuration.add(BindingConstants.MESSAGE, new MessageBindingFacto= ry()); configuration.add(BindingConstants.VALIDATE, locator.autobuild(Vali= dateBindingFactory.class)); configuration.add(BindingConstants.TRANSLATE, locator.autobuild(Tra= nslateBindingFactory.class)); configuration.add(BindingConstants.BLOCK, new BlockBindingFactory()= ); configuration.add(BindingConstants.ASSET, locator.autobuild(AssetBi= ndingFactory.class)); configuration.add(BindingConstants.VAR, new RenderVariableBindingFa= ctory()); configuration.add(BindingConstants.NULLFIELDSTRATEGY, locator.autobuild(NullFieldStrategyBindingFactory= .class)); } > Make MessageBindingFactory,ComponentBindingFactory ... IOC-Services > -------------------------------------------------------------------- > > Key: TAPESTRY-2486 > URL: https://issues.apache.org/jira/browse/TAPESTRY-2486 > Project: Tapestry > Issue Type: Improvement > Components: tapestry-core > Affects Versions: 5.0.13 > Reporter: Fritz Pr=C3=B6bstle > > My actual problem:=20 > I would like to replace BindingConstants.MESSAGE with my own implementio= n. > This is currently not possible because MessageBindingFactory is not IOC = Service. ( I could decorate it etc. but this is not enough for me) > General Solution :=20 > Make MessageBindingFactory a IOC service then I could override with cont= ributeAliasOverrides(...) > This may also make sence for other objects , which are currently instatia= ted with "new" in TapestryModule.java > Another soultion: > Allow MappedConfiguration.add to overwrite serviceId's ( with warning ). > -------------------------------------- instantiotion of MessageBindingFac= tory with "new" ----------------------------- > public static void contributeBindingSource(MappedConfiguration configuration, > @InjectService("PropBindin= gFactory") > BindingFactory propBinding= Factory, > ObjectLocator locator) > { > configuration.add(BindingConstants.LITERAL, new LiteralBindingFac= tory()); > configuration.add(BindingConstants.PROP, propBindingFactory); > configuration.add(BindingConstants.COMPONENT, new ComponentBindin= gFactory()); > configuration.add(BindingConstants.MESSAGE, new MessageBindingFac= tory()); > configuration.add(BindingConstants.VALIDATE, locator.autobuild(Va= lidateBindingFactory.class)); > configuration.add(BindingConstants.TRANSLATE, locator.autobuild(T= ranslateBindingFactory.class)); > configuration.add(BindingConstants.BLOCK, new BlockBindingFactory= ()); > configuration.add(BindingConstants.ASSET, locator.autobuild(Asset= BindingFactory.class)); > configuration.add(BindingConstants.VAR, new RenderVariableBinding= Factory()); > configuration.add(BindingConstants.NULLFIELDSTRATEGY, > locator.autobuild(NullFieldStrategyBindingFacto= ry.class)); > } --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org For additional commands, e-mail: dev-help@tapestry.apache.org