Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Multifield issue in Touch UI

Avatar

Level 4

Hi,

I created one multifield to store value as child nodes, I can enter values in dialog and it's storing in crx.

When i tried to edit component, nothing is there in dialog.

It's showing empty in Touch UI.

Please suggestion some solution for this.

1 Accepted Solution

Avatar

Correct answer by
Level 10

check your retrieve logic in your custom field. Basically its not persisting your value while fetching it

Share your multifield script to check

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

check your retrieve logic in your custom field. Basically its not persisting your value while fetching it

Share your multifield script to check

Avatar

Level 3

Hi Lokesh,

I am facing the same issue as mentioned above. The values are not retained in multifield touch ui dialog.

I have implemented multifield in touch ui with 2 fields "textfield" & "pathbrowse". I am able to provide values on dialog and click save but when I reopen the dialog, values are not shown on dialog. however values are getting stored under /content path.

Below is the dialog.xml for touch ui dialog 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured" jcr:title="Right Section" sling:resourceType="cq/gui/components/authoring/dialog" helpPath="en/cq/current/wcm/default_components.html#Text"> <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns" type="nav"/> <items jcr:primaryType="nt:unstructured"> <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <items jcr:primaryType="nt:unstructured"> <pages jcr:primaryType="nt:unstructured" sling:resourceType="/apps/hmi/components/content/multifield" class="full-width" fieldDescription="Click '+' or 'Add Field' to add a new Links" fieldLabel="Add Links"> <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"> <page jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textfield" fieldDescription="Enter link text" fieldLabel="Link Text" name="./page"/> <path jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/pathbrowser" fieldDescription="Enter Path" fieldLabel="Link &#xa;Path" name="./path" rootPath="/content"/> </items> </column> </items> </field> </pages> </items> </column> </items> </content> </jcr:root>

 

 

Please suggest if we are missing something here. Let me know if further information is required.

Thanks in advance,

Radhika

Avatar

Level 10

Persisting the values with the field would be in your multifield JS file, please post your JS under /apps/hmi/components/content/multifield 

Avatar

Level 3

Hi Lokesh,

We moved our multifield.js at the same location but still its not working. I have attached the js file we are using in our component by saving it as .txt. 

It seems that the current js file which we are using handles the Classic UI only but not the touch dialog.

Please find the js file we are using and the snapshot for apps and content structure.

apps component :

Content node : 

Please suggest if any changes are required.

Thanks for your much appreciated help :)

Radhika