Hi, I am not abel to set defaultValue to xtype tags. Can any of one have idea please help me.
I tried with defaultValue property is not working.
And addTag method is adding tags but iam getting validation error. Please go through attachment.
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Is the xtype in your pic a CQ.Ext.form.ComboBox or a CQ.wcm.ContentFinder.
If you are using a combo box in a custom xtype - you can use code like:
// create the combo instance
var combo = new CQ.Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
lazyRender:true,
mode: 'local',
store: new CQ.Ext.data.ArrayStore({
id: 0,
fields: [
'myId',
'displayText'
],
data: [[1, 'item1'], [2, 'item2']]
}),
valueField: 'myId',
displayField: 'displayText'
});
The Combo Box API has a default value setting to:
[img]Combobox.png[/img]
We have an article on how to use this ComboBox API within a custom xtype:
http://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html
However - there is no such API that maps to an "xtype tag". You can get a value from a combo box in a custom xtype. Then you can use the AEM TagManager API and create a tag based on that value. See these docs:
http://wem.help.adobe.com/enterprise/en_US/10-0/wem/developing/tagging.html
Views
Replies
Total Likes
Is the xtype in your pic a CQ.Ext.form.ComboBox or a CQ.wcm.ContentFinder.
If you are using a combo box in a custom xtype - you can use code like:
// create the combo instance
var combo = new CQ.Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
lazyRender:true,
mode: 'local',
store: new CQ.Ext.data.ArrayStore({
id: 0,
fields: [
'myId',
'displayText'
],
data: [[1, 'item1'], [2, 'item2']]
}),
valueField: 'myId',
displayField: 'displayText'
});
The Combo Box API has a default value setting to:
[img]Combobox.png[/img]
We have an article on how to use this ComboBox API within a custom xtype:
http://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html
However - there is no such API that maps to an "xtype tag". You can get a value from a combo box in a custom xtype. Then you can use the AEM TagManager API and create a tag based on that value. See these docs:
http://wem.help.adobe.com/enterprise/en_US/10-0/wem/developing/tagging.html
Views
Replies
Total Likes