Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Select dropdown is not getting populating using datasource via Model class

Avatar

Avatar
Ignite 1
Level 2
ks_hitijingole
Level 2

Likes

3 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile

Avatar
Ignite 1
Level 2
ks_hitijingole
Level 2

Likes

3 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile
ks_hitijingole
Level 2

28-04-2021

I am working on a migration from 6.4 to 6.5. We have a basepage component which has a select dropdown for the field pageType. Please see the below screenshot.

ks_hitijingole_0-1619675300547.png

The datasource node is responsible to populate the dropdown. The datasource node points to an html page which calls the Model class(As seen in above screenshot). Model class is populating the data based on language configuration.

 

Issue :

In AEM 6.4 local the dropdown is getting populated without any issue. But when I check the same in my AEM 6.5 local the dropdown is not getting populated. (Note : This is happening before as well as after doing the Coral 3 migration.)

 

Can someone please help me understand what might be the possible cause?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

576 likes

Total Posts

687 posts

Correct Reply

199 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

576 likes

Total Posts

687 posts

Correct Reply

199 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile
asutosh_jena
Level 10

28-04-2021

Hi @ks_hitijingole 

 

Can you confirm if the model class is getting executed?

If model class is working as expected, then we need to see the datasource from where the data is loading in the Sling Model.

 

Also you can remove the absolute path for the resource type and provide a relative path i.e. instead of /apps you can start from roche/diagnostics.......

 

Thanks!

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

29-04-2021

You don't need to necessarily create a model to populate a dropdown that can be done in many other ways. I prefer using a servlet to create dropdown e.g.

https://aemlab.blogspot.com/2019/07/aem-touch-ui-dropdown-from-json.html

https://github.com/arunpatidar02/aem63app-repo/blob/master/java/DemoDailogDropdown.java