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

Override Adaptive Form DropDownList component

Avatar

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
jamestvu
Level 2

30-10-2018

Hey yall,

I'm trying to override the GuideDropdown component to be able to populate the option values dynamically in the backing bean. The values get populated and the drop down renders fine but the form will not submit anymore and the following error is in the console. Any ideas how to resolve this?

guideRuntime.js:26192 TypeError: Cannot read property 'priority' of undefined

    at child.getAttribute (guideRuntime.js:26698)

    at child._addProperty (guideRuntime.js:30187)

    at child.<anonymous> (guideRuntime.js:30156)

I pretty much just copied and pasted the /libs/fd/af/components/guidedropdownlist component and changed any references to GuideDropDownList.java to my own custom java class, which also extends GuideField.java. In the end I'd want the form to be able to submit and store the value within crx or a connected DB.

Ideally I'd like to do this in HTL and sling models instead of jsp but it seems the OOB adaptive form submit functionality will only store data from adaptive form components?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

316 likes

Total Posts

1,139 posts

Correct Reply

184 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

316 likes

Total Posts

1,139 posts

Correct Reply

184 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

31-10-2018

Instead, you can use SOAP-based Form data model and create its service. Use this service in adaptive form to load the dynamic drop-down list. I have shared details on similar use-case in old forum post:

AEM 6.3 Forms - How can I populate a dropdownlist from database?

Answers (5)

Answers (5)

Avatar

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
jamestvu
Level 2

31-10-2018

thanks ill giv this a shot

Avatar

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
jamestvu
Level 2

31-10-2018

From a soap WS call but currently I'm just passing a list of objects hard coded atm to the dropdown.

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

316 likes

Total Posts

1,139 posts

Correct Reply

184 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

316 likes

Total Posts

1,139 posts

Correct Reply

184 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

31-10-2018

And how is the dropdown list being fetched, is it a WS call or from DB?

Avatar

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
jamestvu
Level 2

Likes

4 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
jamestvu
Level 2

31-10-2018

6.3

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

316 likes

Total Posts

1,139 posts

Correct Reply

184 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

316 likes

Total Posts

1,139 posts

Correct Reply

184 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

31-10-2018

Hi,

What version of AEM forms are you using?