firefoxSafari
15 Apr 2010, 5:38 PM
Having worked mostly with the 2.x series of Ext JS, I very much appreciate the ref / autoRef functionality - makes life a lot easier! :D
However, unless I'm missing something, it's slightly less convenient than it could be due to having no way to scope the names on config objects that translate to DOM elements. For example, say I have a Panel subclass called AddressPanel. I want to have two instances of this on the same page, maybe a BillingAddressPanel and a MailingAddressPanel. They'd have fields like addressLine1, etc. Using ref / autoRef, I'm mostly free of having to worry about ID's. But on the server, I need to know which addressLine1 is which if the form gets submitted.
It's not the horrible to subclass them again or change the name attribute before render using the ref. I'm just wondering if there's a better way or if perhaps work is being done for a future version of Ext JS to scope the name attributes in some way (like maybe the name gets generated as MailingAddress_addressLine1 even though I've said name: addressLine1 in the config)?
However, unless I'm missing something, it's slightly less convenient than it could be due to having no way to scope the names on config objects that translate to DOM elements. For example, say I have a Panel subclass called AddressPanel. I want to have two instances of this on the same page, maybe a BillingAddressPanel and a MailingAddressPanel. They'd have fields like addressLine1, etc. Using ref / autoRef, I'm mostly free of having to worry about ID's. But on the server, I need to know which addressLine1 is which if the form gets submitted.
It's not the horrible to subclass them again or change the name attribute before render using the ref. I'm just wondering if there's a better way or if perhaps work is being done for a future version of Ext JS to scope the name attributes in some way (like maybe the name gets generated as MailingAddress_addressLine1 even though I've said name: addressLine1 in the config)?