-
4 Mar 2011 12:20 PM #1
[CLOSED]Ext IDs
[CLOSED]Ext IDs
Is it possible to make Ext IDs more consistent?
Here's an example:
Code:// Current <div id="ext-gen1013" class="x-window-body x-layout-fit" ... <div id="component-1033" ... // Proposed change <div id="x-gen-1013" class="x-window-body x-layout-fit" ... <div id="x-component-1033" ...
-
4 Mar 2011 12:38 PM #2
-
5 Mar 2011 6:00 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
I wouldn't disable it, not that I use them for anything but debugging.
So my question to the OP is, does it really matter?Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
5 Mar 2011 6:19 AM #4
only important is that they are unique. By DOM explore you know if they are components or where they do belong, nothing more. I see no advantage to have "x-.." instead.
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
5 Mar 2011 11:01 AM #5
Consistent with what?
Component encapsulating elements are given the ID of that Component. That is very useful for debugging,Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
5 Mar 2011 11:22 AM #6
I see that the IDs are now more informative compared to Rel 3, and I like it.
>>> Consistent with what?
The format is not consistent. See the example that I pasted. In one place the ID is prefixed with "ext" and in another place, there's no prefix. The prefix "ext-gen" could be replaced by simply "x-". You can skip the "gen" part. It obvious that this is an Ext-generated ID.
I'd like to have the "x-" prefix (as in class names) for widget IDs. This is a quick visual clue that the ID was generated by Ext. I like class name format better.
-
5 Mar 2011 11:39 AM #7
Another example.
See ext-4.0-pr3/examples/form/anchoring.js
The ID format in this example of these IDs is not consistent:
"ext-gen1032"
"textfield-1017"
"x-form-item-body-ext-gen1038"
These are all Ext generated IDs.
-
5 Mar 2011 1:08 PM #8Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
Can I ask a question again? Does this matter at all?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
5 Mar 2011 1:20 PM #9
The only requirement is that the ID is unique - we could have a random number in place of the ID and this would work.
BUT, a consistent well thought out ID format can at a glance provide more useful information.
Take a look at the Ext class names. They have a consistent format and are informative.
-
5 Mar 2011 1:21 PM #10Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
Ok... when do you use the IDs of the DOM elements?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[CLOSED] Popup menu doesn't show after flash component closed
By Sesshomurai in forum Ext 3.x: BugsReplies: 3Last Post: 16 Aug 2009, 11:37 AM


Reply With Quote