OK, I might have a solution just using Jelly, and no custom code. Is
there anyway to dynamically create a property? For instance, I have the
following:
maven.jnlp.property.value.1=foo
and I have a forEach with an index variable of i.
I am trying to do something like: ${maven.jnlp.property.value.${i}}
However, this won't work. Is there something built in like an 'eval'
statement?
Jim
On Sun, 29 Sep 2002, Jim Birchfield wrote:
>
>
> On Mon, 30 Sep 2002 [EMAIL PROTECTED] wrote:
>
> > Jim Birchfield <[EMAIL PROTECTED]> wrote on 30/09/2002 09:37:18 AM:
> >
> > > Can I have something likke this?
> > >
> > > maven.jnlp.property=foo,bar
> > > maven.jnlp.property=foo.baz
> > > maven.jnlp.property=bar.baz
> >
> > Well, no, because properties are like variables - the name must be unique.
> > The above simply assigns three different values to the same property
> > 'maven.jnlp.property' in sequence.
>
> That's what I thought, but thought you had something in mind...;-)
>
> >
> > >
> > > then somehow do
> > > for allProperties {
> > > handle prop?
> > > }
> > >
> > > If possible, can you send me soemthing showing how to do this?
> >
> > How about you tell me what you're trying to do, and we try working out a
> > way of doing it.
>
> What I need to do is allow people to put a variable number of things in
> the properties file(or somewhere. The best (but ugly) solution I have is
> something like this:
>
> maven.jnlp.property.number=2
> maven.jnlp.property.name.1=foo
> maven.jnlp.property.value.1=bar
> maven.jnlp.property.name.2=bar
> maven.jnlp.property.value.2=baz
>
> Then write a Jelly tag that looks similar to:
>
> <jnlp:propertyIterator
> propertyName="maven.jnlp.property"/>
>
> And this tag looked up $propertyName.number, loops over $propertyName.name
> and $propertyName.value and printed out the appropriate tag.
>
> I remember doing some serious ugly stuff in properties files several years
> ago, hence my appreciation for XML based property files.
>
> Do you see a better approach for this?
>
> Jim
>
> >
> > > Thanks!
> > >
> > > Jim
> > --
> > dIon Gillard, Multitask Consulting
> > Work: http://www.multitask.com.au
> > Developers: http://adslgateway.multitask.com.au/developers
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>