Expand my Community achievements bar.

SOLVED

Can a Granite UI component be used inside of Sightly (if so, how?)

Avatar

Level 3

I have been experimenting with the Touch UI dialogs in my "spare time" over the past week after last week's session. At some point it clicked in my head that these Granite UI components are in our instance and I wondered if I could use them in our implementation (which has not been launched yet, and since it is a relatively new implementation was developed almost entirely with Sightly for our user interaction).  Finally got a chance to attempt to pull one of the Granite UI components earlier this afternoon and after reviewing http://stackoverflow.com/questions/25430981/are-there-requestscope-variables-in-sightly/25447524#254... and http://stackoverflow.com/questions/25404863/aem-6-0-additional-parameters-when-using-data-sly-resour... came up with the following:

<div data-sly-use="${'../../../utils/setAttributes.js' @ name = 'howCanWeHelp'}" data-sly-resource="${'select' @ resourceType='granite/ui/components/foundation/form/select'}"> </div>

I realize that the problem with what I am attempting to do here is that the Granite component does not appear to be using getAttributes.js so there is not really any way for the attributes to be received within the granite component.  Was wondering if someone could provide any suggestions on what the proper way to pass attributes into the select would be (also, please include how to populate options as well)?  For what it's worth, we only have SP1 installed.  Our components were mostly developed with the edit bars being a good way for the authors to distinguish between different components and due to that, I don't think we will be installing SP2 anytime in the near future because when I attempted to install it on my instance it really messed with the locations of the edit bars.

Thanks in advance for your help!

1 Accepted Solution

Avatar

Correct answer by
Level 10

As discussed in the session last week - Touch UI APIs are really used in JSP/JS.

[img]TouchUI1.png[/img]

You can still use Sightly with other use cases - but if you want to use Granite APIs - follow the guidance in the April Ask the AEM Experts. Here is the playback:

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

As discussed in the session last week - Touch UI APIs are really used in JSP/JS.

[img]TouchUI1.png[/img]

You can still use Sightly with other use cases - but if you want to use Granite APIs - follow the guidance in the April Ask the AEM Experts. Here is the playback:

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...