Expand my Community achievements bar.

SOLVED

granite properties

Avatar

Level 6

I store some jcr properties as comma separated values in a String. When I get the properties by properties.get("links"); or granite.resource.properties["links"] , i am not able to do String operations(split). Is there anyway to get the properties as String Object ?

1 Accepted Solution

Avatar

Correct answer by
Level 8

Are you doing this in a JSP or a Java object? Or Sightly? Those calls return a String object, so if you aren't able to manipulate it then I'd guess it's a limitation of your scripting tool.

Assuming that this is sightly you'll probably need to use either JavaScript Use function or Java Use Bean to do the manipulation. 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

Are you doing this in a JSP or a Java object? Or Sightly? Those calls return a String object, so if you aren't able to manipulate it then I'd guess it's a limitation of your scripting tool.

Assuming that this is sightly you'll probably need to use either JavaScript Use function or Java Use Bean to do the manipulation. 

Avatar

Employee

can you check if the property type is string or string[]?