You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Robert Taylor <rt...@mulework.com> on 2003/04/30 03:09:15 UTC

RE: Store list property value in properties file

Sure, it's just a properties file. You could store comma delimited list:

someKey=value1,value2,value3,value4

Or you could store an ordered list like:

someKey.0=value1
someKey.1=value2
someKey.2=value3

You would just have to parse the values when they are accessed.

robert

> -----Original Message-----
> From: Slava_L [mailto:lovkiys@esstu.ru]
> Sent: Tuesday, April 29, 2003 9:53 PM
> To: Struts Users Mailing List
> Subject: Store list property value in properties file
> 
> 
> Is it possible to assign a list of possible values for one key 
> inside of application.properties files ? 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Store list property value in properties file

Posted by Robert Taylor <rt...@mulework.com>.
Ah, I said it was possible. I didn't say how Struts would interpret those
values. What are you trying to do? Why do you need multiple values per key?

robert

> -----Original Message-----
> From: Slava_L [mailto:lovkiys@esstu.ru]
> Sent: Tuesday, April 29, 2003 10:24 PM
> To: Struts Users Mailing List
> Subject: Re: Store list property value in properties file
>
>
> If i will use comma to separate values each other  how am i suppose to use
> sign "," as a string char?
>
> Also, if key has several values - which string will be chosen
> (4xmpl inside
> <bean:message key="blah" /> ? )
>
> (i'v tried comma delimited string - whole string was displayed (inlcudin'
> "," char)
>
> ----- Original Message -----
> From: "Robert Taylor" <rt...@mulework.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Wednesday, April 30, 2003 9:09 AM
> Subject: RE: Store list property value in properties file
>
>
> > Sure, it's just a properties file. You could store comma delimited list:
> >
> > someKey=value1,value2,value3,value4
> >
> > Or you could store an ordered list like:
> >
> > someKey.0=value1
> > someKey.1=value2
> > someKey.2=value3
> >
> > You would just have to parse the values when they are accessed.
> >
> > robert
> >
> > > -----Original Message-----
> > > From: Slava_L [mailto:lovkiys@esstu.ru]
> > > Sent: Tuesday, April 29, 2003 9:53 PM
> > > To: Struts Users Mailing List
> > > Subject: Store list property value in properties file
> > >
> > >
> > > Is it possible to assign a list of possible values for one key
> > > inside of application.properties files ?
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Store list property value in properties file

Posted by Slava_L <lo...@esstu.ru>.
If i will use comma to separate values each other  how am i suppose to use
sign "," as a string char?

Also, if key has several values - which string will be chosen (4xmpl inside
<bean:message key="blah" /> ? )

(i'v tried comma delimited string - whole string was displayed (inlcudin'
"," char)

----- Original Message -----
From: "Robert Taylor" <rt...@mulework.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, April 30, 2003 9:09 AM
Subject: RE: Store list property value in properties file


> Sure, it's just a properties file. You could store comma delimited list:
>
> someKey=value1,value2,value3,value4
>
> Or you could store an ordered list like:
>
> someKey.0=value1
> someKey.1=value2
> someKey.2=value3
>
> You would just have to parse the values when they are accessed.
>
> robert
>
> > -----Original Message-----
> > From: Slava_L [mailto:lovkiys@esstu.ru]
> > Sent: Tuesday, April 29, 2003 9:53 PM
> > To: Struts Users Mailing List
> > Subject: Store list property value in properties file
> >
> >
> > Is it possible to assign a list of possible values for one key
> > inside of application.properties files ?
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org