1. #581
    Ext User
    Join Date
    Feb 2009
    Posts
    13
    Vote Rating
    0
    flinz is on a distinguished road

      0  

    Default Editor

    Editor


    Class: Ext.Editor

    I think following config options should be listed in the API:
    • allowBlank: boolean
    • blankText: String
    I saw this being used in the http://extjs.com/deploy/dev/examples/organizer/organizer.html example, and it works fine.

  2. #582
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Quote Originally Posted by flinz View Post
    Class: Ext.Editor

    I think following config options should be listed in the API:
    • allowBlank: boolean
    • blankText: String
    I saw this being used in the http://extjs.com/deploy/dev/examples/organizer/organizer.html example, and it works fine.
    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.

  3. #583
    Ext User
    Join Date
    Feb 2009
    Posts
    13
    Vote Rating
    0
    flinz is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    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.
    Ah, indeed. Sorry, my bad!

  4. #584
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default 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)

  5. #585
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Quote Originally Posted by vmorale4 View Post
    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)
    So what is missing from http://extjs.com/deploy/dev/docs/out...member=request ? There's a bullet for "failure".

  6. #586
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default


    Quote Originally Posted by mjlecomte View Post
    So what is missing from http://extjs.com/deploy/dev/docs/out...member=request ? There's a bullet for "failure".
    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

  7. #587
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default


    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).

  8. #588
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    The connection may time out with no response from server also....which also dumps you into failure block.

  9. #589
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default


    Quote Originally Posted by mjlecomte View Post
    The connection may time out with no response from server also....which also dumps you into failure block.
    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

  10. #590
    Sencha User vmorale4's Avatar
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    189
    Vote Rating
    1
    vmorale4 is on a distinguished road

      0  

    Default 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:

    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; } }
        ); 
    This how I would document it (my addition in red)

    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:

