You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dan Adams <da...@ifactory.com> on 2006/05/15 22:04:16 UTC
Setting system configuration for components
I have a library of components that are used by a couple different
projects. One of the things I would like to do is to set system-wide
defaults for each project that would be used by the components so they
didn't have to be specified each time the component was used. I could
also create a wrapper component to set the properties but in this case
that is not optimal. Anyone know of a way other than setting system
properties that could do this? Something like setting it in a properties
or config file somewhere.
--
Dan Adams
Software Engineer
Interactive Factory
617.235.5857
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Setting system configuration for components
Posted by Dan Adams <da...@ifactory.com>.
Well, i have default values for the parameters set in the component's
annotations but i would like a way to set a different default for those
parameters across the system via some sort of configuration value. It
would be like if the tapestry @Form component had a default value for a
parameter and you wanted to set that default value to something
particular to your application wherever it is used.
On Mon, 2006-05-15 at 15:27 -0500, Paul Cantrell wrote:
> If a value is only used by one component, put the default in the
> component spec.
>
> If a value is shared across components, you could create an ASO with
> global scope and inject it into your components -- or you could go
> old-school, and just create a MyComponentSettings singleton and use it.
>
> P
>
> On May 15, 2006, at 3:04 PM, Dan Adams wrote:
>
> > I have a library of components that are used by a couple different
> > projects. One of the things I would like to do is to set system-wide
> > defaults for each project that would be used by the components so they
> > didn't have to be specified each time the component was used. I could
> > also create a wrapper component to set the properties but in this case
> > that is not optimal. Anyone know of a way other than setting system
> > properties that could do this? Something like setting it in a
> > properties
> > or config file somewhere.
> >
> > --
> > Dan Adams
> > Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> _________________________________________________________________
> Piano music podcast: http://inthehands.com
> Other interesting stuff: http://innig.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
--
Dan Adams
Software Engineer
Interactive Factory
617.235.5857
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Setting system configuration for components
Posted by Paul Cantrell <ca...@pobox.com>.
If a value is only used by one component, put the default in the
component spec.
If a value is shared across components, you could create an ASO with
global scope and inject it into your components -- or you could go
old-school, and just create a MyComponentSettings singleton and use it.
P
On May 15, 2006, at 3:04 PM, Dan Adams wrote:
> I have a library of components that are used by a couple different
> projects. One of the things I would like to do is to set system-wide
> defaults for each project that would be used by the components so they
> didn't have to be specified each time the component was used. I could
> also create a wrapper component to set the properties but in this case
> that is not optimal. Anyone know of a way other than setting system
> properties that could do this? Something like setting it in a
> properties
> or config file somewhere.
>
> --
> Dan Adams
> Software Engineer
> Interactive Factory
> 617.235.5857
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
_________________________________________________________________
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org