Expand my Community achievements bar.

SOLVED

Touch UI Select Datasource Question

Avatar

Level 3

I need to populate a select widget(/libs/granite/ui/components/foundation/form/select) in the AEM 6 Touch UI with objects returned from a call to a java helper class. I believe I need to use a datasource to accomplish this.  I need to pass a SlingScriptHelper and some of the inherited properties for the current page to my helper class. Is it possible to get these objects in the datasource jsp?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Look at this older community thread:

https://forums.adobe.com/thread/1063317

It talks about how to get a SlingScriptHelper using a Request object. You should be able to get this object in the script where a DataSource object is created. We only have the above article that shows how to use a DataSource object when working with Touch Ui components..

View solution in original post

3 Replies

Avatar

Level 10

We have a community article for this use case. See:

https://helpx.adobe.com/experience-manager/using/creating-granite-datasource.html

Hope this gets you up and running. 

Avatar

Level 3

Thanks for the reply, but I was hoping to get a little more guidance.  I had already reviewed that example.

I need to pass a SlingScriptHelper and some of the inherited properties for the current page to my helper class. Is it possible to get these objects in the datasource jsp?

Avatar

Correct answer by
Level 10

Look at this older community thread:

https://forums.adobe.com/thread/1063317

It talks about how to get a SlingScriptHelper using a Request object. You should be able to get this object in the script where a DataSource object is created. We only have the above article that shows how to use a DataSource object when working with Touch Ui components..