Highlighted

cq included or sly included components dialog "selected" property is not respected for select drop down

Avatar

Avatar

Var

Avatar

Var

Var

07-01-2019

Steps to reproduce the issue.

  1. Add a drop down to the text component as shown below.

1662355_pastedImage_2.png

     2. add the selected property to one of the drop down list options ( Note :- Other than first option.)

1662362_pastedImage_3.png

  3. Include the Text component into the Title component as shown below. by using the

<div data-sly-resource="${'par' @ resourceType='/apps/core/wcm/components/text/v2/text'}"></div>

1662363_pastedImage_9.png

   4. Open any page http://localhost:4502/editor.html/content/we-retail/language-masters/en/men.html, add both the components (Text and Title Components) to the page as shown below.

1662364_pastedImage_14.png

5. Observe that the Individually added Text component dialog able to respect the "Selected" property but not the sly/cq included Text component

1662366_pastedImage_28.png

1662367_pastedImage_29.png

Observe the Issue : The sly/CQ included component is not able to load the "Selected" property option as the default value

Replies

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

07-01-2019

Hi,

create selected property as String not Boolean.

Highlighted

Avatar

Avatar

Var

Avatar

Var

Var

08-01-2019

Even after changing to String property still same issue.

1662964_pastedImage_0.png

1662980_pastedImage_2.png

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

08-01-2019

Hi,

What version are you using?

I tried in AEM 6.3 and working fine.

Screenshot 2019-01-08 at 10.12.21 PM.png

Screenshot 2019-01-08 at 10.12.35 PM.png

However the values won't be render in page until you submit dialog.

Highlighted

Avatar

Avatar

Var

Avatar

Var

Var

08-01-2019

It is on AEM 6.4

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

08-01-2019

I tested in AEM 6.4, working fine.

Screenshot 2019-01-08 at 11.51.47 PM.png

chrome-capture (1).gif

Highlighted

Avatar

Avatar

Var

Avatar

Var

Var

08-01-2019

Strange, have you included the component by using below sly include .?

<div data-sly-resource="${'par' @ resourceType='/apps/core/wcm/components/text/v2/text'}"></div>

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

08-01-2019

Select field in a component dialog works fine - see this article -- Building Experience Manager Components using Granite/Coral Resource Types

Also - to display the value of a select value in a component - you need to write code  - like this where name of Select field is path (all discussed in the above article):

<div>

<p>This is your AEM HTML Template Language component:</p>

      <h1>${properties.heading}</h1>

       <p>${properties.description}</p>

       <p>The following values are the resource types added to the dialog</p>

      <p><b>Selected Path value:</b> ${properties.path}</p>

       <p>

            <b>Date:</b>

                  ${'yyyy-MM-dd HH:mm:ss.SSSXXX' @ format=properties.startdate, timezone='UTC'}

        </p>

        <p>

            <b>Size:</b> ${properties.size}

        </p>

        <p>

            <b>Checkbox:</b> ${properties.show}

        </p>

</div>

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

08-01-2019

Yes, It is not working when add component directly in HTL.

Though you ca achieve this using javascript.

Highlighted

Avatar

Avatar

Var

Avatar

Var

Var

08-01-2019

Hi smacdonald2008​,

I i stated in the use case steps, it is not working when i am including the component into another component by CQ/Sly include.