PDA

View Full Version : form and extra data over its fields



alessio77
28 May 2012, 2:04 AM
i need to store temporarily in a form an information about the operation that i'll perform about its data(if i'll perform an insert or an update)
now i store this information within a "hiddenfield" as text.
does the form has a property o something similar to store extra information different to its fields(items)?

if this "space" to store extra data doesn't exist can i create on my own a property o something similar into the "define" block of the form? if yes, how?
thanks

scottmartin
30 May 2012, 1:34 PM
You can create any property you want ...



Ext.create('Ext.form.Panel', {
title: 'Simple Form',
bodyPadding: 5,
mySpecialProp: 'myvalue',
..
});

console.log(panel.mySpecialProp);


Scott.

luisparada
30 May 2012, 5:16 PM
I always add my own properties to the objects, for example


items.push({
id:r.data.id,
text:r.data.descripcion,
imei:r.data.imei
});