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

Without Ajax call fetch component property in authordialog javascript file.

Avatar

Avatar
Ignite 3
Level 1
dhanubrp
Level 1

Like

1 like

Total Posts

10 posts

Correct Reply

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

Avatar
Ignite 3
Level 1
dhanubrp
Level 1

Like

1 like

Total Posts

10 posts

Correct Reply

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

02-02-2021

We have a component its having 2 fields  , both the fields of type dropdown .

feedbackb.PNG

field1 value is hardcoded in component class.

 

field2 value should load based on field1 value selection.(field2 value will loaded after selecting field1 value)

 

We have already implemented this.

 

Now we  need to achieve

Example Scenario:

 

Step1: We opened component and selected field1 value.

Step2: Then selected field2 value.

Step3: Submitted the component dialog.

 Again when we open the component dialog to make field2 value selected, we need the value stored previously in CRX.

 

We achieved this by using Ajax call

 

Example: By calling specific component path

                localhost:4502/content/pagename/jcr:content/abccomponent.json

        Then we retrieved  specific component property and made field2  selected.

 


We need to fetch the previously selected value of field2 without calling Ajax. Is there any way we can achieve this? 

        

Replies

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

613 likes

Total Posts

590 posts

Correct Reply

231 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

613 likes

Total Posts

590 posts

Correct Reply

231 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

02-02-2021

@dhanubrp,

Based on your scenario, you will need to make an Ajax call regardless. Because field2 uses business logic to populate dropdown options based on the dependency of field1. You will need to add in additional render logic in field2 where if the property already exists, to display that value as a selected drop-down option. With your custom Touch UI dialogue solution, I don't think you can get away without an ajax call. 

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

274 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

274 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Anudeep_Garnepudi
MVP

02-02-2021