1. #491
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,133
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Yes, your guess is right. Now, if cm config held an information on how to place fields you could use the info. Anything you add to cm config that is not recognized by ColumnModel itself is ignored, so you can add any info you need and then utilize it for a custom RecordForm layout.

  2. #492
    Ext User
    Join Date
    Jan 2010
    Posts
    15
    Vote Rating
    0
    NicP is on a distinguished road

      0  

    Default


    @franklt69 - I wonder whether anyone has come up with a method of customized form layout for the recordForm plugin? I wish I was better versed in javascript and extjs but I'm afraid I'm not. I've got as far as I can but have some pretty large forms to present to the user and can't splodge everything on one panel... I am really stuck on how to pass my own fancy forms to the ux plugin.
    Please if you have any suggestions, I'd really appreciate it.

  3. #493
    Ext User
    Join Date
    Jan 2010
    Posts
    15
    Vote Rating
    0
    NicP is on a distinguished road

      0  

    Default


    Thanks Saki,

    I'll persevere with this!!

  4. #494
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,133
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Well, if the form(s) are really complex then it's questionable if the fastest way is to use the ux, primarily designed for simple form, or if to create layouts manually.

  5. #495
    Ext JS Premium Member
    Join Date
    Feb 2008
    Posts
    53
    Vote Rating
    0
    richgoldmd is on a distinguished road

      0  

    Default


    Saki,

    On Ext 3.1.1 - I recommend the following changes:

    Surround the fields updates with beginEdit/endEdit:
    Code:
       ,updateRecord:function() {
            this.record.beginEdit();
            // loop through form fields and update underlying record
            this.form.getForm().items.each(function(item, i) {
                this.record.set(item.name, item.getValue());
            }, this);
            this.record.endEdit();
            
            this.afterUpdateRecord(this.record);
    
        } // eo function updateRecord
    Also the field descriptor has changed. In create form config, use c.editor.field for 3.1.1.

    -Rich

  6. #496
    Ext User
    Join Date
    Jan 2010
    Posts
    15
    Vote Rating
    0
    NicP is on a distinguished road

      0  

    Default


    @Jove76

    Replace your sqlite code with:

    protected function getOdb($dsn, $user, $pass) {
    try {
    $dsn='mysql:host=localhost;dbname=trucksoft';
    $user='trucksoft';
    $pass='trucksoft';
    /* obtain a database connection handle */
    $odb = new PDO($dsn, $user, $pass);

    } catch (PDOException $exception) {
    printf("Failed to connect to the database. Error: %s", $exception->getMessage());
    }

    $odb->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $odb->setAttribute(PDO::ATTR_AUTOCOMMIT, false);

    return $odb;
    } // eo function getOdb

  7. #497
    Ext User
    Join Date
    Jan 2010
    Posts
    15
    Vote Rating
    0
    NicP is on a distinguished road

      0  

    Default Custom Form Layouts

    Custom Form Layouts


    Hello Cleverer people than me!

    Has anyone come up with or willing to assist me with a custom form layout for the Grid RecordForm plugin? I have been trying to get this to work with frustratingly little result, in fact, make that ZERO result and after almost two weeks, I am ready to render myself to the dustbin!

    Appreciate your help.
    Nic

  8. #498
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    564
    Vote Rating
    8
    Dumas is on a distinguished road

      0  

    Default


    Hi Saki!

    I'm using the recordForm together with a directstore and had to change the updateRecord so it works with the directstore. If you like it feel free to add it to the recordForm so everybody can use it with a directgrid with a writer.
    The problem is you change one field at a time, so the directstore writer sends multiple request (which get's exponentially more through an ext.direct "bug" or planning error). To just get one request I use a transaction, so here's my updateRecord:
    Code:
        ,updateRecord:function() {
            var record = this.record;
            
            // because of the directStore this has to be a transaction (for only one update)
            record.beginEdit();
            
            // loop through form fields and update underlying record
            this.form.getForm().items.each(function(item, i) {
                record.set(item.name, item.getValue());
            }, this);
            
            // end transaction
            record.endEdit();
            
            this.afterUpdateRecord(this.record);
    
        } // eo function updateRecord

    And a second thing where I'm not sure if my solution is the right one (but it works).

    When I open a recordForm window (first time, so it gets created), then scroll and open another one (second time, so it just gets shown) the window is not in the middle of the page and can be quite off the page. So what i did was going to here:
    Code:
        ,show:function(record, animEl) {
    
    
            // lazy create window
            if(!this.window) {
                this.window = this.getPanel();
            }
    and changing it to:
    Code:
        ,show:function(record, animEl) {
    
    
            // lazy create window
            if(!this.window) {
                this.window = this.getPanel();
            } else {
                // center it, because the viewport can have changed
                this.window.center();
            }
    best regards
    Roland


    PS: What are the dependecies for the recordForm? Do I need anything exept the rowActions (if I want to use it inside the grid)?

  9. #499
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,133
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Thank you very much for the info you provided.

    autoSave property of the Store can also be interesting.

    You do not even need RowActions if you have other way to display the RecordForm, for example a toolbar button that opens the RF window and loads it with the selected record.

  10. #500
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    564
    Vote Rating
    8
    Dumas is on a distinguished road

      0  

    Default


    I'm using stores autoSave, that's why the transaction is needed ;-)

    Of course, I just ment if there are any non-obvious dependencies. (Your example uses many plugins, e.g. Ext.ux.util, Ext.ux.Toast, ...)
    So for example the gridSearch needs Ext.ux.util. Are there any other dependencies?

    regards,
    Roland

Thread Participants: 97

  1. franklt69 (1 Post)
  2. Wolfgang (1 Post)
  3. mystix (1 Post)
  4. cobnet (8 Posts)
  5. chiphi13 (4 Posts)
  6. mike1993 (1 Post)
  7. violinista (1 Post)
  8. hui2008 (4 Posts)
  9. AlxH (12 Posts)
  10. oracio (1 Post)
  11. CINUE (2 Posts)
  12. phpcoder (3 Posts)
  13. ostghost (2 Posts)
  14. tdikarim (4 Posts)
  15. lkasdorf (3 Posts)
  16. derf (1 Post)
  17. mjlecomte (11 Posts)
  18. farracha (1 Post)
  19. jcwatson11 (2 Posts)
  20. robin30 (8 Posts)
  21. bluesapphire (1 Post)
  22. wm003 (1 Post)
  23. divxer (1 Post)
  24. escalade (2 Posts)
  25. boonkerz (5 Posts)
  26. JamesC (2 Posts)
  27. neenhouse (5 Posts)
  28. mask_hot (18 Posts)
  29. concep86 (2 Posts)
  30. sinma (2 Posts)
  31. kai5263499 (2 Posts)
  32. jcmartinez (1 Post)
  33. trak (1 Post)
  34. amit.shukld (1 Post)
  35. hsurya (1 Post)
  36. richgoldmd (1 Post)
  37. loic (7 Posts)
  38. jimpa911 (1 Post)
  39. chalu (3 Posts)
  40. damian79 (1 Post)
  41. jimkan (6 Posts)
  42. jahong (7 Posts)
  43. winnel (1 Post)
  44. joku (1 Post)
  45. josephf (2 Posts)
  46. indrajit_bin_rahwana (4 Posts)
  47. nojutsu (2 Posts)
  48. pokerking400 (15 Posts)
  49. georgiosleon (2 Posts)
  50. snilson (2 Posts)
  51. nightowl (1 Post)
  52. gthe (1 Post)
  53. descheret (1 Post)
  54. nebbian (2 Posts)
  55. se7en.hu (1 Post)
  56. towanime (2 Posts)
  57. pravidya (4 Posts)
  58. cnagel (2 Posts)
  59. extnam01 (2 Posts)
  60. Rothariger (6 Posts)
  61. dsmaevich (1 Post)
  62. uidtest (2 Posts)
  63. savant (4 Posts)
  64. aserron (1 Post)
  65. skaue (1 Post)
  66. ielektronick (1 Post)
  67. kalpan (4 Posts)
  68. jasonb885 (2 Posts)
  69. wemerson.januario (1 Post)
  70. extjs_new (23 Posts)
  71. Dumas (24 Posts)
  72. m.natarajan (1 Post)
  73. MrEnirO (4 Posts)
  74. jove76 (2 Posts)
  75. CircleCode (3 Posts)
  76. mdimino (7 Posts)
  77. flinz (2 Posts)
  78. vince (2 Posts)
  79. jmaldini (5 Posts)
  80. mixer80 (1 Post)
  81. prox00 (1 Post)
  82. macdoug1 (14 Posts)
  83. return1.at (8 Posts)
  84. islabucasgrande (1 Post)
  85. big (1 Post)
  86. NicP (9 Posts)
  87. taron133 (1 Post)
  88. araiczyk (1 Post)
  89. adhoul (1 Post)
  90. mayurid (9 Posts)
  91. Kalpit (10 Posts)
  92. bizcatalyst (1 Post)
  93. Manuelbond007 (2 Posts)
  94. nasargus (1 Post)
  95. shahab_et (1 Post)
  96. stevwinata (5 Posts)
  97. tomdchi (2 Posts)

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar