Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
JustinEd3Accepted solution
Adobe Employee
Oct 16, 2015 2:27 AM UTC

Hi,

In Granite UI, this is done using a DataSource. There are a few OOTB examples of DataSources, including: /libs/cq/gui/components/common/datasources/tags, /libs/foundation/components/list/displayasdatasource and /libs/granite/ui/components/foundation/authorizable/selectdatasource. There's an example of a custom DataSource here: https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/288

Regards,

Justin

7 replies

viswacq5Author
Level 3
Oct 16, 2015 2:27 AM UTC

Could you please let me know how to create custom in Granite UI similar how we create in custom xtype EXT JS ?

Thanks!

Translate
viswacq5Author
Level 3
Oct 16, 2015 2:27 AM UTC

Any inputs

Translate
JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:27 AM UTC

Hi,

In Granite UI, this is done using a DataSource. There are a few OOTB examples of DataSources, including: /libs/cq/gui/components/common/datasources/tags, /libs/foundation/components/list/displayasdatasource and /libs/granite/ui/components/foundation/authorizable/selectdatasource. There's an example of a custom DataSource here: https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/288

Regards,

Justin

Translate
smacdonald2008
Level 10
Oct 16, 2015 2:27 AM UTC

Right now -- there are no articles or how to articles around this. We know this is an issue and it will be addressed. You can look at the source code for existing components here:

This is formed by a collection of sling components that enable the author to compose a webapp fast. The developer develops components, the author assembles the components to be a webapp. The role of the server-side is to give the hypermedia affordance (markup) to the client.

Currently the components are located in the Granite repository at:

    /libs/granite/ui/components/foundation

Translate
Level 2
Feb 1, 2016 11:10 AM UTC

Hi,

I have a similar requirement where I want to populate the Granite Drop down via a servlet. Can you please let me know the solution around it.

Thanks.

Translate
Adobe Employee
Feb 3, 2016 5:35 PM UTC

Did you look at the DataSource examples?

Translate
chrismillar
Feb 7, 2016 7:04 AM UTC

If you want to use something a little more lightweight than ACS commons (which is amazing), you can roll your own with a simple jsp:

http://experiencemanaged.com/posts/display-dynamic-content-in-a-touch-ui-granite-dialog-select-field.html

This solution allows you to specify which fields to use for key/value right inside your dialog xml.

Translate