problems with granite.resources | Community
Skip to main content
germansan1992pl
New Participant
Aug 24, 2018 6:32 PM UTC
Solved

problems with granite.resources

Hi, excuse me, Im noob in AEM 6.3. I have a cq: Client Library Folder that contain a js with a function as shown below.

but it said "granite is not defined" when I try to get some property from the touch UI dialog like this:
var prueba = granite.resource.properties["showComercializable"];

where "showComercializable" its the name property in touch UI dialog.

thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Aug 24, 2018 10:40 PM UTC

Hi,

You need to create JS Use-API(server side JS) and use inside HTL, clientlibs are use for client side. Please check below.

HTL JavaScript Use-API

Thanks

Arun

Arun Patidar

2 replies

edubey
Level 10
Aug 27, 2018 3:46 PM UTC

AFAIK, on client side there is no object with name granite but there is one with Granite

What are you trying to achieve, based on which I can recommend client/server side

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Aug 24, 2018 10:40 PM UTC

Hi,

You need to create JS Use-API(server side JS) and use inside HTL, clientlibs are use for client side. Please check below.

HTL JavaScript Use-API

Thanks

Arun

Translate
Arun Patidar