http://stackoverflow.com/questions/21587049/how-can-i-make-a-new-jcrcontent-node-with-extjs
http://stackoverflow.com/questions/20398657/how-to-add-new-property-to-jcr-node-through-cq-extjs
Important note:
The new property created cannot have a null/empty value - otherwise it will not create the property..
Wednesday, 30 July 2014
Sunday, 27 July 2014
Adobe AEM/CQ - extjs multifield + compositefield with multiple textfields
Suppose we have a form (name: 'formName') with a multifield as follow:
Here is how we can retrieve the value of the first instance of field2:
We can retrieve the items under a component via .items.itemAt[i]
var multifield = new CQ.form.Multifield {
fieldLabel : 'Multiple: ',
orderable : false,
name : 'multifieldExample',
fieldConfig : {
xtype : 'compositefield',
layout: 'form',
items : [{
xtype: 'textfield',
fieldLabel: 'field1: '
}, {
xtype: 'textfield',
fieldLabel: 'field2: '
}]
},
width: 650
}
Here is how we can retrieve the value of the first instance of field2:
formName.getForm().findField('multifieldExample').findByType('compositefield')[0].items.itemAt[1].getValue();
We can retrieve the items under a component via .items.itemAt[i]
Subscribe to:
Comments (Atom)