-
25 Jun 2012 6:29 AM #1
Same linked instances looking different
Same linked instances looking different
Architect Build tested:
- Build: 442
- ExtJS 4.x
- I have a FieldContainer with two numeric fields, configured to hide triggers.
When creating two linked instances of this FieldContainer, one looks ok and the other
shows the triggers.
- Create FieldContainer
- Add two instances of the FieldContainer to the same panel. Looks good on the design window.
- Preview it in the browser.
PhonesOK.png
The result that occurs instead:
PhonesNOK.png
Operating System:- Windows 7 Professional
Code:Ext.define('PBAS.view.PhoneFields', { extend: 'Ext.form.FieldContainer', alias: 'widget.phonefields', height: 65, width: 292, layout: { padding: 5, type: 'hbox' }, initComponent: function() { var me = this; Ext.applyIf(me, { items: [ { xtype: 'numberfield', id: 'phoneField', padding: 5, width: 185, fieldLabel: 'Number', labelWidth: 40, enforceMaxLength: true, maxLength: 10, hideTrigger: true, repeatTriggerClick: false, keyNavEnabled: false, mouseWheelEnabled: false, spinDownEnabled: false, spinUpEnabled: false, allowDecimals: false, autoStripChars: true }, { xtype: 'numberfield', id: 'extField', padding: 5, width: 80, fieldLabel: 'Ext', labelWidth: 20, enforceMaxLength: true, maxLength: 4, hideTrigger: true, repeatTriggerClick: false, keyNavEnabled: false, mouseWheelEnabled: false, spinDownEnabled: false, spinUpEnabled: false, allowDecimals: false } ] }); me.callParent(arguments); } });
-
22 Jan 2013 10:27 AM #2
You cannot use an 'id' in a component that will have multiple instances.
id's are global. Since you have put it into the child you cannot use this component more than once.
You should use itemId's when your identifiers need to be unique to a component/container.Aaron Conran
@aconran
Sencha Architect Development Team
You found a bug! We've classified it as
DSGNR-2051
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote