View Full Version : Documentation Bugs - Ext 2.x
Trixor
4 Mar 2008, 10:34 PM
Hello,
If you could add to the documentation that if you want an exact match you need
to create your own RegExp object.
Store.find('id', new RegExp('^'+value+'$'));
Thank You
dyndan
5 Mar 2008, 3:09 AM
The API claims Ext.encode and Ext.decode would return void, but in fact they do not.
See API Doc Class Ext.util.JSON or JSON.js.
dyndan
mystix
5 Mar 2008, 5:49 AM
Hello,
If you could add to the documentation that if you want an exact match you need
to create your own RegExp object.
Store.find('id', new RegExp('^'+value+'$'));
Thank You
that's incorrect.
the RegExp as stated in the docs can either be a full RegExp (as in your example) or a plain old regular expression i.e.
/^value$/
p.s. regular expressions were made for pattern matching, be it partial / complete. wouldn't it be odd to state the obvious? :-?
vilivili
6 Mar 2008, 1:37 AM
Ext.Ajax Public Properties - method:
...if not set but _parms_ are present...
params maybe?
asteidle
8 Mar 2008, 6:00 PM
The current API doc for the ColumnModel css config option reads:
"(optional) Set custom CSS for all table cells in the column (excluding headers). Defaults to undefined."
I would suggest to extend the API doc with an example like this:
css:'color:green;font-weight:bold;'
If you don't have a ; at the end the last definition is dropped and it screws up the column widths of of the entire table and you have no clue why. In normal CSS a ; at the end is optional and may be it should be here as well.
Also the setRenderer() metadata.css requires a CSS class name where as here style definitions are expected - a bit confusing.
Condor
11 Mar 2008, 6:18 AM
You don't really need sample code, just a more detailed explanation:
Ext.Panel defines beforeclose and close events, but doesn't use them.
Only it's descendant Ext.Window actually uses beforeclose and close events.
So why are beforeclose and close defined in Ext.Panel instead of Ext.Window?
Several Ext JS beginners have tried using the beforeclose and/or close events on panels with closable:true in a tabpanel. But tabpanel doesn't close panels, it removes them (so only the beforeremove and remove events of tabpanel are fired).
ps. The TabPanel API doc also doesn't mention the closable config option.
Trixor
12 Mar 2008, 12:28 PM
Hi,
I was wondering if it was possible to enhance the documentation at maxLength to point out that if you want to limit the characters entered to use config option:
autoCreate : {tag: "input", type: "text", size: "20", maxlength: "20", autocomplete: "off"}
This config option will not display a warning message when you exceed the length, but add maxlength=20 to the HTML input tag, which stops character input beyond 20 characters.
Thanks,
Trixor
mknopp
12 Mar 2008, 9:56 PM
jgarcia, no, you have been very professional, and the commentor that upset me I have worked it out with. It was a misunderstanding, partly fueled by my frustration.
I do want to to point out one thing though. I have seen in several, several post here comments along the lines of "professional programmers". Well, no offense, but that right there might be part of the problem.
Not everyone on this board, nor everyone using ExtJS is a professional programmer. In fact, the people who are very likely to be drawn to this framework are likely to not be professional programmers.
So, try to keep in mind that some, if not many, of the people coming here asking questions that infuriate any "real" programmer might be asked by a person who is not a programmer by trade. They might simply be some kid trying to learn or even an adult who is artistically inclined instead of mathematically inclined and is here specifically because a framework is supposed to remove some of the complexity.
Oh, and also keep in mind that some people might be like me. I am not a fulltime web designer, and do not want to be. I have my day job, and I have this side job. I do not have the time to dig through every line of code in the framework to figure something out. And honestly, if that is expected, what is really gained by the framework?
That is in some ways like expecting someone to dig through the source code for the write command in javascript to figure it out. It is absurd. The entire point of OO programming is to remove the internal workings from the concern of the end user, at least properly created objects.
IE, I shouldn't have to know how Ext.get() works to use it. (By the way, this is a perfect example of how I would like to see all of the entries in the doc be. With a few simple examples of how to form the usage.)
Why am I saying nearly the same thing again? Because it was absurdly hard to figure out how to use MixedCollection.replace().
replace( String key, [o {Object}] ) : Object
Replaces an item in the collection. Fires the replace event when complete.
Parameters:
key : String
The key associated with the item to replace, or the item to replace.
{Object} : o
o (optional) If the first parameter passed was a key, the item to associate with that key.
Returns:
Object
The new item.
This is to me a prime example of what is wrong with the doc. This is very non-intuitive in its use. Replace is a method on a MixedCollection. It replaces an item in that collection. So, I would expect it to take at a minimum two arguements, a key or id of the item to replace, and an item to be inserted. Instead, I get this single required variable, which I wasn't really sure if the arguement was the old item or the new item. And even if I could figure out which was which how did it know the other?
What should have been a simple function to use, and what should have taken me no more then a few minutes to implement. Lead to hours or digging through the learning section, trying to search the forums, digging through tons or internal code (which is a real sign that your framework documentation has issues) just to figure out what went where.
I think that this illustrates the many instances in the documentation that frustrate new people to Ext. And it is made even worse when a dozen or so methods before it getKey is a perfect example of what it should have been. Well documented and explained in detail with a few brief examples of layout and usage.
I think that I am up to six cents now. Two cents at a time.
P.S.: Keep in mind that most people posting criticisms do want this framework to succeed. If they didn't I doubt they would be wasting their time posting here.
Animal
13 Mar 2008, 12:34 AM
OK, MixedCollection::add now has
/**
* Adds an item to the collection. Fires the {@link #add} event when complete.
* @param {String} key <p>The key to associate with the item, or the new item.</p>
* <p>If you supplied a {@link #getKey) implementation for this MixedCollection, or if the key
* of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
* will be able to <i>derive</i> the key for the new item. In this case just pass the new item in
* this parameter</p>
* @param {Object} o The item to add.
* @return {Object} The item added.
*/
And replace has
/**
* Replaces an item in the collection. Fires the {@link #replace} event when complete.
* @param {String} key <p>The key associated with the item to replace, or the replacement item.</p>
* <p>If you supplied a {@link #getKey) implementation for this MixedCollection, or if the key
* of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
* will be able to <i>derive</i> the key of the replacement item. If you want to replace an item
* with one having the same key value, then just pass the replacement item in this parameter.</p>
* @param o {Object} o (optional) If the first parameter passed was a key, the item to associate
* with that key.
* @return {Object} The new item.
*/
This kind of positive feedback from someone who's got their hands dirty, and found a gap in the docs is very useful and helpful. It helps us volunteer documenters to plug gaps, which hopefully will increase the signal:noise ratio here!
vmorale4
13 Mar 2008, 3:25 PM
Ext.Panel
tools should appear under public properties link (http://extjs.com/forum/showthread.php?t=28498)
J.C. Bize
14 Mar 2008, 4:56 PM
The third sample for the ghost() method of Ext.Fx is missing a comma after "duration: .5":
// common config options shown with default values
el.ghost('b', {
easing: 'easeOut',
duration: .5
remove: false,
useDisplay: false
});
Cheers,
JC
Gordon76
16 Mar 2008, 4:42 AM
In http://extjs.com/deploy/dev/docs/?class=Ext.grid.ColumnModel there is several references to Ext.grid.Grid.autoExpandColumn, where it should be Ext.grid.GridPanel.autoExpandColumn.
jay@moduscreate.com
22 Mar 2008, 5:57 PM
Accordion example missing " , " after layoutConfig.
var accordion = new Ext.Panel({
title: 'Accordion Layout',
layout:'accordion',
defaults: {
// applied to each contained panel
bodyStyle: 'padding:15px'
},
layoutConfig: {
// layout-specific configs go here
titleCollapse: false,
animate: true,
activeOnTop: true
}
items: [{
title: 'Panel 1',
html: '<p>Panel content!</p>'
},{
title: 'Panel 2',
html: '<p>Panel content!</p>'
},{
title: 'Panel 3',
html: '<p>Panel content!</p>'
}]
});
mystix
22 Mar 2008, 8:22 PM
Accordion example missing " , " after layoutConfig.
strange, i fixed that in december (svn 1499).
are you on an old copy?
jay@moduscreate.com
23 Mar 2008, 4:30 AM
Apparently I am. Long story short, I downloaded 2.0.2 on 2/25/08 ~ 9PM. Must have been 2.0 ??
I never thought to look at the changes.txt Sorry about the error.
http://tdg-i.com/img/screencasts/2008-03-23_0827.png
mystix
23 Mar 2008, 10:01 PM
Apparently I am. Long story short, I downloaded 2.0.2 on 2/25/08 ~ 9PM. Must have been 2.0 ??
I never thought to look at the changes.txt Sorry about the error.
extremely off-topic, but... what screen capture software are you using?
i really like the stylised arrows / boxes / what-nots... :-?
jay@moduscreate.com
24 Mar 2008, 8:06 AM
:)
http://www.jingproject.com/faq.asp
What i love:
- snapshot easily
- does videos with voice/audio
- free
- can edit photos (like two posts above)
- can/does ftp to your own host with extreme ease.
- simple to use.
- saves a copy on your HDD for reposting.
- Windows && Mac
- compresses videos down to nice size
- videos are all contained SWF objects
What i dislike:
- videos are limited to 5 minutes. :(
- cannot edit videos.
- screen selection can be a bit quirky
- cannot export videos
- cannot export movies
As you can tell, i the hell out of it - bot at home and work.
mystix
24 Mar 2008, 8:11 AM
http://www.jingproject.com/faq.asp
d'oh!!! i've been using it all along for screencasts... never knew there was a screen capture function. :">
and here i was thinking i should go get a Mac... :-?
jay@moduscreate.com
24 Mar 2008, 8:42 AM
you should anyway ;)
vmorale4
24 Mar 2008, 1:15 PM
Component:
Ext.form.BasicForm
The erroreader config documentation states:
An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to read data when reading validation errors on "submit" actions. This is completely optional as there is built-in support for processing JSON.
However I could not find anywhere in the API docs what this built-in format looks like. After searching the forums, I found out that it should look like this:
{
success:false|true,
errors: {
fieldname: "error description"
}
}
link (http://extjs.com/forum/showthread.php?p=127376#post127376)
Update: The documentation also mentions that there is built-in support for loading data from a JSON object, however the format for this object is not specified either...
vmorale4
25 Mar 2008, 8:45 AM
document reflect that if there is a transmission error only then failure handler would be invoked.
In my case my failure handler is invoked if I return:
{'success' : false, errors : { 'myreason' : 'This is my reason'}}
-------------------
There is a problem with this documentation. I have got it verified from an Ext guru ('saki') in this thread : http://extjs.com/forum/showthread.php?t=27337
I have also verified this, and the failure handler gets invoked for for both transmission errors and form field errors.
Slightly OT, are there any plans to set a public bug database for documentation errors? (kind of similar to YUI). Sometimes is hard to keep track if a bug has been reported before in this forum.
Trixor
25 Mar 2008, 11:26 AM
The documentation does not contain the url config option that is passed on to Ext.form.BasicForm.
Thanks,
Trixor
mystix
25 Mar 2008, 10:05 PM
The documentation does not contain the url config option that is passed on to Ext.form.BasicForm.
Thanks,
Trixor
but right at the top of the Ext.form.FormPanel docs it says in bold
Although they are not listed, this class also accepts all the config options required to configure its internal Ext.form.BasicForm
:-?
dcesarnascimento
27 Mar 2008, 1:21 AM
Hi, the documentation for XmlReader (Extjs 2.0) gives the following example for xml file:
<?xml?>
<dataset>
<results>2</results>
<row>
<id>1</id>
<name>Bill</name>
<occupation>Gardener</occupation>
</row>
<row>
<id>2</id>
<name>Ben</name>
<occupation>Horticulturalist</occupation>
</row>
</dataset>
But, according to my Firebug, this makes my XmlHttpRequest.responseXML have a lot of parser error and my grid doesnt show my data.
I figured out that if I specify the XML header my XmlHttpRequest.responseXML is builden correctly.
So, the code:
<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<results>2</results>
<row>
<id>1</id>
<name>Bill</name>
<occupation>Gardener</occupation>
</row>
<row>
<id>2</id>
<name>Ben</name>
<occupation>Horticulturalist</occupation>
</row>
</dataset>
works.
If the XML header is really needed, so I think it is a case to change the documentation example.
mystix
27 Mar 2008, 1:53 AM
<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<results>2</results>
<row>
<id>1</id>
<name>Bill</name>
<occupation>Gardener</occupation>
</row>
<row>
<id>2</id>
<name>Ben</name>
<occupation>Horticulturalist</occupation>
</row>
</dataset>
Fixed in SVN.
JorisA
29 Mar 2008, 5:45 AM
The documentation for Class Ext.form.ComboBox's displayField and valueField is not 100% clear:
displayField : String
The underlying data field name to bind to this ComboBox (defaults to undefined if mode = 'remote' or 'text' if transforming a select)
The default value for mode=local is not specified (rather than transforming a select)
vcastel
31 Mar 2008, 4:30 AM
typo :
in Class Ext.dd.DD
in Class Ext.tree.TreeDragZone
in Class Ext.dd.DDProxy
in Class Ext.dd.DragSource
scroll : boolean
When set to true, the utility automatically tries to scroll the browser window wehn a drag and drop element is dragged near the viewport boundary. Defaults to true.
Condor
31 Mar 2008, 9:51 PM
Ext.tree.TreeSorter:
The sortType function has a single parameter: node (the text suggests the value of 'property')
brian.moeskau
31 Mar 2008, 10:48 PM
Ext.tree.TreeSorter:
The sortType function has a single parameter: node (the text suggests the value of 'property')
I updated the docs for several configs and also added a usage example. Thanks.
ziesemer
2 Apr 2008, 1:42 PM
http://extjs.com/deploy/dev/docs/output/Ext.DomHelper.html seems to lack a bit of usage/detail, instead deferring to:
For more information and examples, see the original blog post (http://www.jackslocum.com/blog/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/).
The link to http://www.jackslocum.com/blog/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/ is no longer valid, returning a 404.
Fortunately, the WayBackMachine has an archive copy as of 2007-08-21, but it's REALLY slow: http://web.archive.org/web/20070821114803/http://www.jackslocum.com/blog/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/
aptana_michelle
3 Apr 2008, 11:21 AM
Hi,
This is Michelle from the Aptana team. We'd like to be able to include the API docs in our bundled version of EXT 2.0.2. We've noticed that the version of the API docs currently included in the .zip file download doesn't run locally, so we can't easily just drop this into our plug-in.
If you try to run the downloaded version locally in Firefox, you get the following error:
"Error: Ext.isArray is not a function"
The browsable, online version seems to run fine. Can we either get an updated version of the download package, or can someone help us get this working locally?
Thanks!
--Michelle
mdkalman
3 Apr 2008, 11:30 AM
Third sentence:
...an otional rendering function
http://extjs.com/deploy/dev/docs/output/Ext.grid.ColumnModel.html
battisti
4 Apr 2008, 6:36 AM
In the Ext.PagingToolbar http://extjs.com/deploy/dev/docs/?class=Ext.PagingToolbar
int the propertie
afterPageText : String
Customizable piece of the default paging text (defaults to "of %0")
I think it's better
afterPageText : String
Customizable piece of the default paging text (defaults to "of {0}")
because using the sample of manual dont work
brian.moeskau
4 Apr 2008, 12:19 PM
@aptana_michelle: The Ext.isArray error is probably just because you have a cached version of Ext that does not include that function (added in 2.0.2). Hard-refresh should fix that assuming you are using the latest lib. The broader issue is that the docs currently rely on XHR (both to load from JSON fragments and also to search against our server DB). Since I don't know much about how your doc plugins work, I'm not sure what the answer is for you. If you'd like to email me we can discuss it directly (brian@extjs.com).
stoober
5 Apr 2008, 12:11 PM
Hi,
This is Michelle from the Aptana team. We'd like to be able to include the API docs in our bundled version of EXT 2.0.2. We've noticed that the version of the API docs currently included in the .zip file download doesn't run locally, so we can't easily just drop this into our plug-in.
If you try to run the downloaded version locally in Firefox, you get the following error:
"Error: Ext.isArray is not a function"
The browsable, online version seems to run fine. Can we either get an updated version of the download package, or can someone help us get this working locally?
Thanks!
--Michelle
Michelle
I noticed Aptana 1.1.5 includes ExtJS 2.0.2 but the help doesn't work. I take it this is what you are referring to.
In the jar file, the file ext-base.js in folder \docs\adapter\ext is the version 2.0 file rather than version 2.0.2 file. If you change it to the correct file (which is in the jar in folder \libraries\lib\ext\adapter) the help works.
Hope this helps, I think Aptana Studio is great!
Regards,
Stuart
Using valueNotFoundText with a ComboBox leads to the field being validated as valid when the valueNotFoundText is displayed.
http://extjs.com/forum/showthread.php?p=149798#post149798
Add something like...
"When the valueNotFoundText is displayed the field will validate as true."
Secondly, with the method:
markInvalid( String msg ) : void
Maybe there should be a note to say that "msg" is optional, if you leave it out the default message (this.invalidText) gets displayed.
Max
brian.moeskau
8 Apr 2008, 9:04 AM
Using valueNotFoundText with a ComboBox leads to the field being validated as valid when the valueNotFoundText is displayed...
Secondly, with the method: markInvalid( String msg ) : void
Maybe there should be a note to say that "msg" is optional...
Both updated in SVN
dotnetCarpenter
9 Apr 2008, 4:37 AM
If a proxy is used (e.g. Ext.data.HttpProxy) for a Ext.data.Store and the URL is set through the "conn" property, the Ext.Ajax.request method won't find the URL even though it's specified. This is because the code looks for an URL property in the proxy object and not in the proxy object conn property.
Even though its not in the documentation you have to specify a URL for the proxy object. In fact all the config options that are listed for the Ext.data.Connection class also applies for the Ext.data.HttpProxy! At least when used for an Ext.data.Store.
Is this a documentation error or is there in fact a bug where the proxy object is used instead of the connection object?
Anyway, my experience with the AJAX part of Ext tells me that some sort of unite testing is in order.
I have attached a snap-shot of the store Object Model that unveils something might be a bit off. A side effect to the confusion is that the auto detection of POST/GET method when parameters is detected doesn't work. The code below will always trigger a GET request.
Here is the test-code:
var store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
conn: {
params: Ext.encode({ locationid: EventManager.LocationGrid.LocationId }),
callback: function(options, success, response){
alert(success);
}
},
url: 'LocationService.asmx/GetEvents',
disableCaching: false
}),
reader: new Ext.data.JsonReader({
'metaData': {
root: 'event',
id: 'BookingId',
fields: [
{name: 'CustomerName'},
{name: 'CustomerContactName'},
{name: 'EventName'},
{name: 'From'},
{name: 'To'},
{name: 'EventStatus'}
]
}
})
});
____________________________________________
According to the docs the Ext.data.HttpProxy takes either a connection object or a option object as described in the Exe.Ajax.request method.
The Ext.data.HttpProxy constructor
conn : Object
an Ext.data.Connection object, or options parameter to Ext.Ajax.request. If an options parameter is passed, the singleton Ext.Ajax object will be used to make the request.
The Exe.Ajax.request "option" parameter
options : Object
An object which may contain the following properties:
url : String (Optional)
The URL to which to send the request. Defaults to configured URL
params : Object/String/Function (Optional)
An object containing properties which are used as parameters to the request, a url encoded string or a function to call to get either.
method : String (Optional)
The HTTP method to use for the request. Defaults to the configured method, or if no method was configured, "GET" if no parameters are being sent, and "POST" if parameters are being sent. Note that the method name is case-sensitive and should be all caps.
callback : Function (Optional)
The function to be called upon receipt of the HTTP response. The callback is called regardless of success or failure and is passed the following parameters:
options : Object
The parameter to the request call.
success : Boolean
True if the request succeeded.
response : Object
The XMLHttpRequest object containing the response data. See http://www.w3.org/TR/XMLHttpRequest/ for details about accessing elements of the response.
I should be able to use an option parameter in the proxy constructor like this:
var store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'LocationService.asmx/GetEvents',
disableCaching: false,
method: 'POST',
params: function(){
return Ext.encode({ locationid: EventManager.LocationGrid.LocationId })
},
callback: function(options, success, response){
alert(success);
}
})...
However, when I call the load method on the store object the only options that's honored is the ones you put as argument.
Granted the HttpProxy objects conn property is correct. That is, that everything in the above code is there but this is only used for some parts of the request. The params property is overwritten by a default empty params object by the Ext.data.Store load method. One could call the proxy load method directly but then you would have specify all the arguments (params, reader, callback, scope, arg).
_______________________________________________
The conclusion is that you can specify everything from the Ext.Ajax.request "option" parameter in Ext.data.DataProxy (or one of the inherit classes), except params and callback which are overwritten when you call load.
jburnhams
16 Apr 2008, 5:31 AM
ColumnModel->getDataIndex( Number col ) : Number
The docs list the above method as returning a number, but it actually returns a String (the name of the field in the store)
ziesemer
16 Apr 2008, 6:43 PM
From http://extjs.com/forum/showthread.php?t=32402, ComboBox's "hiddenName" field is documented as "defaults to the underlying DOM element's name".
However, looking at the source in Combo.js, this only happens if the "transform" config option is used.
Also, please don't miss my previous post about the blog link in DomQuery.
Animal
17 Apr 2008, 2:53 AM
Re the HttpProxy thing. conn is not a valid config option for HttpProxy.
The conclusion is that you can specify everything from the Ext.Ajax.request "option" parameter in Ext.data.DataProxy (or one of the inherit classes), except params and callback which are overwritten when you call load.
Yes, this is true. I will update the docs for 3.0
This has been highlighted in the following thread:
http://extjs.com/forum/showthread.php?t=32619
If you set resizeTabs:true then tabs with a title longer than the minTabWidth or default tab width will be cropped, even if they are the only tab open.
The docs state:
True to automatically resize each tab so that the tabs will completely fill the tab strip
I assumed that this meant the tab width would stretch to fill the tab strip. Basically all this setting appears to do is set all tab widths to the minTabWidth.
vmorale4
21 Apr 2008, 3:58 AM
It looks like the 2.1 Air documentation download (http://extjs.com/products/extjs/download.php?dl=extjs21-docs) was not updated correctly.
Additional Resources does point to the new Ext 2.1 examples, but the API documentation is still for 2.0.2 (as far as I can tell). For example:
- the title of the Page says 'Ext 2.0.2 API documentation'
- The documentation for StatusBar is missing (It exists in the online version)
mystix
21 Apr 2008, 8:13 AM
It looks like the 2.1 Air documentation download (http://extjs.com/products/extjs/download.php?dl=extjs21-docs) was not updated correctly.
Additional Resources does point to the new Ext 2.1 examples, but the API documentation is still for 2.0.2 (as far as I can tell). For example:
- the title of the Page says 'Ext 2.0.2 API documentation'
- The documentation for StatusBar is missing (It exists in the online version)
replied in another thread:
it's definitely been updated, though the main title's somehow wrong.
for example, i added an additional line to the Date docs for the 'c' format (addition in red) just 1.5 days ago:
c ISO 8601 date 2007-04-17T15:19:21+08:00 or
2007-04-17T15:19:21Z
the StatusBar docs were only added to the doc's TreePanel post SVN rev 2042 unfortunately, so they'll only appear to non-subscribers in the next release.
keckeroo
22 Apr 2008, 8:33 AM
'formBind' config of buttons - API search returns 'not found'
Is it ok to bring this to your attention ? I have quite a few 'missing' config options which appear in examples but are not found using the api search feature ...
Kevin
NoahK17
22 Apr 2008, 9:32 AM
Minor Bug: Panel -> LayoutConfig -> Ext.layout.Absolute links to the wrong page. It tries to load "Absolute", when it should be trying to load "AbsoluteLayout"
Cheers!
jay@moduscreate.com
23 Apr 2008, 11:47 AM
this may be minor, but i thought i'd just report.
http://tdg-i.com/img/screencasts/2008-04-23_1545.png
jay@moduscreate.com
23 Apr 2008, 11:48 AM
Also, can we have consistent verbiage - examples or samples? I prefer examples ;)
keckeroo
23 Apr 2008, 11:56 AM
It took me over 2 hours of trying different config values to stumble across the revelation ...
Ext.form.ComboBox
Config Options:
mode : String
Set to 'local' if the ComboBox loads local data (defaults to 'remote' which loads from the server) Note that if you are binding your ComboBox to a store which uses a dataProxy, 'remote' mode will not load the stores data until the ComboBox receives focus whereas 'local' mode will populate the ComboBox from the stores data immediately.
[my comments]
Of course - I may be totally incorrect in what's really happening - but this is what it looks like to the casual/novice observer. I realize that it appears ComboBox can query a server directly using SQL parameters, and it appears that is the reason for the 'remote' value. But since it also appears to affect the workings of the loading of store data I feel this important to convey to the user.
My 'cascading' combo box now works perfectly and I will post an example shortly
Thanks
jay@moduscreate.com
23 Apr 2008, 12:15 PM
Ext.menu.BaseItem,
Please change:
handler : Function
A function that will handle the click event of this menu item (defaults to undefined)
to
handler : Function
A function that will handle the click event of this menu item (defaults to undefined). Calls function with (menuItem item, Event e);
The accordion example is contradictory to the docs for example:
layoutConfig: {
// layout-specific configs go here
titleCollapse: false,
animate: true,
activeOnTop: true
},
Then the description of activeOnTop:
This is NOT compatible with "animate:true"
Why have animate: true in the example then? :-?
rmesser
6 May 2008, 3:33 PM
The docs for Ext.grid.GroupingView say you can provide a groupRenderer function in the config options. But this isn't true -- you have to add the groupRenderer function in the Ext.grid.ColumnModel config, for the column that is used for grouping.
Class Ext.Template
There is a link to a blog post with examples.
For more information see this blog post with examples: DomHelper - Create Elements using DOM, HTML fragments and Templates.
The link is broken.
Answerfor
12 May 2008, 2:42 AM
Ext.Template
...
For more information see this blog post with examples: : <a href="http://www.jackslocum.com/blog/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">DomHelper - Create Elements using DOM, HTML fragments and Templates</a>.
...
on this link ->
"Not Found
Sorry, but you are looking for something that isn't here."
mrileyaz
14 May 2008, 8:27 AM
Hello,
While working with Ext.MessageBox I noticed a difference between the sample code (http://extjs.com/deploy/dev/examples/message-box/msg-box.js) and the documentation (http://extjs.com/deploy/dev/docs/output/Ext.MessageBox.html). The sample uses
pic_Nick
15 May 2008, 4:00 AM
Ext.grid.ColumnModel.isFixed()
In the docs there is no arguments for this function, but actually there is colIndex.
brian.moeskau
15 May 2008, 1:51 PM
[QUOTE=mrileyaz;167985]Hello,
While working with Ext.MessageBox I noticed a difference between the sample code (http://extjs.com/deploy/dev/examples/message-box/msg-box.js) and the documentation (http://extjs.com/deploy/dev/docs/output/Ext.MessageBox.html). The sample uses
AdamDawes
16 May 2008, 2:12 AM
I think this is a minor omission from the documentation which I know I would have found useful had I realised it could be done. (Either that or I'm using something I shouldn't be using...)
The NumberField's decimalPrecision option states quite correctly that it controls the decimal precision of the field, defaulting to 2. However it omits to mention that this can be set to -1, which then provides a non-fixed decimal precision (so the field will happily take the values "1", "1.1", "1.11111" etc.)
(Apologies if this has already been mentioned elsewhere, I tried searching for it but the forum software wouldn't let me search for "-1" as it requires each search word to be three characters or longer)
cdomigan
19 May 2008, 3:20 PM
In Ext.Window, the constrain config should say something like:
True to constrain the window to its container, false to allow it to fall outside of its container (defaults to false). The window's container defaults to viewport but can be manually set using renderTo. Optionally the header only can be constrained using constrainHeader.
Chris
Ext.grid.ColumnModel
The width config option has a reference to Ext.grid.GridPanel.autoSizeColumns which is deprecated. I think the description needs to be updated to refer to the various viewConfig options ... or maybe just 'forceFit'.
The description of a "field definition object" in the create method of Ext.data.Record is well written and contains everything you need to know about constructing fields for a record. The problem is that it isn't immediately obvious where this description is stored.
To make it easier to find and to make the docs clearer, I think it would be valuable to add a link to this description in the following places where the phrase "field definition object" is used:
Top level description of Ext.data.Record
fields method of Ext.data.JsonStore
fields method of Ext.data.SimpleStore
SamuraiJack1
22 May 2008, 8:15 AM
Hi everyone.
Well, browsing the forum, I've noticed that it is totally messed. There is only 3 variants where to post your topic (kinda bug or help or extension) and everyone post anything in the same place. The only way to extract something is to make search and manually check every result
I suggest to create several additional subforums in "Help" branch for different kinds of problems. (Kinda "layouts", "effects", "forms" and so on). Also suggest to elect moderator for each branch (or for whole "Help" branch).
RFC
plan-r
26 May 2008, 12:42 AM
Hi,
I'm trying to learn from the samples provided withthe download of ExtJs 2.1.
There I can find the "simple tasks" app in the samples dir /examples/tasks/ (web based version, not air).
In line 133 of "tasks.js" there is a config-option "templates" for the GroupingView, which seems not to be documented, I searched through the forums and the API docs (online and air version) several times...but the documentation for that is missing...
Lines 128 - 135 of "tasks.js":
view: new Ext.grid.GroupingView({
forceFit:true,
ignoreAdd: true,
emptyText: 'No Tasks to display',
templates: {
header: headerTpl,
},
(the "headerTpl" is declared some lines above this code)
What does the config option "templates" do? Can I only define the header of the GroupingView or are there even more options?
Thanks!
mjlecomte
26 May 2008, 4:48 AM
Looking at the source, it looks like groupingView initTemplates calls gridView initTemplates (around 29860 of ext-all-debug).
From there it looks like there are several properties (configs) you could specify for templates including:
master
header
hcell
body
row
cell
Might be nice if that were in the docs.
Hi,
I'm trying to learn from the samples provided withthe download of ExtJs 2.1.
There I can find the "simple tasks" app in the samples dir /examples/tasks/ (web based version, not air).
In line 133 of "tasks.js" there is a config-option "templates" for the GroupingView, which seems not to be documented, I searched through the forums and the API docs (online and air version) several times...but the documentation for that is missing...
Lines 128 - 135 of "tasks.js":
view: new Ext.grid.GroupingView({
forceFit:true,
ignoreAdd: true,
emptyText: 'No Tasks to display',
templates: {
header: headerTpl,
},
(the "headerTpl" is declared some lines above this code)
What does the config option "templates" do? Can I only define the header of the GroupingView or are there even more options?
Thanks!
plan-r
26 May 2008, 5:01 AM
mjlecomte, yes, cause this is a good functionality it would be interesting for many users of extjs.
nbourdeau
29 May 2008, 7:22 AM
checkHandler is listed in the methods but should be in the config options.
devnull
29 May 2008, 9:12 AM
API documentation for Ext.state.Manager has not been updated for Ext2.
// in your initialization function
init : function(){
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
...
// supposed you have a "Ext.BorderLayout" href="Ext.BorderLayout.html">Ext.BorderLayout
var layout = new Ext.BorderLayout(...);
layout.restoreState();
// or a {Ext.BasicDialog}
var dialog = new Ext.BasicDialog(...);
dialog.restoreState();
restoreState() does not exist anywhere in the code.
Ext.BasicDialog is not a valid constructor.
etc.
Funcracker
3 Jun 2008, 2:23 AM
Documentation:
http://www.extjs.com/deploy/dev/docs/output/Ext.CompositeElement.html
Method:
indexOf
Problem:
Does not return a boolean, instead returns a numeric value, which represents the index of the input Element in the CompositeElement. Or -1 if it is not contained.
Just like everyone would expect ;)
Sorry if this was already posted. Search option didn't show me, but I did not read every page of this topic carefully.
Animal
3 Jun 2008, 4:51 AM
CompositeElement. Well spotted. I just fixed this.
splintor
3 Jun 2008, 11:38 AM
CompositeElement. Well spotted. I just fixed this.
CompositeElement.indexOf() documentation seems to be copied from CompositeElement.contains().
Another problem is that both are documented to accept no parameter, while they both accept one Element (or Mixed?) paraemeter.
Funcracker
4 Jun 2008, 5:40 AM
Documentation:
http://extjs.com/deploy/dev/docs/output/Ext.Fx.html
Config option:
callback
Undocumented feature:
Passes the element the animation was called upon as a first parameter to the callback function. I kinda bumped into this as my 'if (arguments.size == 0)' never fired.
Example code:
Ext.get('id').fadeOut({callback: foo});
function foo(arg1) {}arg1 will contain the element returned by Ext.get('id'). This works for inline functions as well.
splintor
5 Jun 2008, 4:23 AM
While working on a grid's store, I noticed that Ext.data.Record's constructor is described to accept two parameters - data and id. The type of 'data' is Array, and it is described as "An associative Array of data values keyed by the field name."
I'm not familiar with "associative Arrays" in JavaScript. I thought associative/hash collections are simply referred to as objects. Arrays are something else - they are the ones accessed by numerical indexes.
What does ExtJS mean by "associative Array"? From the constructor sample, it seems a plain object is required, with an entry for each Record's field.
When I searched for "associative" in ExtJS documentation, I found that the only other places it is mentioned is in Ext.dd.DragDrop and all its subclasses. There is a problem there as well - the properties invalidHandleIds and invalidHandleTypes are defined to be of type "string" but their description says they are "associative arrays" (probably as opposed to invalidHandleClasses, which is an "indexted array".
splintor
Animal
5 Jun 2008, 5:02 AM
I fixed these to refer to "Object"s
Animal
5 Jun 2008, 5:06 AM
I updated the FX API docs too.
mystix
7 Jun 2008, 8:01 PM
Class Ext.Element
missing method getTextWidth()
mystix
10 Jun 2008, 12:06 AM
Class Ext.data.SimpleStore
missing config expandData (currently only used by Ext.form.ComboBox)
Animal
10 Jun 2008, 1:10 AM
Class Ext.Element
missing method getTextWidth()
Fixed.
Animal
10 Jun 2008, 1:15 AM
Class Ext.data.SimpleStore
missing config expandData (currently only used by Ext.form.ComboBox)
IMNSHO, that's a special case designed for use only with a ComboBox. It's requesting that an Array of values be converted to an Array of single element Arrays so that the ComboBox can use an ArrayReader which expects each row in the data object it is reading to be an Array.
mystix
10 Jun 2008, 1:36 AM
hmmm... should we mark it private then? just in case...
mystix
10 Jun 2008, 3:06 AM
Class Ext.data.ArrayReader
incorrect description -- there's something missing between "using" and "as" ("id" maybe?)
"... ...The fields are pulled into a Record object using as a subscript... ..." (emphasis added)
Class Ext.Element
In the method load(), the description currently says "Direct access to the Updater Ext.Updater.update method (takes the same parameters)."
The example and the statement above appear to contradict each other. In fact, load() takes either objects (same as Ext.Updater.update) or the 'shortcut' parameter list described in the docs.
Can the docs for Ext.Element.load() be somehow updated to reflect that both parameter lists are valid?
Original Incorrect Assumption Below:
I think this is more of a 'shortcut' than direct access. Also, it does not appear to take the same parameters. Maybe the two methods had the same parameters at one time, but Ext.Updater.update takes an object these days as its only parameter (according to the docs anyway).
splintor
11 Jun 2008, 2:23 AM
Ext.dd.DragDrop#destroy method is defined (as calling this.unreg()) but is not documented.
splintor
Animal
11 Jun 2008, 6:37 AM
load takes exactly the same parametyers as update - it just calls update immediately passing its arguments:
load : function(){
var um = this.getUpdater();
um.update.apply(um, arguments);
return this;
},
It's just that the argumenty way of calling load is deprecated in favour of using an object with options.
What about if I just remove all the argument definitions and link it directly to load?
Animal
11 Jun 2008, 6:39 AM
It looks like destroy was added as a synonym for unreg.
destroy is the more standard method.
Perhaps I should undocument unreg, and document destroy. Jack, Brian? What do you think?
...
It's just that the argumenty way of calling load is deprecated in favour of using an object with options.
What about if I just remove all the argument definitions and link it directly to load?
If the argumenty way is deprecated, then yes get rid of that. There's nothing there currently that lets you know it's deprecated. If the Element.load and Ext.Updater.update methods take the same parameters, show that in the parameter list for Element.load and include a link to Ext.Updater.update. It would make it a lot less confusing.
Animal
11 Jun 2008, 11:23 PM
OK, load is changed to simply link to Updater.update
mikegiddens
12 Jun 2008, 11:36 AM
Splitbar example on the second item it has a trailing comma. This would break in ie7 and is not needed so it should be removed. Might confuse a noob copy pasting.
{text: 'Item 2', handler: item2Handler},
brian.moeskau
12 Jun 2008, 1:48 PM
Splitbar example on the second item it has a trailing comma. This would break in ie7 and is not needed so it should be removed. Might confuse a noob copy pasting.
{text: 'Item 2', handler: item2Handler},
Thanks, fixed in SplitButton and Toolbar docs (not Splitbar... :-? )
I updated the docs for several configs and also added a usage example. Thanks.
Hi,
how can i clear/remove the treesorter of any tree panel ??
There are ways to clear/remove the filter of tree -
for filtering
var myTreeFilter=new Ext.tree.TreeFilter();
myTreeFilter.filter(new RegExp(searchTextbox.getValue(),'i'),'text',myTree.getRootNode());
for clear filtering
myTreeFilter.clear();
But what about treesorter clear ????????
noel.
Class Ext.Updater
I found two problems here.
First, there is a bad reference to load in the docs for the startAutoRefresh method. I believe this should be updated to say update and point to the update method in this class.
Secondly, I think the usage example for Ext.Updater needs a bit of cleanup. The indentation is messed up at the beginning and some of the lines of code in there, at least in the absence of a quick comment, seem to be out of place. Like... why is
mgr.on("update", myFcnNeedsToKnow);
in there? Just sitting there by itself, I was initially thinking that it was part of the update process and required. Granted, in just a minute or two it becomes obvious that it's just extraneous... but maybe a comment like
// Add an event listener
would help guide Ext.Updater noobies in a better direction.
Berni
25 Jun 2008, 3:22 AM
Ext.form.ComboBox
event keydown
event keypress
event keyup
There is an really nice information that you have to use the property "enableKeyEvents" for using these events.
Keypress input field event. This event only fires if enableKeyEvents is set to true.
But there isn't an existing property named "enableKeyEvents" in the documentation. Wheter in class Ext.form.ComboBox nor in another class in the whole documentation.
It is realy a bad situation, because you read the statement, but cannot find the property that you have to use (it would be working, but who tries an poperty that doesn't exist???). After reading and don't understanding you must take a look in the forums and perhaps you open another thread because you don't find the solution...
I think this bug should really be fixed.
mystix
25 Jun 2008, 3:34 AM
It is realy a bad situation, because you read the statement, but cannot find the property that you have to use (it would be working, but who tries an poperty that doesn't exist???). After reading and don't understanding you must take a look in the forums and perhaps you open another thread because you don't find the solution...
or you could just peek into the source. :>
p.s. this has already been fixed in SVN.
MaxT
27 Jun 2008, 12:53 AM
Ext 2.1 docs
Ext.state.Provider
statechange event
value : String
The encoded value for the state
value is described wrongly I think. The call from source is this:
/**
* Sets the value for a key
* @param {String} name The key name
* @param {Mixed} value The value to set
*/
set : function(name, value){
this.state[name] = value;
this.fireEvent("statechange", this, name, value);
},
Hence, value is not an encoded string but a Mixed value.
mystix
27 Jun 2008, 12:56 AM
@MaxT
tip: if the latest source says something different from the online docs, then stick with the source -- the (online) docs will be updated only with the next minor revision.
Ok, I'll check the source to see if it has changed to match the comments rather than vice-versa. Thanks, Max.
Starfall
29 Jun 2008, 4:38 AM
Ext.form.FormPanel :: config
Docs say that buttons property should be an array of button configs. However, it's not true:
if(this.buttons){
var btns = this.buttons;
/**
* This Panel's Array of buttons as created from the <tt>buttons</tt>
* config property. Read only.
* @type Array
* @property buttons
*/
this.buttons = [];
for(var i = 0, len = btns.length; i < len; i++) {
if(btns[i].render){ // button instance
this.buttons.push(btns[i]);
}else{
this.addButton(btns[i]);
}
}
}
It's clear that passing a button instance is also acceptable.
Starfall
29 Jun 2008, 6:11 AM
Ext.form.TextArea :: config property enterIsSpecial
Undocumented.
sj137
30 Jun 2008, 3:26 AM
no information in docs about how to set-up and configure a validator ...
Animal
30 Jun 2008, 4:01 AM
no information in docs about how to set-up and configure a validator ...
This? http://extjs.com/deploy/dev/docs/?class=Ext.form.TextField&member=validator
Animal
30 Jun 2008, 4:04 AM
Ext.form.TextArea :: config property enterIsSpecial
Undocumented.
Looks buggy to me on first reading:
fireKey : function(e){
if(e.isSpecialKey() && (this.enterIsSpecial || (e.getKey() != e.ENTER || e.hasModifier()))){
this.fireEvent("specialkey", this, e);
}
},
Fire the event if the keypress is a special key AND (enter is special or it's a control/alt press)????
That needs an OR surely?
Starfall
1 Jul 2008, 10:55 AM
Well, it depends on expected behavior of fireKey... I assume it is to fire specialKey event if any of the special keys have been pressed OR (Enter is set to special AND Enter is pressed). Whether or not it should fire specialKey if Enter was pressed with any of modifiers (that is, Ctrl+Enter or Alt+Enter) is not to be decided on the fly.
Let's assume that Enter is special, and it was pressed without any modifiers. We have
False && (True || (False || False)) = FalseIt's certainly erroneus.
Ok, change && to ||.
False || (True || (False || False)) = TrueKinda right?
Now let's assume It's not Enter that is pressed (say, 'A' key).
False || (True || (True || False)) = TrueThat's erroneus again.
So, it seems to me that the method doesn't do what it is intended to.
Starfall
2 Jul 2008, 7:31 AM
In ColumnModel documentation it is said that all of the config options listed there are for columns. However, listeners config option is intended for the ColumnModel itself, not for any of the columns.
The fact that the config object might also take object form instead of array is also missed.
By the way, I suggest that to remove ambiguity passing config object as array should be deprecated. Having {columns: array_of_col_configs} is just fine.
Animal
2 Jul 2008, 7:45 AM
Difficult to get that across. Given that the config options are all (Except listeners) column properties, how would you document a columns config option?
I can certainly change the top level desciption to read
"all config options defined by this class are options which may appear in each individual column definition."
pbuyle
3 Jul 2008, 1:57 AM
According to the documentation, Ext.util.Observable.relayEvents(Object o, Array events) will relay all events from the events array happening on callee to o. But it work in the other way, events on o are relayed to the calle as demonstrated by the following code (from my firebug console):
>>> o1 = new Ext.util.Observable()
Object filterOptRe=/^(?:scope|delay|buffer|single)$/
>>> o2 = new Ext.util.Observable()
Object filterOptRe=/^(?:scope|delay|buffer|single)$/
>>> o1.addEvents('event')
>>> o2.addEvents('event')
>>> o1.on('event', console.log.createCallback('o1'))
>>> o2.on('event', console.log.createCallback('o2'))
>>> o1.relayEvents(o2, ['event'])
>>> o1.fireEvent('event')
o1
true
>>> o2.fireEvent('event')
o2
o1
true
mystix
3 Jul 2008, 2:00 AM
@pbuyle,
@animal has already put in a fix for fixed the docs in SVN.
Starfall
9 Jul 2008, 4:29 AM
Many people, including myself, have tried adding panels to BorderLayout dynamically. I suggest you put a sentence like "BorderLayout doesn't support adding new Panels after it has been rendered" in both BorderLayout and Viewport docs
Animal
10 Jul 2008, 6:31 AM
I added to BorderLayout:
The regions of a BorderLayout are fixed at render time and thereafter, no regions may be removed or added.
mystix
10 Jul 2008, 5:36 PM
Class Ext.form.ComboBox
missing config hiddenValue
Animal
11 Jul 2008, 1:25 AM
Class Ext.form.ComboBox
missing config hiddenValue
The documentation is there in the code in SVN so we'll see it on the next release.
mystix
11 Jul 2008, 1:59 AM
The documentation is there in the code in SVN so we'll see it on the next release.
d'oh... forgot to check the SVN source! :">
yarmy
11 Jul 2008, 2:37 AM
var tpl = new Ext.XTemplate(
'<p>Name: {name}</p>',
'<p>Company: {[values.company.toUpperCase() + ', ' + values.title]}</p>',
'<p>Kids: ',
'<tpl for="kids">',
'<div class="{[xindex % 2 === 0 ? "even" : "odd"]}">',
'{name}',
'</div>',
'</tpl></p>'
);
tpl.overwrite(panel.body, data);
The inline code fails for the company fails at ', '. It should be ", ".
'<p>Company: {[values.company.toUpperCase() + ", " + values.title]}</p>',
Animal
11 Jul 2008, 2:55 AM
Thanks, I'll fix this.
nctag
11 Jul 2008, 3:17 AM
Class Ext.form.DateField
Method: setValue
Sets the value of the date field. You can pass a date object or any string that can be parsed into a valid date, using DateField.format as the date format, according to the same rules as Date.parseDate (the default format used is "m/d/y").
Usage:
//All of these calls set the same date value (May 4, 2006)
//Pass a date object:
var dt = new Date('5/4/06');
dateField.setValue(dt);
//Pass a date string (default format):
dateField.setValue('5/4/06');
//Pass a date string (custom format):
dateField.format = 'Y-m-d';
dateField.setValue('2006-5-4');
Parameters:
* date : String/Date
The date or valid date string
Returns:
* void
The marked line is wrong. The field doesn't render a string like that. It should be 2006-05-04. If you are not sure, test it and you will see that it is wrong. I thought the field is not working but it was the used example...
Starfall
12 Jul 2008, 4:23 AM
in BasicForm::afterAction method it is clear that if Action object has a config option of reset set to true, then the form would reset itself after a successful submit. However, the reset config option is not listed in Action docs
Animal
12 Jul 2008, 8:29 AM
Thanks. Fixed.
nctag
13 Jul 2008, 1:01 AM
@Animal
if you "fixed" relates to my report please tell me where is the most actual Ext API? I only have this link: http://extjs.com/deploy/dev/docs/ and there has been changed nothing since I reported the error.
mjlecomte
13 Jul 2008, 7:07 AM
Package: Ext.form (http://extjs.com/deploy/dev/docs/?class=Ext.form)
Defined In: TextField.js
Class: TextField (http://extjs.com/deploy/dev/docs/?class=Ext.form.TextField)
method: processValue
discussion: It doesn't appear this method is documented. It is not marked as private. I do see this in the parent (Field):
// protected - should be overridden by subclasses if necessary to prepare raw values for validation
processValue : function(value){
return value;
},
mystix
13 Jul 2008, 5:35 PM
@Animal
if you "fixed" relates to my report please tell me where is the most actual Ext API? I only have this link: http://extjs.com/deploy/dev/docs/ and there has been changed nothing since I reported the error.
the online docs merely mirror what you get from the official zip download.
all doc fixes are always applied to the copy in SVN. the online API docs will only be regenerated with each minor release.
if you want to see the actual doc changes, grab the latest version from SVN and check the source.
mystix
13 Jul 2008, 6:24 PM
Package: Ext.form (http://extjs.com/deploy/dev/docs/?class=Ext.form)
Defined In: TextField.js
Class: TextField (http://extjs.com/deploy/dev/docs/?class=Ext.form.TextField)
method: processValue
discussion: It doesn't appear this method is documented. It is not marked as private. I do see this in the parent (Field):
// protected - should be overridden by subclasses if necessary to prepare raw values for validation
processValue : function(value){
return value;
},
IIRC, protected should be read the same as / similar to private.
maybe @jack / @brian can comment on this?
mjlecomte
13 Jul 2008, 6:29 PM
IIRC, protected should be read the same as / similar to private.
maybe @jack / @brian can comment on this?
Just to clarify, that posted code is from the PARENT class. The textfield class is not marked in anyway (not private, not protected, not pizza). There's no comments in front of it so I imagine the doc generator doesn't do anything for it.
mjlecomte
15 Jul 2008, 8:02 AM
Class Ext.data.XmlReader
Package: Ext.data
Defined In: XmlReader.js
Class: XmlReader
Extends: DataReader
Data reader class to create an Array of Ext.data.Record objects from an XML document based on mappings in a provided Ext.data.Record constructor.
Note that in order for the browser to parse a returned XML document, the Content-Type header in the HTTP response must be set to "text/xml" or application/xml.
As seen by the ext demos: form/xml-form.html
mjlecomte
16 Jul 2008, 12:11 PM
Not sure where to mention this, so I'll do it here.
Class Ext.form.Action.Submit
Package: Ext.form
Defined In: Action.js
Class: Action.Submit
Extends: Action
...
By default, response packets are assumed to be JSON, so a typical response packet may look like this:
{
success: false,
errors: {
clientCode: "Client not found",
portOfLoading: "This field must not be null"
}
}
Now, the examples have something for XML as so:
// A reusable error reader class for XML forms
Ext.form.XmlErrorReader = function(){
Ext.form.XmlErrorReader.superclass.constructor.call(this, {
record : 'field',
success: '@success'
}, [
'id', 'msg'
]
);
};
I got the faulty impression that the above was configurable, for example I thought I could use message instead of msg.
I see from the source that it is not configurable as shown below:
markInvalid : function(errors){
if(Ext.isArray(errors)){
for(var i = 0, len = errors.length; i < len; i++){
var fieldError = errors[i];
var f = this.findField(fieldError.id);
if(f){
f.markInvalid(fieldError.msg);
Anyway, I just thought there might be something better to say so the next guy doesn't have to follow my path of disenlightenment.
Some verbage might be added to the examples, but really I think something in the docs would be better. At the moment it doesn't indicate XML.
Maybe the docs could have something like:
...
By default, response packets are assumed to be JSON, so a typical response packet may look like this:
{
success: false,
errors: {
clientCode: "Client not found",
portOfLoading: "This field must not be null"
}
}
An extension to use XML, along with example usage, are included in examples/form/xml-form.html, where response packets should be in the following format:
<?xml version="1.0" encoding="UTF-8"?>
<message success="false">
<errors>
<field>
<id>first</id>
<msg><![CDATA[
Invalid name. <br /><i>This is a test validation message from the server </i>
]]></msg>
</field>
<field>
<id>dob</id>
<msg><![CDATA[
Invalid Date of Birth. <br /><i>This is a test validation message from the server </i>
]]></msg>
</field>
</errors>
</message>
mjlecomte
16 Jul 2008, 1:21 PM
Am I the PIA for the week or what?
I suspect the highlighted part in Ext.data.ArrayReader was copied from the XML Reader by mistake.
Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, {
/**
* Create a data block containing Ext.data.Records from an XML document.
* @param {Object} o An Array of row objects which represents the dataset.
* @return {Object} data A data block which is used by an Ext.data.Store object as
* a cache of Ext.data.Records.
*/
readRecords : function(o){
mystix
16 Jul 2008, 5:32 PM
@mjlecomte, XmlReader & ArrayReader have been fixed in SVN.
thanks for reporting :)
as for Ext.form.Action.Submit, you might want to throw that into the thread in Open Discussions @animal created:
Example code in API docs. Your chance to contribute.
mjlecomte
17 Jul 2008, 2:56 AM
@mystix. There was one more above about XML reader in case you missed it.
New one, based on question in forums today.
GridPanel has this:
mouseout : ( Ext.EventObject e )
The raw mouseout event for the entire grid.
Might be more clear as:
mouseout : ( Ext.EventObject e )
The raw mouseout event that fires for each row in the grid.
Same for mouseover.
mystix
17 Jul 2008, 3:26 AM
@mystix. There was one more above about XML reader in case you missed it.
huh? where? :-/
mjlecomte
17 Jul 2008, 4:08 AM
http://extjs.com/forum/showthread.php?p=195432#post195432
mystix
17 Jul 2008, 6:26 AM
http://extjs.com/forum/showthread.php?p=195432#post195432
ok now i'm confused... :)
that was exactly what i was referring to when i said
@mjlecomte, XmlReader & ArrayReader have been fixed in SVN.
is there another reported xmlreader doc bug i should be looking at?
mjlecomte
17 Jul 2008, 6:52 AM
Doh. :">
I had comments about XML in the ArrayReader so I think I confused myself.
mjlecomte
17 Jul 2008, 6:55 AM
Is there any way to view updated docs from svn updates other than looking at the source files?
mystix
17 Jul 2008, 7:06 AM
Is there any way to view updated docs from svn updates other than looking at the source files?
nope. not at all. thus far it's been a "fix docs, cross fingers, wait for next release" affair for @animal and me. ;)
but there's hope =P~:
Hey guys,
Technically we didn't want to release the doc code as we wanted it to remain a unique look for us and the Ext JS docs. However, I understand the need for you guys to doc your own projects as well and using the standard Ext JS doc center makes sense (and looks pretty sweet!). All we would ask is that the Ext JS logo/link remain in the top right corner of the doc center as a credit to Ext JS. Sound fair?
Jack
mjlecomte
17 Jul 2008, 7:17 AM
ok now i'm confused... :)
that was exactly what i was referring to when i said
is there another reported xmlreader doc bug i should be looking at?
What might help is (if you're still using this protocol):
Ext Documentation Team members:
please mark all resolved issues with a strikethrough using the tags. thanks.
nope. not at all. thus far it's been a "fix docs, cross fingers, wait for next release" affair for @animal and me. ;)
but there's hope =P~:
I was going to suggest maybe that remark might be relevant to add to the first post, I usually try to inspect the first post in big threads like this looking for the current info (that's when I noticed what I quoted above, which seems like it was a good idea). ;)
mystix
17 Jul 2008, 7:27 AM
What might help is (if you're still using this protocol):
I was going to suggest maybe that remark might be relevant to add to the first post, I usually try to inspect the first post in big threads like this looking for the current info (that's when I noticed what I quoted above, which seems like it was a good idea). ;)
maybe i really should start updating the first post (it's gonna get reaaaaallly long though :-?)...
i kinda got lazy after post #92... IIRC @brian last updated through post #140. :))
d'oh :((
wwarby
20 Jul 2008, 11:37 AM
Not a bug as such, but this seems like as good a place as any to report it. On the documentation for Ext.Template is a broken link:
For more information see this blog post with examples: DomHelper - Create Elements using DOM, HTML fragments and Templates (http://www.jackslocum.com/blog/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/).
Ext.Template: The examples-Link is going to nowhere.
Ext.form.TextField: enableKeyEvents is described at the Public Events section but i miss it at the Config Options section.
mystix
22 Jul 2008, 6:31 AM
Ext.form.TextField: enableKeyEvents is described at the Public Events section but i miss it at the Config Options section.
already fixed in SVN. it'll be visible in the next release.
mystix
22 Jul 2008, 6:32 AM
Ext.Template: The examples-Link is going to nowhere.
one post above yours is the same bug report -- that link is supposed to lead to jack's old blog, which unfortunately isn't available at this time. @brian is aware of it though (since he move post #384 to this thread.)
mystix
22 Jul 2008, 6:20 PM
Class Ext.form.Checkbox
missing config scope (which is used by the handler (if defined) in the Checkbox.setValue() method)
Ext.DomQuery
Return values are namend element or Element - but all of them are Dom-nodes/HTML-Elements. As a beginner i need some time to not confuse them with Ext.Element.
The selector is good described, but i miss the exact definition of a simple selector. All informations i found are some examples.
t34
mystix
25 Jul 2008, 1:08 AM
Ext.DomQuery
Return values are namend element or Element - but all of them are Dom-nodes/HTML-Elements. As a beginner i need some time to not confuse them with Ext.Element.
give an example.
also, what do you mean by "all" when you mentioned "all of them are Dom-nodes/HTML-Elements"?
The API Documentation of Ext.DomQuery says:
selectNode( String selector, [Node root] ) : Element
Someone could think that means Ext.Element but it is a Html-node.
Another example select:
Selects a group of elements.
What kind of Elements? Why not say "Selects a group of HTML nodes."?
That informations are trivial for advanced users but the beginner is confused by that.
t34
wwarby
29 Jul 2008, 6:25 AM
The methods enable() and disable(), both of which work, are not shown in the documentation. They appear when a search is performed, but the search wrongly takes you to the documentation for the events by the same names.
mystix
29 Jul 2008, 6:46 AM
The methods enable() and disable(), both of which work, are not shown in the documentation. They appear when a search is performed, but the search wrongly takes you to the documentation for the events by the same names.
for some strange reason, they've been intentionally hidden (i.e. marked with @hide in the sources) from the doc parser, even though they really do appear to work. i see no potential harm from the GridPanel.enable()/disable() methods being public.
could we get an official word on the visibility of these 2 methods from @brian / @jack?
brian.moeskau
29 Jul 2008, 6:54 AM
for some strange reason, they've been intentionally hidden (i.e. marked with @hide in the sources) from the doc parser, even though they really do appear to work. i see no potential harm from the GridPanel.enable()/disable() methods being public.
could we get an official word on the visibility of these 2 methods from @brian / @jack?
Until recently, disabling any Panel did not fully work consistently across browsers. That has been fixed from a visual perspective, but the grids are still not truly disabled (you can tab into them and use keys). While this may be fixed at some point, at the moment, it's not officially supported.
wwarby
30 Jul 2008, 12:03 AM
Until recently, disabling any Panel did not fully work consistently across browsers. That has been fixed from a visual perspective, but the grids are still not truly disabled (you can tab into them and use keys). While this may be fixed at some point, at the moment, it's not officially supported.
Fair enough, but in that case, you still have an error in your docs because a search returns GridPanel.enable()/disable() with the method icons, and clicking them takes you to the events by the same name. Also, both GridPanel and EditorGridPanel have a documented disabledMask (maskDisabled?) config option. Surely it's illogical for that option to be available (and indeed the disable/enable events, which are also public) to be documented when the methods which make them relevant are private?
mystix
30 Jul 2008, 1:20 AM
@wwarby,
wow... how did you ever catch that... good catch.
to replicate, use the online docs, search for "enable", and click on the link next to Ext.grid.GridPanel.
wwarby
30 Jul 2008, 1:38 AM
@wwarby,
wow... how did you ever catch that... good catch.
Well, it was pretty easy because I was actively looking for the documentation on those methods because I wanted to use them - when the search put me inexplicably in the wrong place, I figured it was worth reporting ;)
If the experts would like to offer a reward for this exceptionally useful find (:D), let the record show that I am ready to receive it in the form of a response to this month old bug report: http://extjs.com/forum/showthread.php?t=40458 !!!
Animal
30 Jul 2008, 1:43 AM
There's a fundamental problem in the doc generator in that it does not handle name collisions between methods, configs, properties and events. Each one creates an anchor named after itself. They need to be differentiated using eg "enable-event" and "enable-method".
wwarby
31 Jul 2008, 4:08 AM
I noticed in one of the samples that dataFormat can be supplied as a property of a field definition in a JsonReader object, so I wonder what else could be defined. I was surprised to find that Ext.data.Field is undocumented, even though it is heavily relied upon throughout Ext.data. I found it's definition in the source code as follows:
Ext.data.Field.prototype = {
dateFormat: null,
defaultValue: "",
mapping: null,
sortType : null,
sortDir : "ASC"
};
What I found interesting is that this definition doesn't declare two other properties that are used commonly on fields: name and type. Is there a reason why this object is undocumented? I wanted to know what dateFormat does - without the documentation I'll have to experiment.
Condor
31 Jul 2008, 4:16 AM
I was surprised to find that Ext.data.Field is undocumented, even though it is heavily relied upon throughout Ext.data.
Yes, Ext.data.Field is undocumented, but the API doc does describe it's properties (see Ext.data.Record.create (http://extjs.com/deploy/dev/docs/?class=Ext.data.Record&member=create)).
wwarby
31 Jul 2008, 4:36 AM
Ah, Record.create()! I looked almost everywhere else. Trouble is, data.Field is used in so many places, it's hard to guess where it might be in the docs, especially when it's unsearchable because it's defined under Record.create().
Suggestion: could there be a "see Record.create()..." link in the docs in other places where data.Field is used? Otherwise it's difficult to find.
Starfall
31 Jul 2008, 8:26 AM
[implemented]
In SplitRegion (http://extjs.com/deploy/dev/docs/?class=Ext.layout.BorderLayout.SplitRegion) docs when talking about split config option, minSize and maxSize config options of the region are mentioned. However, they do not exist in the docs and seem to have no real effect in code. By the way, there are some private functions in BorderLayout.js (specifically, getHMaxSize and getVMaxSize), which aren't called anywhere in the code.
Starfall
31 Jul 2008, 1:01 PM
[implemented]
It is stated in Panel config options that buttons should be an array of button configs (note the emphasis). However, it's not true: button instances are also accepted.
Ext.onReady(function(){
var wnd = new Ext.Window({
height: 70,
buttons: [
new Ext.Button({
text: 'I am created as direct instance'
})
]
});
wnd.doLayout();
wnd.show();
});
Animal
31 Jul 2008, 1:12 PM
[implemented]
How's this?
/**
* @cfg {Boolean} split
* True to display a {@link Ext.SplitBar} between this region and its neighbor, allowing the user to resize
* the regions dynamically (defaults to false). When split == true, it is common to specify a minSize
* and maxSize for the BoxComponent representing the region. These are not native configs of BoxComponent, and
* are used only by this class.
*/
Animal
31 Jul 2008, 1:15 PM
[implemented]
And this
/**
* @cfg {Array} buttons
* An array of {@link Ext.Button}s or {@link Ext.Button} configs used to add buttons to the footer of this panel.
*/
don_luiz
1 Aug 2008, 12:26 AM
var Store = new Ext.data.Store({
proxy : new Ext.data.MemoryProxy(),
reader: new Ext.data.JsonReader({},Ext.data.Record.create([{
name: "user"
}, {
name: "msg"
}])),
autoLoad :true,
storeId : 'allcallsStore'
});
var Record = new Ext.data.Record([{
user:'don_luiz'
},{
msg : 'may there be a doc bug?'
}],{id:'1'}
);
Store.add(Record);
Store.reload();
alert(Store.getById((Store.getAt(0).id)).toSource()); //=> correct alert of the data.Record
alert(Store.getById({
id: "1"
}).toSource());//=> correct alert of the data.Record
alert(Store.getById(1)); //=> alerts 'undefined'
alert(Store.getById('1'); //=> alerts 'undefined'
/**
* :-?:-?:-?
* so if i am not completely wrong;
* please apdate the Api 2.0 doc near Ext.data.Store.getById to
* $ getById(Object : id ) : Ext.data.Record $
* or better 'd be if you could update the Ext.data.Store Source code :D:D
*/
i hope i could help improving ExtJs,
don_luiz
_____________________________________
sorry for puttig it into the wrong thread :/
Animal
1 Aug 2008, 12:59 AM
You are setting the id of your new record to an object with one property: "id" which has a value of '1'. The docs are quite clear, you read them wrong. The second parameter to the Record constructor is the ID.
don_luiz
1 Aug 2008, 1:02 AM
Record( Array data, [Object id] )
:-? thats why i passed the id as object to the Record constructor .
:)
Animal
1 Aug 2008, 1:25 AM
Yes, the id can be an object. So if you want a number, pass a number, if you want a string, pass a string, or a Date etc. They're all objects, the ID can be anything you want.
wwarby
1 Aug 2008, 6:43 AM
There's something goofy going on with the docs for Ext.MessageBox.show(). The config options seem to have no formatting or indentation and given the number of options, the docs for this method are difficult to read.
mystix
1 Aug 2008, 8:08 AM
There's something goofy going on with the docs for Ext.MessageBox.show(). The config options seem to have no formatting or indentation and given the number of options, the docs for this method are difficult to read.
tell me about it. they were quite a pain to fix too. 8-|
already nipped this one back at the start of july.
you'll see it in the next minor release.
Starfall
2 Aug 2008, 2:32 AM
Yes, the id can be an object. So if you want a number, pass a number, if you want a string, pass a string, or a Date etc. They're all objects, the ID can be anything you want.
Then it should be [Mixed id], shouldn't it?
@Animal, yes, I appreciate your text modifications.
Starfall
2 Aug 2008, 3:23 AM
[implemented]
API search for "relayEvents" gives nothing, although this method exists in Ext.util.Observable docs.
Edit: I suggest that the explanation of this method doesn't use "relay" word, but instead explain its meaning. For now it looks like "method relayEvents relays events", thus providing no useful info.
Animal
2 Aug 2008, 5:12 AM
The docs were wrong anyway, they now read
/**
* Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.
* @param {Object} o The Observable whose events this object is to relay.
* @param {Array} events Array of event names to relay.
*/
mystix
5 Aug 2008, 8:52 PM
[implemented]
Class Ext.grid.EditorGridPanel
missing option 'auto' for config clicksToEdit
Animal
5 Aug 2008, 11:37 PM
[implemented]
Hmm. That's probably a good thing really because there's a bug in the auto edit code which makes it not work at all! I'll add the docs for it and report the bug.
New 2.2 Ext.util.Format.nl2br function missing from API doc.
mjlecomte
7 Aug 2008, 5:59 AM
Class Ext.grid.ColumnModel
Package: Ext.grid
Defined In: ColumnModel.js
Class: ColumnModel
Subclasses: PropertyColumnModel
Extends: Observable
Problems:
Parameter not specified.
Name of Parameter inconsistent within class.
Current docs:
getColumnCount() : Number
Returns the number of columns.
Parameters: None.see below
Returns: Number
/**
* @class Ext.grid.ColumnModel
* @extends Ext.util.Observable
*/
/**
* Returns the number of columns.
* @param {Boolean} visibleOnlyincludeHidden True to include hidden column widths (defaults to false)
* @return {Number}
*/
getColumnCount : function(visibleOnlyincludeHidden){
if(visibleOnlyincludeHidden === true){
var c = 0;
for(var i = 0, len = this.config.length; i < len; i++){
if(!this.isHidden(i)){
c++;
}
}
return c;
}
return this.config.length;
},
mjlecomte
7 Aug 2008, 7:22 AM
[not needed]
An additon to column model:
The listeners config is not listed as optional. It's from another class, so I don't know how that works with the API. Just pointing out that it is optional, but it's not indicated that way.
Starfall
9 Aug 2008, 7:55 AM
[implemented]
Missing "@" in HtmlEditor docs
/**
* Protected method that will not generally be called directly. If you need/want
* custom HTML cleanup, this is the method you should override.
* @param {String} html The HTML to be cleaned
* @return {String} The cleaned HTML
*/
Starfall
10 Aug 2008, 5:34 AM
Suggestion: Add this to FormPanel docs:
"FormPanel is required to have at least one item to render properly"
evant
10 Aug 2008, 9:33 PM
[implemented]
CheckBoxGroup is missing the 'items' config property.
Since it doesn't extend Container, this needs to be explicitly added.
thboileau
11 Aug 2008, 1:31 AM
[resolved]
In the FormPanel documentation, the sample code regarding the normal browser submission of the Ext Form does not work form for me. It is either wrong or incomplete.
mystix
11 Aug 2008, 1:34 AM
[resolved]
In the FormPanel documentation, the sample code regarding the normal browser submission of the Ext Form does not work form for me. It is either wrong or incomplete.
define "does not work".
i quote @evant's forum signature,
"It doesn't work" and "It's not working" are not adequate problem descriptions.
Animal
11 Aug 2008, 1:42 AM
[resolved]
That example code shouldn't be in there any more since the standardSubmit option was added.
Animal
11 Aug 2008, 1:56 AM
[resolved]
FormPanel overview section overhauled in light of 2.2 changes.
thboileau
11 Aug 2008, 1:57 AM
Hi mystic,
I mean, it does not achieve the purpose to submit in a standard way a form to a server. In addition, it seems to be in contradiction with the documentation of the Ext.form.BasicForm class:
"To enable normal browser submission of an Ext Form, use the standardSubmit (http://extjs.com/forum/../deploy/dev/docs/output/Ext.form.BasicForm.html#standardSubmit) config option."
I would also like to say that this point should be completed. It seems intuitive to simply relies on the following properties of the Basicform:
- standardSubmit
- url
- method
Unfortunately, this does not work. Url and method should be specified by the submit button. As it is not very intuitive (though it is a basic feature), I think it should be fully documented.
best regards,
Thierry Boileau
xpurpur
11 Aug 2008, 4:35 AM
[not a doc bug]
Posted later in this topic (http://extjs.com/forum/showthread.php?t=32941):
Please, add to documentation:
To all classes:
1. xtype in header
Example:
Class Ext.form.ComboBox
Package: Ext.form
Defined In: Combo.js
Class: ComboBox
Subclasses: TimeField
Extends: TriggerField
Xtype: combo
2.since in header
Example:
Package: Ext
Defined In: StatusBar.js
Class: StatusBar
Extends: Toolbar
Since: 2.1
thboileau
11 Aug 2008, 6:32 AM
Hello all,
I would like to report the fact that the "defaultAutoCreate" property is undocumented.
best regards,
Thierry Boileau
Animal
11 Aug 2008, 10:47 AM
[not a doc bug]
Posted later in this topic (http://extjs.com/forum/showthread.php?t=32941):
Please, add to documentation:
To all classes:
1. xtype in header
Example:
2.since in header
Example:
This is a feature request not a doc bug.
Animal
11 Aug 2008, 10:53 AM
Hello all,
I would like to report the fact that the "defaultAutoCreate" property is undocumented.
best regards,
Thierry Boileau
I'm not sure that's a bug. It's documented as autoCreate
You can configure an autoCreate object.
defaultAutoCreate is the Ext-provided backup in case you do not configure autoCreate.
thboileau
11 Aug 2008, 11:24 AM
Hi Animal,
actually, I followed this advice =>
It's undocumented. You could report it in the 'Missing API docs' thread.
In my case, "autoCreate" does not seems to be a good solution, because it requires me to create one "autoCreate" object for each field of the form which is not very elegant. Thus, it seems that I need "defaultAutoCreate" which serves my goal (less code and autocomplete for all text fields).
best regards,
Thierry Boileau
Condor
11 Aug 2008, 10:44 PM
In my case, "autoCreate" does not seems to be a good solution, because it requires me to create one "autoCreate" object for each field of the form which is not very elegant. Thus, it seems that I need "defaultAutoCreate" which serves my goal (less code and autocomplete for all text fields).
In his case he set the autoCreate in the defaults section of the form (which gave really funky results!).
You can't use autoCreate in the defaults section, because Ext.form.Field requires a unique instance for itself. You can however set defaultAutoCreate, because Ext.form.Field will copy the content to a new autoCreate object.
As an alternative you could change:
Ext.override(Ext.form.Field, {
getAutoCreate : function() {
var cfg = Ext.apply({}, typeof this.autoCreate == "object" ? this.autoCreate : this.defaultAutoCreate);
if(this.id && !cfg.id) {
cfg.id = this.id;
}
return cfg;
}
});
Condor
13 Aug 2008, 2:50 AM
[implemented]
The config option propertyNames of Ext.grid.PropertyGrid is undocumented.
Animal
13 Aug 2008, 4:04 AM
[implemented]
I've never used a PropertyGrid. If you come up with a form of words that describe this option, I'll update the docs if you post it here.
Condor
13 Aug 2008, 4:49 AM
[implemented]
How about:
/**
* @cfg {Object} propertyNames An object containing property name/display name pairs.
* If specified, the display name will be shown in the name column instead of the property name.
*/
Animal
13 Aug 2008, 10:40 AM
[implemented]
Thanks. Added.
SoreGums
14 Aug 2008, 12:17 AM
[resolved]
Ext.Template
...
For more information see this blog post with examples: : <a href="http://www.jackslocum.com/blog/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">DomHelper - Create Elements using DOM, HTML fragments and Templates</a>.
...
on this link ->
"Not Found
Sorry, but you are looking for something that isn't here."
This one is still in there - not on the front page :)
Animal
14 Aug 2008, 12:26 PM
[resolved]
I removed that thanks.
In actual version documentation api in AIR no publisher and system Access info - what not look nice. In previous version (2.1) was OK.
mjlecomte
17 Aug 2008, 2:53 PM
[resolved]
Class Ext.Component
Package: Ext
Defined In: Component.js
Class: Component
hideMode : String
How this component should be hidden. Supported values are "visibility" (css visibility), "offsets" (negative offset position) and "display" (css display) - defaults to "display".
mjlecomte
18 Aug 2008, 2:49 PM
Ext.data.SimpleStore
If this post has any merit there may be some issues with the docs.
http://extjs.com/forum/showthread.php?p=211171#post211171
Would probably be useful if the required configs were formatted differently from optional config properties. Or a '(required)' '(optional)' tag in each description if appropriate.
hansellh
18 Aug 2008, 11:48 PM
Ext.form.ComboBox
event keydown
event keypress
event keyup
There is an really nice information that you have to use the property "enableKeyEvents" for using these events.
But there isn't an existing property named "enableKeyEvents" in the documentation. Wheter in class Ext.form.ComboBox nor in another class in the whole documentation.
It is realy a bad situation, because you read the statement, but cannot find the property that you have to use (it would be working, but who tries an poperty that doesn't exist???). After reading and don't understanding you must take a look in the forums and perhaps you open another thread because you don't find the solution...
I think this bug should really be fixed.
This is not in the 2.2 doc for TextField
Thanks
mjlecomte
19 Aug 2008, 5:36 AM
Class Ext.grid.GridPanel
Package: Ext.grid
Defined In: GridPanel.js
Class: GridPanel
Subclasses: EditorGridPanel
Suggest modification/enhancement based on this post (http://extjs.com/forum/showthread.php?p=211113#post211113)by Aaron.
view : Object
The Ext.grid.GridView used by the grid. This can be set before a call to render(). view and viewConfig should not be specified at the same time as view will override viewConfig.
Example:
view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})',
getRowClass: function(row, index) {
alert(row.get('colour'));
if (row.get('colour') == 'yellow'){
return 'yellow-row';
}
if (row.get('colour') == 'red'){
return 'red-row';
}
}
}
})
viewConfig : Object
A config object that will be applied to the grid's UI view. Any of the config options available for Ext.grid.GridView can be specified here. viewConfig will be ignored if a view config property is specified.
Example:
viewConfig: {
getRowClass: function(row, index) {
alert(row.get('colour'));
if (row.get('colour') == 'yellow'){
return 'yellow-row';
}
if (row.get('colour') == 'red'){
return 'red-row';
}
}
}
}
mjlecomte
20 Aug 2008, 9:57 AM
Package: Ext
Defined In: Window.js
Class: Window
Missing config:
frame : Boolean
True to render the window with a border (defaults to true).
mjlecomte
24 Aug 2008, 12:30 AM
Package: Ext
Defined In: Element.js
Class: Element (http://extjs.com/deploy/dev/docs/?class=Ext.Element)
Shouldn't Ext.Element.get show up as a method in this class?
Edit: Actually, it's there, I was looking for just "get" (after "f" and before "h") though as a method not Element.get (http://extjs.com/deploy/dev/docs/?class=Ext.Element&method=Element.get) (shows up before "f").
mjlecomte
25 Aug 2008, 3:36 PM
Package: Ext.data
Defined In: Store.js
Class: Store (http://extjs.com/deploy/dev/docs/?class=Ext.data.Store)
Current documentation still source of confusion as evidenced here: http://extjs.com/forum/showthread.php?p=214168#post214168.
The red and green parts seem to conflict. Instead of none, how about a link to one of the proxy loadexception events, or just include the arguments directly?
loadexception (http://extjs.com/deploy/dev/docs/?class=Ext.data.Store&member=loadexception) : ()
Fires if an exception occurs in the Proxy during loading. Called with the signature of the Proxy's "loadexception" event.
Listeners will be called with the following arguments:
None.
devnull
26 Aug 2008, 7:12 AM
Config options for Panel that become valid when Panel is used as a tabPanel item are undocumented as far as I can tell. This includes, but may not be limited to, 'closable' and 'tabCls'. Based on the location of the 'tabTip' config option in Ext.Panel, I believe that to be the correct location for these options.
mjlecomte
26 Aug 2008, 7:36 AM
Config options for Panel that become valid when Panel is used as a tabPanel item are undocumented as far as I can tell. This includes, but may not be limited to, 'closable' and 'tabCls'. Based on the location of the 'tabTip' config option in Ext.Panel, I believe that to be the correct location for these options.
somewhat related: http://extjs.com/forum/showthread.php?p=213848#post213848
switch
27 Aug 2008, 10:05 AM
Class Ext.Window has a link to Class Ext.WindowMgr in the initial description, however it links to "WindowManager" instead of "WindowMgr"
mystix
29 Aug 2008, 8:13 AM
Class Ext.data.JsonReader
note should be added regarding the resetting of the sortInfo config when the metaData config is used:
http://extjs.com/forum/showthread.php?t=45259
http://extjs.com/forum/showthread.php?t=35948
Ext.form.BasicForm.doAction success/failure handlers do not work as documented.
In summary, the problem is this: The docs say that the success/failure handlers are only for HTTP success/failure when they are actually used for any kind of success failure (i.e. the failure handler is used for client-side validation failure, HTTP failure, and server-side validation failure). The problem is reported at greater length in this thread:
http://extjs.com/forum/showthread.php?t=43150
It has occurred to me that the current behavior could be the desired behavior, and that all errors, regardless of type, should be handled by the failure handler. In this way, the failureType property of the action can be used to handle errors of different sorts. If this is the case, the Ext.form.BasicForm.doAction docs (http://extjs.com/deploy/dev/docs/?class=Ext.form.BasicForm&member=doAction) should refrain from making the distinction between HTTP success and otherwise because this information is not accurate. Instead it should say that the failure handler will be used for all errors (client-side validation, Ajax or HTTP errors, and errors returned from invalid server validation) and the success handler will only be used if the form submission did not have any errors at all.
Animal
29 Aug 2008, 11:25 AM
The docs in SVN do not say that. Current behaviour is the correct behaviour, and the docs were wrong.
ben_dog
1 Sep 2008, 12:29 AM
Hi,
Following this thread http://extjs.com/forum/showthread.php?p=216856
I'd like to suggest that the documentation be updated to mention that the click handler for a menu item needs to return true to close the menu, or false to keep it open.
Cheers
Ben
masuran
2 Sep 2008, 1:11 AM
I found a small bug in the docs for the Treepanel, don't think the type is boolean ;)
selModel : Boolean A tree selection model to use with this TreePanel (defaults to a Ext.tree.DefaultSelectionModel (http://extjs.com/forum/../deploy/dev/docs/output/Ext.tree.DefaultSelectionModel.html))
Condor
2 Sep 2008, 6:38 AM
The API doc for Ext.form.TextField.validator is:
/**
* @cfg {Function} validator A custom validation function to be called during field validation (defaults to null).
* If available, this function will be called only after the basic validators all return true, and will be passed the
* current field value and expected to return boolean true if the value is valid or a string error message if invalid.
*/
To avoid confusion it should be explained that 'basic validators' are allowBlank, minLength, maxLength and vtype (and not validators added by TextField descendants).
(the same is true for Ext.form.TextField.regex)
tomcheng76
2 Sep 2008, 6:58 PM
http://extjs.com/learn/Ext_FAQ#How_is_Ext_licensed.3F
It is still written as LGPL, please change it, it is so confusing.
tomcheng76
2 Sep 2008, 11:48 PM
another typo, it is not documentation though.
http://extjs.com/products/extjs/download.php
Ext JS 2.2 SDK above, the heading is EXT JS 2.1.
mjlecomte
3 Sep 2008, 4:39 AM
http://extjs.com/learn/Ext_FAQ#How_is_Ext_licensed.3F
It is still written as LGPL, please change it, it is so confusing.
another typo, it is not documentation though.
http://extjs.com/products/extjs/download.php
Ext JS 2.2 SDK above, the heading is EXT JS 2.1.
tomcheng
this thread is actually for errors in the API Docs only. You're pointing out issues on other web pages throughout the site. You may want to post these comments under "general discussion".
Your license question: That page is part of the wiki where anyone can edit it. As such, the licensing should probably be removed entirely, and just point to a page that only Ext developers have control over. Edit: I went ahead and made this change.
mjlecomte
5 Sep 2008, 8:54 AM
Ext.QuickTips
How about defining q in example below (or just call it out longhand)?
// Init the singleton. Any tag-based quick tips will start working.
Ext.QuickTips.init();
// Apply a set of config properties to the singleton
Ext.apply(Ext.QuickTips.getQuickTip(), {
maxWidth: 200,
minWidth: 100,
showDelay: 50,
trackMouse: true
});
// Manually register a quick tip for a specific element
q.register({
target: 'my-div',
title: 'My Tooltip',
text: 'This tooltip was added in code',
width: 100,
dismissDelay: 20
});
hAmpzter
9 Sep 2008, 5:07 AM
Found an error in the Ext.grid.ColumnModel..
Below the "Usage:"-part there is a line that reads:
"The config options defined by< this class are options which may appear in each individual column definition."
Seems like som html-tag error or something like that after "defined by"!
Regards,
</Jonas>
kds.chris
9 Sep 2008, 10:36 AM
I'm not sure if this is the right place to post this.
Please let me know if there is a better place to put this for future reference.
Under the Date.add method documentation, there is a typo..
var dt = new Date('10/29/2006').add(Date.DAY, 5);
document.write(dt); //returns 'Fri Oct 06 2006 00:00:00'
I believe the original intention was to use '10/1/2006'.
Thank you for a great framework.
- Chris
mystix
9 Sep 2008, 6:01 PM
Class Ext.grid.GridView
missing config headersDisabled
mjlecomte
11 Sep 2008, 10:20 AM
http://extjs.com/deploy/dev/docs/?class=Ext.util.Format Ext.util.Format
nl2br and math are not documented
Looks like it.
The only reason I remember is because I saw it in the change log. Is it in the docs bug thread?
salewski
19 Sep 2008, 4:50 AM
The following example seems to be wrong, the code is run by eval() method corresponding to docs. I've tried the hole example but it does not work.
[error below - somethings wrong here but what exactly?]
{function() {
function formatDate(value){
return value ? value.dateFormat('M d, Y') : '';
};
var store = new Ext.data.Store({
url: 'get-invoice-data.php',
baseParams: {
startDate: '01/01/2008',
endDate: '01/31/2008'
}[comma is missing here]
reader: new Ext.data.JsonReader({
record: 'transaction',
id: 'id',
totalRecords: 'total'
}, [
'customer',
'invNo',
{name: 'date', type: 'date', dateFormat: 'm/d/Y'},
{name: 'value', type: 'float'}
])
});
var grid = new Ext.grid.GridPanel({
title: 'Invoice Report',
bbar: new Ext.PagingToolbar(store),
store: store,
columns: [
{header: "Customer", width: 250, dataIndex: 'customer', sortable: true},
{header: "Invoice Number", width: 120, dataIndex: 'invNo', sortable: true},
{header: "Invoice Date", width: 100, dataIndex: 'date', renderer: formatDate, sortable: true},
{header: "Value", width: 120, dataIndex: 'value', renderer: 'usMoney', sortable: true}
],
});
store.load();
return grid;
})();
mjlecomte
19 Sep 2008, 12:56 PM
Class Ext.data.SimpleStore may need a touch up on the fields config property.
See this thread (http://extjs.com/forum/showthread.php?p=226784#post226784) for the confusion.
Also note the link inside
JsonStore.fields (http://extjs.com/deploy/dev/docs/?class=Ext.data.JsonStore&member=fields) to the record.create does not work...at least for me. It should pull up: Record.create (http://extjs.com/deploy/dev/docs/?class=Ext.data.Record&member=create)
mjlecomte
24 Sep 2008, 4:25 PM
Small typo in Component.render
/**
* <p>Render this Components into the passed HTML element.</p>
* <p><b>If you are using a {@link Ext.Container Container} object to house this Component, then
* do not use the render method.</b></p>
* <p>A Container's child Components are rendered by that Container's
* {@link Ext.Container#layout layout} manager when the Container is first rendered.</p>
* <p>Certain layout managers allow dynamic addition of child components. Those that do
* include {@link Ext.layout.CardLayout}, {@link Ext.layout.AnchorLayout},
* {@link Ext.layout.FormLayout}, {@link Ext.layout.TableLayout}.</p>
* <p>If the Container is already rendered when a new child Component is added, you may need to call
* the Container's {@link Ext.Container#doLayout doLayout} to refresh the view which causes any
* unrendered child Components to be rendered. This is required so that you can add multiple
* child components if needed while only refreshing the layout once.</p>
* <p>When creating complex UIs, it is important to remember that sizing and positioning
* of child items is the responsibility of the Container's {@link Ext.Container#layout layout} manager.
* If you expect child items to be sized in response to user interactions, you must
* configure the Container with a layout manager which creates and manages the type of layout you
* have in mind.</p>
* <p><b>Omitting the Container's {@link Ext.Container#layout layout} config means that a basic
* layout manager is used which does nothnig but render child components sequentially into the
* Container. No sizing or positioning will be performed in this situation.</b></p>
* @param {Element/HTMLElement/String} container (optional) The element this Component should be
* rendered into. If it is being created from existing markup, this should be omitted.
* @param {String/Number} position (optional) The element ID or DOM node index within the container <b>before</b>
* which this component will be inserted (defaults to appending to the end of the container)
*/
ben_dog
26 Sep 2008, 5:36 PM
Hi,
More a feature request than a bug I guess.
Would it be possible to have the xtype of any component listed on that component's help page, rather than having to refer to the Component clas help page every time ?
Could be on each page where you have Package, Defined In, Class, Extends, just an Xtype line whenever applicable?
I know most hardcore extjs developer can list them all from the top of their head but it's kinda odd when you're learning...
Ben
mjlecomte
27 Sep 2008, 3:07 PM
A few suggestions to follow on layout related docs:
Class Ext.layout.FitLayout
Package: Ext.layout
Defined In: FitLayout.js
Class: FitLayout
Subclasses: Accordion, CardLayout
Extends: ContainerLayout
Original
This is a base class for layouts that contain a single item that automatically expands to fill the layout's container. This class is intended to be extended or created via the layout:'fit' Ext.Container.layout config, and should generally not need to be created directly via the new keyword.
FitLayout does not have any direct config options (other than inherited ones). To fit a panel to a container using FitLayout, simply set layout:'fit' on the container and add a single panel to it. If the container has multiple panels, only the first one will be displayed.
Example usage:
Proposed (add emphasis in whatever style as shown)
This is a base class for layouts that contain a single item that automatically expands to fill the layout's container. This class is intended to be extended or created via the layout:'fit' Ext.Container.layout config, and should generally not need to be created directly via the new keyword.
FitLayout does not have any direct config options (other than inherited ones). To fit a panel to a container using FitLayout, simply set layout:'fit' on the container and add a single panel to it. If the container has multiple panels, only the first one will be displayed. Example usage:
Ext overview has this, some of which might be added to the docs:
This is a simple layout style that fits a single contained item to the exact dimensions of the container. This is usually the best default layout to use within containers when no other specific layout style is called for.
mjlecomte
27 Sep 2008, 3:10 PM
Class Ext.layout.ContainerLayout
Package: Ext.layout
Defined In: ContainerLayout.js
Class: ContainerLayout
Subclasses: AnchorLayout, BorderLayout, ColumnLayout, FitLayout, TableLayout
Extends: Object
Currently:
Every layout is composed of one or more Ext.Container elements internally, and ContainerLayout provides the basic foundation for all other layout classes in Ext. It is a non-visual class that simply provides the base logic required for a Container to function as a layout. This class is intended to be extended and should generally not need to be created directly via the new keyword.
Ext overview has this which is worded a little better IMO:
[QUOTE]This is the base class for all other layout managers, and the default layout for containers when a specific layout is not defined. ContainerLayout has no visual representation
mjlecomte
27 Sep 2008, 3:18 PM
Class Ext.layout.FormLayout
Package: Ext.layout
Defined In: FormLayout.js
Class: FormLayout
Extends: AnchorLayout
Currently
This is a layout specifically designed for creating forms. This class can be extended or created via the layout:'form' Ext.Container.layout config, and should generally not need to be created directly via the new keyword. However, when used in an application, it will usually be preferrable to use a Ext.form.FormPanel (which automatically uses FormLayout as its layout class) since it also provides built-in functionality for loading, validating and submitting the form.
Note that when creating a layout via config, the layout-specific config properties must be passed in via the Ext.Container.layoutConfig object which will then be applied internally to the layout. The container using the FormLayout can also supply the following form-specific config properties which will be applied by the layout:
The part in bold red is missing from the API and would be helpful:
The FormLayout is a utility layout specifically designed for creating data entry forms. Note that, in general, you will likely want to use a FormPanel rather than a regular Panel with layout:'form' since FormPanels also provide automatic form submission handling. FormPanels must use layout:'form' (this cannot be changed), so forms needing additional layout styles should use nested Panels to provide them.
mjlecomte
27 Sep 2008, 3:30 PM
Class Ext.Container (http://extjs.com/deploy/dev/docs/?class=Ext.Container)
Member: layout (http://extjs.com/deploy/dev/docs/?class=Ext.Container&member=layout)
Current:
The layout type to be used in this container. If not specified, a default Ext.layout.ContainerLayout will be created and used. Valid values are: absolute, accordion, anchor, border, card, column, fit, form and table. Specific config values for the chosen layout type can be specified using layoutConfig.
Proposed:
The layout type to be used in this container. If not specified, a default Ext.layout.ContainerLayout will be created and used. Valid values are: absolute, accordion, anchor, border, card, column, container, fit, form and table . Specific config values for the chosen layout type can be specified using layoutConfig.
Add in more background paraphrased from overview:
[QUOTE]Layouts are also managed by Ext so that size, position, scroll and other attributes. You can mix and match different containers, each with a different layout, nesting to any level you want.
Layouts are created and used internally by the container classes. Containers themselves know nothing about layout
mjlecomte
27 Sep 2008, 3:38 PM
Class Ext.grid.GroupingView
Currently
Adds the ability for single level grouping to the grid.
Propose additions from overview:
Adds the ability for single level grouping to the grid so rows can be grouped on a given column, and regrouped by the user dynamically. Each group of rows can also have an optional summary row for summarizing the data in the group.
Mention link to the example/demo or show a code snippet example (entire example code below for reference .... clip out the extraneous?):
// define a custom summary function
Ext.grid.GroupSummary.Calculations['totalCost'] = function(v, record, field){
return v + (record.data.estimate * record.data.rate);
}
var summary = new Ext.grid.GroupSummary();
var grid = new xg.EditorGridPanel({
ds: new Ext.data.GroupingStore({
reader: reader,
data: xg.dummyData,
sortInfo:{field: 'due', direction: "ASC"},
groupField:'project'
}),
columns: [
{
id: 'description',
header: "Task",
width: 80,
sortable: true,
dataIndex: 'description',
summaryType: 'count',
hideable: false,
summaryRenderer: function(v, params, data){
return ((v === 0 || v > 1) ? '(' + v +' Tasks)' : '(1 Task)');
},
editor: new Ext.form.TextField({
allowBlank: false
})
},{
header: "Project",
width: 20,
sortable: true,
dataIndex: 'project'
},{
header: "Due Date",
width: 25,
sortable: true,
dataIndex: 'due',
summaryType:'max',
renderer: Ext.util.Format.dateRenderer('m/d/Y'),
editor: new Ext.form.DateField({
format: 'm/d/Y'
})
},{
header: "Estimate",
width: 20,
sortable: true,
dataIndex: 'estimate',
summaryType:'sum',
renderer : function(v){
return v +' hours';
},
editor: new Ext.form.NumberField({
allowBlank: false,
allowNegative: false,
style: 'text-align:left'
})
},{
header: "Rate",
width: 20,
sortable: true,
renderer: Ext.util.Format.usMoney,
dataIndex: 'rate',
summaryType:'average',
editor: new Ext.form.NumberField({
allowBlank: false,
allowNegative: false,
style: 'text-align:left'
})
},{
id: 'cost',
header: "Cost",
width: 20,
sortable: false,
groupable: false,
renderer: function(v, params, record){
return Ext.util.Format.usMoney(record.data.estimate * record.data.rate);
},
dataIndex: 'cost',
summaryType:'totalCost',
summaryRenderer: Ext.util.Format.usMoney
}
],
view: new Ext.grid.GroupingView({
forceFit:true,
showGroupName: false,
enableNoGroups:false, // REQUIRED!
hideGroupedColumn: true
}),
plugins: summary,
frame:true,
width: 800,
height: 450,
clicksToEdit: 1,
collapsible: true,
animCollapse: false,
trackMouseOver: false,
//enableColumnMove: false,
title: 'Sponsored Projects',
iconCls: 'icon-grid',
renderTo: document.body
});
});
mjlecomte
27 Sep 2008, 3:47 PM
Class Ext.Viewport
This appears to be missing from the discussion:
Note that the Viewport cannot be rendered to any container other than document.body, and as such, you can only use one Viewport instance per page.
mjlecomte
27 Sep 2008, 3:51 PM
This blurb should be added to the top of Container:
Use XTypes to optimize Component creation and rendering. Any Component can be created implicitly as an object config with an xtype specified, allowing it to be declared and passed into the rendering pipeline without actually being instantiated as an object. Not only is rendering deferred, but the actual creation of the object itself is also deferred, saving memory and resources until they are actually needed. In complex, nested layouts containing many Components, this can make a noticeable improvement in performance.
//Explicit creation of contained Components:
var panel = new Ext.Panel({
...
items: [
new Ext.Button({
text: 'OK'
})
]
};
//Implicit creation using xtype:
var panel = new Ext.Panel({
...
items: [{
xtype: 'button',
text: 'OK'
}]
};
In the first example, the button will always be created immediately during the panel's initialization. With many added Components, this approach could potentially slow the rendering of the page. In the second example, the button will not be created or rendered until the panel is actually displayed in the browser. If the panel is never displayed (for example, if it is a tab that remains hidden) then the button will never be created and will never consume any resources whatsoever.
mjlecomte
28 Sep 2008, 5:08 PM
Class Ext.Button
Package: Ext
Defined In: Button.js
Class: Button
Missing description for formBind config.
Only applicable for buttons in an Ext.FormPanel...blah blah...cross link with monitorValid of FormPanel.
saJoshua
30 Sep 2008, 4:23 AM
Class Ext.grid.EditorGridPanel
Package : Ext
Defined in : EditorGrid.js
Class Ext.grid.GridPanel
Package : Ext
Defined in : GridPanel.js
Class Ext.grid.PropertyGrid
Package : Ext
Defined in : PropertyGrid.js
Missing description for setDisabled config.
There is also a dead link pointing to where the missing description should be, when searching from the welcome page in docs.
mjlecomte
30 Sep 2008, 4:53 AM
saJoshua you don't say why you think it should be shown or where it's listed in the docs now with the dead link?
Ext Team:
It looks like setDisabled is a method (not config) of Component.
Is this a problem with the jsDoc algorithm or how it's currently tagged? I say this because just before setDisabled is "//private". Keep going upward in the file and look at all the places it is marked "//private"....the next property afterwards doesn't show up in the docs even if it has description. So it appears the private tag is cascading down to the next properties??
mjlecomte
30 Sep 2008, 9:22 AM
http://extjs.com/deploy/dev/docs/?class=Ext.data.Record&member=create
As reported here (http://extjs.com/forum/showthread.php?p=231767#post231767)the example is wrong:
currently:
var TopicRecord = Ext.data.Record.create([
{name: 'title', mapping: 'topic_title'},
{name: 'author', mapping: 'username'},
{name: 'totalPosts', mapping: 'topic_replies', type: 'int'},
{name: 'lastPost', mapping: 'post_time', type: 'date'},
{name: 'lastPoster', mapping: 'user2'},
{name: 'excerpt', mapping: 'post_text'}
]);
var myNewRecord = new TopicRecord({
topic_title title: 'Do my job please',
username author: 'noobie',
topic_replies totalPosts: 1,
//etc
});
myStore.add(myNewRecord);
Don't know if its already reported, function Ext.util.Format.nl2br() is not documented in Ext 2.2 docs. Its mentioned in the release notes.
mjlecomte
3 Oct 2008, 1:15 PM
[implemented]
http://extjs.com/deploy/dev/docs/?class=Ext.data.Store
sortInfo : Object
A config object in the format: {field: "fieldName", direction: "ASC|DESC"}. The direction property is case-sensitive.
sortInfo : Object
A config object in the format: {field: "fieldName", direction: "ASC|DESC"} to be used as the initial sort order for the store, if not specified the no sorting is performed (other than that included in the original mixed collection). The direction property is case-sensitive.
Rationale:
Based on some forum posts I don't think people recognize that this is what controls the initial sorting or lack thereof.
hi,
maximised option for Ext.Window missing in docs, please see
http://extjs.com/forum/showthread.php?t=49197
thanks and carry on the good work!
ciao
SJ
mjlecomte
7 Oct 2008, 6:20 AM
Class Ext.data.JsonReader
Package: Ext.data
This may not have been reported and hence overlooked for doc fixes:
http://extjs.com/forum/showthread.php?p=176027#post176027
Could add description as mentioned in thread, or show sortInfo as a property in the example code snippet shown to give someone better clues what they need to do.
Condor
10 Oct 2008, 12:49 AM
[implemented]
Ext.form.BasicForm.getValues()
The description needs extra clarification. I propose:
/**
* Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit.
* If multiple fields exist with the same name they are returned as an array.
* getValues does NOT return the values of the fields in the items collection. Instead it returns the values of all enabled control elements (input, select, textarea) and the first submit button (if present) in the BasicForm <form> tag.
* This means that all returned values are Strings (or Arrays of Strings) and that the the value can potentionally be the emptyText of a field.
* @param {Boolean} asString (optional) false to return the values as an object (defaults to returning as a string)
* @return {String/Object}
*/
(see this post (http://extjs.com/forum/showthread.php?t=49596))
Condor
10 Oct 2008, 9:36 PM
[implemented]
The description for Ext.urlDecode is wrong:
/**
* Takes an encoded URL and and converts it to an object. e.g. Ext.urlDecode("foo=1&bar=2"); would return {foo: "1", bar: "2"} or Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); would return {foo: "1", bar: ["2", "3", "4"]}.
* @param {String} string
* @param {Boolean} overwrite (optional) Items of the same name will overwrite previous values instead of creating an an array (Defaults to false).
* @return {Object} A literal with members
*/
(decoded values are always Strings and urlDecode returns arrays if overwrite is false)
Condor
13 Oct 2008, 4:05 AM
The API doc for Ext.form.TextField is missing config option stripCharsRe.
/**
* @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value before validation (defaults to null).
*/
Ext.form.NumberField uses stripCharsRe internally, so it needs:
/**
* @cfg {RegExp} stripCharsRe @hide
*/
mjlecomte
15 Oct 2008, 7:36 PM
Class Ext.grid.ColumnModel
Seems to have some errant/hanging text in description:
The config options defined by
Also, I question the validity of the config property: listeners. I don't see how it would be used for this class due to the nature of the constructor. I think the only thing you can do is addlisteners, not specify a listeners property? Same goes for menuDisabled. These seem to be more appropriately classified as properties, not config options?
mjlecomte
17 Oct 2008, 6:04 AM
http://extjs.com/deploy/dev/docs/?class=Ext.data.GroupingStore
GroupingView has a nice example at top and users can fairly easily see that they must use a GroupingStore. However, if someone were to start at GroupingStore they don't see they need a GroupingView. Suggest to post a link / blurb at top of GroupingStore referring users to GroupingView.
stebru
20 Oct 2008, 4:41 AM
Class: Ext.Fx
http://extjs.com/deploy/dev/docs/?class=Ext.Fx
The documentation for the frame method states that the duration config option applies to the animation time as a whole, and not each individual ripple.
Shouldn't it be the other way around?
mjlecomte
26 Oct 2008, 4:44 AM
[implemented]
Ext.form.TextField is missing config doc for enableKeyEvents. It's documented in the events, but should probably be listed as a config option as well.
mjlecomte
27 Oct 2008, 3:45 AM
Class Ext.data.JsonReader
Package: Ext.data
This may not have been reported and hence overlooked for doc fixes:
http://extjs.com/forum/showthread.php?p=176027#post176027
Could add description as mentioned in thread, or show sortInfo as a property in the example code snippet shown to give someone better clues what they need to do.
Bumping this post again as I haven't seen a fix applied to svn (or this thread crossed out per convention indicated in first post that would be followed when done). People are still missing this (currently) obscure point.
http://extjs.com/forum/showthread.php?p=243542#post243542
Class Ext.data.Connection
There are two @link references that appear to not be rendering correctly in the main description at the top. Look for {@link #request-option-success callback} and {@link #request-option-isUpload File uploads}.
watrboy00
4 Nov 2008, 11:26 AM
Ext.SplitBar adds an event 'beforeapply' in its constructor and fires the event in onEndProxyDrag but does not show in the API.
Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){
this.el = Ext.get(dragElement, true);
this.el.dom.unselectable = "on";
this.resizingEl = Ext.get(resizingElement, true);
this.orientation = orientation || Ext.SplitBar.HORIZONTAL;
this.minSize = 0;
this.maxSize = 2000;
this.animate = false;
this.useShim = false;
this.shim = null;
if(!existingProxy){
this.proxy = Ext.SplitBar.createProxy(this.orientation);
}else{
this.proxy = Ext.get(existingProxy).dom;
}
this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId : this.proxy.id});
this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this);
this.dd.endDrag = this.onEndProxyDrag.createDelegate(this);
this.dragSpecs = {};
this.adapter = new Ext.SplitBar.BasicLayoutAdapter();
this.adapter.init(this);
if(this.orientation == Ext.SplitBar.HORIZONTAL){
this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT);
this.el.addClass("x-splitbar-h");
}else{
this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM);
this.el.addClass("x-splitbar-v");
}
this.addEvents(
"resize",
"moved",
"beforeresize",
"beforeapply"
);
Ext.SplitBar.superclass.constructor.call(this);
};
onEndProxyDrag : function(e){
Ext.get(this.proxy).setDisplayed(false);
var endPoint = Ext.lib.Event.getXY(e);
if(this.overlay){
Ext.destroy(this.overlay);
delete this.overlay;
}
var newSize;
if(this.orientation == Ext.SplitBar.HORIZONTAL){
newSize = this.dragSpecs.startSize +
(this.placement == Ext.SplitBar.LEFT ?
endPoint[0] - this.dragSpecs.startPoint[0] :
this.dragSpecs.startPoint[0] - endPoint[0]
);
}else{
newSize = this.dragSpecs.startSize +
(this.placement == Ext.SplitBar.TOP ?
endPoint[1] - this.dragSpecs.startPoint[1] :
this.dragSpecs.startPoint[1] - endPoint[1]
);
}
newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize);
if(newSize != this.dragSpecs.startSize){
if(this.fireEvent('beforeapply', this, newSize) !== false){
this.adapter.setElementSize(this, newSize);
this.fireEvent("moved", this, newSize);
this.fireEvent("resize", this, newSize);
}
}
}
makana
7 Nov 2008, 7:17 AM
Class: Ext.Toolbar
Method: insertButton
Only buttons are added by this function, not an element of any type, like mentioned in the docs.
Check http://www.extjs.com/forum/showthread.php?t=41817
watrboy00
10 Nov 2008, 10:48 AM
Class: Ext.grid.GridPanel
Config Option: stateEvents : Array An array of events that, when fired, should trigger this component to save its state (defaults to none). These can be...
An array of events that, when fired, should trigger this component to save its state (defaults to "columnmove", "columnresize", "sortchange"). These can be any types of events supported by this component, including browser or custom events (e.g., ['click', 'customerchange']). See stateful (http://extjs.com/forum/../deploy/dev/docs/output/Ext.Component.html#stateful) for an explanation of saving and restoring Component state.
timb
13 Nov 2008, 10:38 AM
OK, got it. Thanks for the clarification.
Is it possible to expand the documentation to avoid future confusion? The current documentation is
clone() : MixedCollection
Creates a duplicate of this collection
...
Just having the word "clone" is a little ambiguous. It would be nice if it specified that it is a shallow clone, as the description doesn't help clarify if it's a shallow clone or deep clone.
mjlecomte
17 Nov 2008, 10:19 AM
Class Ext.form.TextField (http://extjs.com/deploy/dev/docs/?class=Ext.form.TextField)
emptyText (http://extjs.com/deploy/dev/docs/?class=Ext.form.TextField&member=emptyText)
According to Jack (see first link here (https://extjs.com/forum/showthread.php?p=91466#post91466) or here (http://extjs.com/forum/showthread.php?p=52636#post52636)), this is not a code bug, so I think the Docs should be amended for emptyText (http://extjs.com/deploy/dev/docs/?class=Ext.form.TextField&member=emptyText)
current:
The default text to display in an empty field (defaults to null).
proposed:
The default text value to set and display in an empty field (defaults to null). This value will be sent with form submit() by default. If you want this text to be only for display / informational purposes, then your backend system should either be set up to ignore it or you will need to clear it client side before sending to the server.
submit:function() {
var form = this.getForm();
// clear emptyText values before submit()
form.items.each(function(item){
if (item.el.getValue() == item.emptyText) {
item.el.dom.value = '';
}
});
form.submit({...});
}
I have not tested that code snippet, just whipped it up now as an idea.
oxyum
17 Nov 2008, 9:54 PM
another solution (http://extjs.com/forum/showthread.php?t=44295) for emptyText submitting problem.
Mjollnir26
20 Nov 2008, 1:22 AM
Ext.Record.create is not completly accurate on what is possible using the "sortType" property. Condor said i should post that here. See this for more info:
http://extjs.com/forum/showthread.php?t=53191
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.