jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Zdila <m.zd...@mwaysolutions.com>
Subject Re: get a String [] property
Date Tue, 11 Mar 2008 11:45:30 GMT
Hi Katia

You must use:

final Value[] values = node.getProperty("myProperty").getValues();
final String[] strings = new String[values.length];
for (int i = 0; i < values.length; i++) {
	strings[i] = values[i].getString();
}

cu

On Tue 11. March 2008 12:38:36 Katia Santos wrote:
> Hello,
>
> This may be a stupid question, but i have set a property in one node, a
> String [] property like this
>
> String[] array = {"bla","ble"};
> node.setProperty("myProperty",array);
>
>
> ...but there is no method to get a String[] property...or is there?
> I was expecting to find something like this:
>
> String [] strings = node.getProperty("myProperty").getStrings() ... like
> there is for every other property that i can insert in a node...
>
>
> Katia Santos



-- 
Martin Zdila 
CTO

M-Way Solutions Slovakia s.r.o.
Letna 27, 040 01 Kosice
Slovakia

tel:+421-908-363-848
mailto:m.zdila@mwaysolutions.com
http://www.mwaysolutions.com
xmpp:zdila@jabbim.sk (Jabber)
skype:m.zdila

Mime
View raw message