Hi All,
We have field in page property dialog with xtype=tags. We have build the dialog for both classic & touch ui. This field will allow only one tag to be selected. When we select the tag in classic UI dialog and save, the type is getting saved as String[] for field value (as shown in below screen shot). When we edit the same field through touch ui, then the value is getting saved as String Type (second screen shot). The issue is when the value type is String post saving the values through touch UI, then when we open the dialog in classic UI, the field value is blank and value is not persisting even if we reconfigure the tags as the field type is String. Any suggestion or guidance to resolve in-case if we missed any property to be added would be really appreciated.
Classic UI
Touch UI
Dialog in Classic UI
<articleprimarytag
jcr:primaryType="cq:Widget"
allowBlank="{Boolean}false"
fieldLabel="articleprimarytag"
name="./articleprimarytag"
namespaces="ABC"
xtype="tags">
<listeners
jcr:primaryType="nt:unstructured"
addTag="function(tag,boolean){ var tagName = this.tags[0].tag.name; if(this.tags.length > 1){ this.removeTag(this.tags[this.tags.length-1].tag.tagID); alert(CQ.I18n.getMessage("tagErrorMessage")); } }"/>
</articleprimarytag>
Dialog in Touch UI
<articleprimarytag
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/coral/common/form/tagfield"
fieldLabel="articleprimarytag"
name="./articleprimarytag"
required="{Boolean}true"
rootPath="/etc/tags/abc"/>
Regards,
Satish
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Satis,
The TypeHint might be going as String[], please set the typeHint as string.
Please add below snippet in dialog and try.
<articleprimarytagTypeHint
jcr:primaryType="cq:Widget"
name="./articleprimarytag@TypeHint"
value="String"
xtype="hidden"/>
its worked for me, hope this works for you too.
Thanks!
I recommend putting this into a package and then put into a Google Drive so community members can download and see what is going on. This will help solve this issue.
Views
Replies
Total Likes
Hi Satis,
The TypeHint might be going as String[], please set the typeHint as string.
Please add below snippet in dialog and try.
<articleprimarytagTypeHint
jcr:primaryType="cq:Widget"
name="./articleprimarytag@TypeHint"
value="String"
xtype="hidden"/>
its worked for me, hope this works for you too.
Thanks!