Skip to main content
selvaganesh
Level 5
Oct 16, 2015 2:27 AM UTC
Solved

granite properties

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 ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
PaulMcMahonAccepted solution
Level 8
Oct 16, 2015 2:27 AM UTC

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. 

2 replies

Adobe Employee
Oct 16, 2015 2:27 AM UTC

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

Translate
PaulMcMahonAccepted solution
Level 8
Oct 16, 2015 2:27 AM UTC

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. 

Translate