You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Beshai <pe...@gmail.com> on 2008/04/10 20:03:42 UTC

[T5] Override mapped configuration value

TapestryModule contributes to the DefaultDataTypeAnalyzer String.class as
"text". Is it possible to override what String.class is mapped to?

http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html states
that: "The keys passed in must be unique. When conflicts occur, Tapestry
will log warnings (identifying the source, in terms of invoked methods, of
the conflict), and ignore the conflicting value." So I cannot simply do:
configuration.add(String.class, "customText");


Peter Beshai

Re: [T5] Override mapped configuration value

Posted by Peter Beshai <pe...@gmail.com>.
Great, thanks Filip and Howard! :-) I hadn't ever thought of contributing a
DataTypeAnalyzer before the default one.

On Thu, Apr 10, 2008 at 8:42 PM, Howard Lewis Ship <hl...@gmail.com> wrote:

> Or contribute your own DataTypeAnalyzer ahead of the
> DefaultDataTypeAnalyzer that specifically recognizes the String type
> and provides whatever datatype you want.  But I suspect Filip's
> approach is what you want.
>
> On Thu, Apr 10, 2008 at 2:43 PM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> > Hi Peter,
> >
> >  If you're doing this to provide another property editor for the "text"
> data
> > type for use in BeanEditor/BeanEditForm you should take a look at the
> > BeanBlockOverrideSource which will let you override the defaults
> specified
> > in BeanBlockSource.
> >
> >
> >
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/BeanBlockOverrideSource.html
> >
> >  If that's not what you're trying to do, well, then I don't know. :p
> >
> >  -Filip
> >
> >
> >
> >  On 2008-04-10 20:03, Peter Beshai wrote:
> >
> > > TapestryModule contributes to the DefaultDataTypeAnalyzer String.class
> as
> > > "text". Is it possible to override what String.class is mapped to?
> > >
> > > http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html
> > states
> > > that: "The keys passed in must be unique. When conflicts occur,
> Tapestry
> > > will log warnings (identifying the source, in terms of invoked
> methods, of
> > > the conflict), and ignore the conflicting value." So I cannot simply
> do:
> > > configuration.add(String.class, "customText");
> > >
> > >
> > > Peter Beshai
> > >
> > >
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >  For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T5] Override mapped configuration value

Posted by Howard Lewis Ship <hl...@gmail.com>.
Or contribute your own DataTypeAnalyzer ahead of the
DefaultDataTypeAnalyzer that specifically recognizes the String type
and provides whatever datatype you want.  But I suspect Filip's
approach is what you want.

On Thu, Apr 10, 2008 at 2:43 PM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> Hi Peter,
>
>  If you're doing this to provide another property editor for the "text" data
> type for use in BeanEditor/BeanEditForm you should take a look at the
> BeanBlockOverrideSource which will let you override the defaults specified
> in BeanBlockSource.
>
>
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/BeanBlockOverrideSource.html
>
>  If that's not what you're trying to do, well, then I don't know. :p
>
>  -Filip
>
>
>
>  On 2008-04-10 20:03, Peter Beshai wrote:
>
> > TapestryModule contributes to the DefaultDataTypeAnalyzer String.class as
> > "text". Is it possible to override what String.class is mapped to?
> >
> > http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html
> states
> > that: "The keys passed in must be unique. When conflicts occur, Tapestry
> > will log warnings (identifying the source, in terms of invoked methods, of
> > the conflict), and ignore the conflicting value." So I cannot simply do:
> > configuration.add(String.class, "customText");
> >
> >
> > Peter Beshai
> >
> >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Override mapped configuration value

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi Peter,

If you're doing this to provide another property editor for the "text" 
data type for use in BeanEditor/BeanEditForm you should take a look at 
the BeanBlockOverrideSource which will let you override the defaults 
specified in BeanBlockSource.

http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/BeanBlockOverrideSource.html

If that's not what you're trying to do, well, then I don't know. :p

-Filip

On 2008-04-10 20:03, Peter Beshai wrote:
> TapestryModule contributes to the DefaultDataTypeAnalyzer String.class as
> "text". Is it possible to override what String.class is mapped to?
> 
> http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html states
> that: "The keys passed in must be unique. When conflicts occur, Tapestry
> will log warnings (identifying the source, in terms of invoked methods, of
> the conflict), and ignore the conflicting value." So I cannot simply do:
> configuration.add(String.class, "customText");
> 
> 
> Peter Beshai
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org