Expand my Community achievements bar.

Multified dropdown in page properties

Avatar

Level 2

Hi All,

We are using dropdown as multifield in page properties. When the page properties are  opened and dropdown values are selected and saved, they are stored in jcr as String array but when the page properties are opened, the selected values are not rendered and shows multifield dropdown as never edited.

Single dropdowns works fine.

Help Appreciated !!

Thanks

13 Replies

Avatar

Level 2

Could you please provide us with the dialog of your page?

Avatar

Administrator

Package can be download from the article itself.



Kautuk Sahni

Avatar

Level 2

Please find the part of the xml which renders multifield dropdown.

The same xml is used across component level and works fine. The configuration is stored node wise and renders correctly on opening the dialog but when used for page properties level, stores the configuration as string array and doesn't show anything on opening the dialog.

<fields

                                cq:showOnCreate="{Boolean}true"

                                jcr:primaryType="nt:unstructured"

                                sling:resourceType="granite/ui/components/foundation/form/multifield"

                                eaem-nested=""

                                class="full-width"

                                fieldDescription="Click '+' to add a new field"

                                fieldLabel="Resource Categories">

                                <field

                                    jcr:primaryType="nt:unstructured"

                                    sling:resourceType="granite/ui/components/foundation/form/fieldset"

                                    name="./items">

                                    <layout

                                        jcr:primaryType="nt:unstructured"

                                        sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"

                                        method="absolute"/>

                                    <items jcr:primaryType="nt:unstructured">

                                        <column

                                            jcr:primaryType="nt:unstructured"

                                            sling:resourceType="granite/ui/components/foundation/container">

                                            <items jcr:primaryType="nt:unstructured">

                                                <categories

                                                    cq:showOnCreate="{Boolean}true"

                                                    jcr:primaryType="nt:unstructured"

                                                    sling:resourceType="granite/ui/components/foundation/form/select"

                                                    fieldDescription="Select Resource Categories"

                                                    fieldLabel="Category"

                                                    name="./resourceCategory">

                                                    <datasource

                                                        jcr:primaryType="nt:unstructured"

                                                        sling:resourceType="abc/components/content/featuredContent/dataSource/FeaturedCategories"

                                                        addNone="{Boolean}true"/>

                                                </categories>

                                            </items>

                                        </column>

                                    </items>

                                </field>

                            </fields>

Avatar

Level 2

I see you're using this eaem-nested property, probably from this link? Experiencing Adobe Experience Manager - Day CQ: AEM 62 - Touch UI Nested ( Multi-Multi ) Composite M... 

Please note that when trying to save this, you do need that specific javascript file available. I don't think that you have that one available when you edit the page properties, but I could be mistaken.

Avatar

Level 2

It is available as we are using the multifield dropdown or any combination of fields at component level and those work fine.

Avatar

Level 2

Are you trying to edit the properties in the editor or in the UI you get when you select the page in the sites.html/content/... and click on edit properties?

Avatar

Level 2

Its both the ways. While creating the page and editing the page property after a page is created.

Avatar

Level 2

Yes I can understand that, but that was not what I asked. I asked if you're editing the properties via the editor.html or via the sites.html UI

Avatar

Level 2

Though I go from editor.html or sites.html, it opens : /mnt/overlay/wcm/core/content/sites/properties.html?item=pagePath.

Avatar

Community Advisor

HI,

Can you try switching to Coral UI 3 based resources. If you are using the same, remove eaem-nested property.

  • By this way, content that we author will get saved in the form of nodes (item0 to itemn - depending on how many sets we author) - both at individual component level or when used as part of Page properties.
  • Also, opening Page properties again will retain the values previously authored.

Avatar

Level 2

Properties at jcr:content doesn't get stored in form of items as it does at component level. it is storing as String array and could not read the values back from it.

Avatar

Community Advisor

HI,

Is this the case with Coral UI 3 multifield as well? Can you please post some screenshots of jcr:content node, highlighting the string array value.