granite properties | Community
Skip to main content
selvaganesh
Level 5
October 16, 2015
Solved

granite properties

  • October 16, 2015
  • 2 replies
  • 1171 views

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.
Best answer by PaulMcMahon

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

PaulMcMahonAccepted solution
Level 8
October 16, 2015

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. 

Adobe Employee
October 16, 2015

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