-
23 Feb 2009 5:43 AM #581
Editor
Editor
Class: Ext.Editor
I think following config options should be listed in the API:- allowBlank: boolean
- blankText: String
-
23 Feb 2009 5:58 AM #582Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Ext.Editor doesn't have allowBlank and blankText options. The field of the editor (first argument in the constructor) can have these config options.
ps. The Organizer example uses an Ext.tree.TreeEditor (not an Ext.Editor), of which the second constructor argument is the config option for the TextField. The third constructor argument is the actual Ext.tree.TreeEditor config options object.
-
23 Feb 2009 6:02 AM #583
-
24 Feb 2009 3:35 PM #584
Clarification about Failure handler in Ext.Ajax.request
Clarification about Failure handler in Ext.Ajax.request
Class: Ext.Ajax
I think it would be a good idea to explicitly state in the documentation that the failure handler of the Ext.Ajax.request method is only executed it there's an HTTP failure.
I found at least five different threads were people were assuming that the failure method would be called by just setting the response to something like {success:false} (like in forms)
-
24 Feb 2009 5:05 PM #585
So what is missing from http://extjs.com/deploy/dev/docs/out...member=request ? There's a bullet for "failure".
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
25 Feb 2009 12:10 PM #586
How about this?
Current
failure : Function (Optional)
The function to be called upon failure of the request. The callback is passed the following parameters:
Proposed
failure : Function (Optional)
The function to be called when the server response contains an HTTP error code. The callback is passed the following parameters
IMHO "failure: the function to be called upon failure " is too terse
-
25 Feb 2009 12:29 PM #587
Alternatively (or in addition) you could add a small paragraph in the class description indicating this. For example, this is how YUI documents it :
When reconciling a transaction, Connection Manager will evaluate the HTTP code returned by the server to determine if the request was successful and will then call the appropriate callback handler (success or failure).
-
25 Feb 2009 12:37 PM #588
The connection may time out with no response from server also....which also dumps you into failure block.
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
25 Feb 2009 1:00 PM #589
Good point, how about something like this
The function to be called when the server response contains an HTTP error code. This function is also invoked when a request exceeds the Ext.Ajax.timeout value. The callback is passed the following parameters
-
26 Feb 2009 2:51 PM #590
Undocumented boolean operators in XTemplate
Undocumented boolean operators in XTemplate
Class Ext.XTemplate
I found out that you can use more than one condition in the tpl if attribute. I first trying using 'and' (like in Xpath), but found out that the correct way is to use '&&'
For example:
This how I would document it (my addition in red)PHP Code:var tpl = new Ext.XTemplate(
'<p style=\'margin-left:10px\'>This file will be shared with',
'<tpl if="this.isGrp()==false && values.length == 1"> the following person</tpl>',
'<tpl if="this.isGrp()==false && values.length > 1"> {values.length} individuals</tpl>:',
'</p>',
'<div class="user-list" >',
'<tpl for=".">',
'<tpl if="this.isGrp()==false">',
'<div class="user-item">{name}</div>',
'</tpl>',
'<tpl if="this.isGrp()">',
'<div class="group-item">{name}</div>',
'</tpl>',
'</tpl>',
'</div>',
{ isGrp: function() { return store.dyn; } }
);
Basic conditional logic
Using the tpl tag and the if operator you can provide conditional checks for deciding whether or not to render specific parts of the template. Note that there is no else operator — if needed, you should use two opposite if statements. Use of multiple conditions is supported via the && and || operators. Properly-encoded attributes are required as seen in the following example:


Reply With Quote