Thread Participants: 182

  1. JeffHowden (3 Posts)
  2. Animal (64 Posts)
  3. tryanDLS (10 Posts)
  4. christocracy (1 Post)
  5. jarrod (2 Posts)
  6. jay@moduscreate.com (21 Posts)
  7. JTM (1 Post)
  8. vtswingkid (1 Post)
  9. young_matthewd (3 Posts)
  10. sjivan (1 Post)
  11. yogurtearl (1 Post)
  12. Condor (34 Posts)
  13. mdissel (2 Posts)
  14. steve.neill (4 Posts)
  15. mikegiddens (3 Posts)
  16. rmesser (1 Post)
  17. jweber (1 Post)
  18. aconran (8 Posts)
  19. vmorale4 (13 Posts)
  20. tof (4 Posts)
  21. stever (1 Post)
  22. berend (3 Posts)
  23. Jul (16 Posts)
  24. bone (2 Posts)
  25. timb (1 Post)
  26. punkrider (2 Posts)
  27. dolittle (4 Posts)
  28. papasi (1 Post)
  29. kimu (1 Post)
  30. willydee (2 Posts)
  31. dotnetCarpenter (1 Post)
  32. steven (3 Posts)
  33. DeyV (1 Post)
  34. cdomigan (1 Post)
  35. JorisA (2 Posts)
  36. MaxT (3 Posts)
  37. jsakalos (2 Posts)
  38. tellioglu (2 Posts)
  39. architect (1 Post)
  40. ksachdeva (1 Post)
  41. PFM (1 Post)
  42. evant (4 Posts)
  43. thesilentman (4 Posts)
  44. para (2 Posts)
  45. sj137 (6 Posts)
  46. J.C. Bize (3 Posts)
  47. Jonno70 (1 Post)
  48. splintor (9 Posts)
  49. mribbons (1 Post)
  50. danh2000 (1 Post)
  51. loeppky (2 Posts)
  52. mdm-adph (3 Posts)
  53. NBRed5 (1 Post)
  54. meej (1 Post)
  55. tobiu (1 Post)
  56. patspam (1 Post)
  57. gimbles (2 Posts)
  58. jan1234 (2 Posts)
  59. Ytorres (1 Post)
  60. aparajita (4 Posts)
  61. carol.ext (2 Posts)
  62. end-user (3 Posts)
  63. nicora (1 Post)
  64. devnull (4 Posts)
  65. AdamDawes (1 Post)
  66. mjlecomte (92 Posts)
  67. BlackICE1979 (1 Post)
  68. vincentc (1 Post)
  69. rednix (3 Posts)
  70. hansellh (1 Post)
  71. TaterSalad (1 Post)
  72. aptana_michelle (1 Post)
  73. Trixor (3 Posts)
  74. Iveco (1 Post)
  75. mscdex (4 Posts)
  76. watrboy00 (8 Posts)
  77. pic_Nick (1 Post)
  78. tohagan (1 Post)
  79. gimler (1 Post)
  80. smcguire36 (1 Post)
  81. ziesemer (2 Posts)
  82. balou (1 Post)
  83. yarmy (1 Post)
  84. jerrybrown5 (1 Post)
  85. abent (1 Post)
  86. lvanderree (4 Posts)
  87. Greenosity (1 Post)
  88. tjcrowder (18 Posts)
  89. treffer (2 Posts)
  90. SeaSharp (3 Posts)
  91. dhurlburtusa (1 Post)
  92. neshaug (2 Posts)
  93. tony_k (1 Post)
  94. Jim McCabe (1 Post)
  95. dyndan (1 Post)
  96. Hemlock (1 Post)
  97. runnersixty (1 Post)
  98. stoober (1 Post)
  99. battisti (1 Post)
  100. slobo (1 Post)
  101. plan-r (2 Posts)
  102. joeaudette (1 Post)
  103. paradawks (1 Post)
  104. saJoshua (7 Posts)
  105. t34 (6 Posts)
  106. markpele (1 Post)
  107. Gordon76 (1 Post)
  108. mankz (3 Posts)
  109. cblin (1 Post)
  110. jasonbronson (3 Posts)
  111. stebru (1 Post)
  112. Enes (1 Post)
  113. jburnhams (1 Post)
  114. david.james (1 Post)
  115. krystian (1 Post)
  116. erlando (1 Post)
  117. asteidle (1 Post)
  118. iamnoah (1 Post)
  119. molasses (1 Post)
  120. jonn (3 Posts)
  121. jhurst (1 Post)
  122. Starfall (14 Posts)
  123. creusois (1 Post)
  124. silvereen (1 Post)
  125. vilivili (2 Posts)
  126. jezmck (1 Post)
  127. nbourdeau (1 Post)
  128. YarivYaari (1 Post)
  129. luv2hike (1 Post)
  130. mrileyaz (1 Post)
  131. jmcneese (1 Post)
  132. treqx (1 Post)
  133. willdudziak (1 Post)
  134. NOSLOW (3 Posts)
  135. tomcheng76 (2 Posts)
  136. jove4015 (1 Post)
  137. xpurpur (1 Post)
  138. mknopp (1 Post)
  139. aurelien (2 Posts)
  140. nctag (5 Posts)
  141. pbuyle (1 Post)
  142. keckeroo (2 Posts)
  143. vcastel (1 Post)
  144. switch (1 Post)
  145. dcesarnascimento (1 Post)
  146. mirko (1 Post)
  147. mdkalman (1 Post)
  148. nb (1 Post)
  149. makana (2 Posts)
  150. fins (1 Post)
  151. NoahK17 (1 Post)
  152. Answerfor (1 Post)
  153. russn (1 Post)
  154. accilies (1 Post)
  155. SamuraiJack1 (1 Post)
  156. Eric24 (2 Posts)
  157. Funcracker (5 Posts)
  158. oxyum (1 Post)
  159. SoreGums (1 Post)
  160. Berni (1 Post)
  161. photomo (1 Post)
  162. nicktak (1 Post)
  163. don_luiz (2 Posts)
  164. wwarby (7 Posts)
  165. hAmpzter (1 Post)
  166. masuran (1 Post)
  167. ben_dog (3 Posts)
  168. thboileau (4 Posts)
  169. kds.chris (1 Post)
  170. salewski (1 Post)
  171. Mjollnir26 (1 Post)
  172. mikamikaze (1 Post)
  173. dreas (2 Posts)
  174. mschwartz (1 Post)
  175. jililv (2 Posts)
  176. TinKim (1 Post)
  177. zgrose (1 Post)
  178. martinjrb (1 Post)
  179. flinz (2 Posts)
  180. PierceSD (1 Post)
  181. dlgoodchild (1 Post)
  182. brian.moeskau (12 Posts)