1. #181
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Ext.Direct.Mvc v0.9.1 released

    Changes:
    * Removed all DirectForm extension methods. The structure of return data should
    always be the responsibility or choice of a developer.
    * Includes binaries precompiled with ASP.NET MVC 1.0 and 2.0 RC 2.
    * Bug fixes and code clean-up.
    Note the first item in the change list. After a very careful consideration I have decided to permanently drop DirectForm() extension methods from the library. It will most likely require you to make changes to your code.

    There were no major changes introduced in this version so you can keep using v0.9.0 if you like.

  2. #182
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default Is this direct form related?

    Is this direct form related?


    [FormHandler]
    [ValidateInput(false)]
    publicActionResult SavePost()
    {

    }
    I use the form handler methods for some of my methods because they handle file uploads, and I have several different combinations of fields to pass. If you have removed this on the new version I don't quite understand why it is so bad to have FormHandler. I have three that take advantage of the FormHandler.

    We are having problems only with IIS7 Server 2008 on several month old version of your router, so we tried the latest. So far we haven't gotten it to work correctly, with a debug message configuration error in your controller when we run the website.

  3. #183
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Ext.Direct.Mvc v1.0.0 released

    Changes:
    * Signed the assembly with a strong name.
    * Fixed: ValidateInputAttribute on a custom controller or action was not working. Request would always be validated.
    I have decided to finally bump the version number to 1.0.0 because it has been pretty stable and no major changes were introduced for quite some time.

    Please refer to the first post of this thread for the links.

    geewhizbang: The defect with ValidateInput attribute not working was just recently found by myself. It is fixed in this version. FormHandler attribute is still there, it was never removed from the library.

  4. #184
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default


    Just to note that I have solved the issues converting from ~0.8 Ext.Direct.MVC to 1.0.

    It was actually fairly painless. I just had to search and replace on our controller to replace "return Direct" to "return this.Direct"

    The new configuration in web.config is a lot simpler.

    The worst problem was actually my own brain-dead copying of the dlls into the wrong places, so the old ones were still being used.

    I've been wanting to upgrade to this for some time now and the Server 2008 issue we encountered with the older version trumps my boss's paranoia about using a new version of a utility this late in the dev cycle.

    We are going to really need your improved error handling mechanisms so that the debugging is easier and we have fewer mysterious failures bogging us down.

  5. #185
    Ext User
    Join Date
    Aug 2009
    Posts
    78
    Vote Rating
    0
    isit.gd is on a distinguished road

      0  

    Default


    i have my controllers split accross projects as it needs to be modular in design - how can i make ext.direct.mvc use these controllers?

    by the looks of it GetCurrentProvider uses DirectConfig.Assembly which is a single assembly name and uses it to configure a single DirectProvider - does this mean that there is no way of splitting controller logic accross projects?

    w://

  6. #186
    Ext User
    Join Date
    May 2009
    Posts
    1
    Vote Rating
    0
    Skinny79 is on a distinguished road

      0  

    Default


    First of all, thanks for this great piece of work. I started using it today but i'm already very impressed!

    I hope i'm not getting crazy after many hours of work today, but I have managed to get an ExtJS Grid linked to a DirectStore/Proxy and use the Ext.Direct server side implementation to expose my (test) Controller action Get and Update.

    My store script looks like this :

    Code:
      var writer = new Ext.data.JsonWriter
      ({
        encode: false,  // Very important, defaults to true
        writeAllFields: true
      });
    
       var ds = new Ext.data.DirectStore({
          api: {
            read: Stores.Get,
            update: Stores.Update
          },
          paramsAsHash: false,
          paramOrder: 'start|limit|sort|dir',
          root: 'stores',
          idProperty: 'StoreID',
          totalProperty: 'total',
          successProperty: 'success',
          messageProperty: 'message',
          sortInfo: {
            field: 'Name',
            direction: 'ASC'
          },
          fields: [
                    { name: 'StoreID', type: 'int' },
                    { name: 'Name', type: 'string' }
               ],
          remoteSort: true,
          writer: writer,
          autoLoad: false,
          autoSave: true
        });
    My server side Update method has the following signature :

    Code:
    public ActionResult Update(StoreInfo info)
    where StoreInfo is just a simple DTO with just two properties (StoreID, Name)

    Loading the grid is no problem, editing works fine, but during the update the JSON message posted to the server looks like this :

    Code:
    {"action":"Stores","method":"Update","data":[{"stores":{"StoreID":321,"Name":"Winkel 23"}}],"type":"rpc","tid":3}
    Where "stores" is the rootProperty defined in the store.

    I suspect that because the grid can send multiple updates in one request, the 'data' property contains an array. But even when I change the method parameter to StoreInfo[], all objects remain empty/null.

    I traced the issue down to the call to JsonConvert.DeserializerObject in DirectMethodInvoker.cs where it seems to expect the rawValue without the (in my case) 'stores'


    Can someone please give me a hit on how to handle these kind of Grid updates ?

    Thanks!
    Mark

  7. #187
    Ext User
    Join Date
    Dec 2009
    Posts
    6
    Vote Rating
    0
    bwaters is on a distinguished road

      0  

    Lightbulb


    Mark,

    I too struggled with the same issues that you are facing. Below is an example of how I set up the objects and update method in C#. In the case below, there is one parameter, "extraparam", that is passed via baseParams. In this case, the root object of the store is named "rows" and matches the store field definition.

    Code:
            public class RecordRequest
            {
                public class RecordRequest_Data
                {
                    public int id { get; set; }
                    public string name { get; set; }
                    public int type { get; set; }
                }
    
                public int extraparam { get; set; }
                public RecordRequest_Data rows { get; set; }
            }
    
            public ActionResult updateRecord(RecordRequest rqst)
            {
                ...
            }
    I hope that this helps.

    Brian.

  8. #188
    Sencha User
    Join Date
    Mar 2007
    Posts
    761
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default doubt about using exception event

    doubt about using exception event


    Hi, I have in the application

    Code:
      Ext.Direct.on('exception', function(e) {
    
            var title = 'Direct Exception', message;
    
            if (Ext.isDefined(e.where)) {
                // Detailed error message for developer
                message = String.format('<b>{0}</b><p>The exception was thrown from {1}.{2}()</p><pre>{3}</pre>', Ext.util.Format.nl2br(e.message), e.action, e.method, e.where);
                var w = new Ext.Window({
                    title: title,
                    width: 600,
                    height: 400,
                    modal: true,
                    layout: 'fit',
                    border: false,
                    maximizable: true,
                    items: {
                        html: message,
                        autoScroll: true,
                        preventBodyReset: true,
                        bodyStyle: 'font-size:12px',
                        padding: 5
                    },
                    buttons: [{
                        text: 'OK',
                        handler: function() {
                            w.close();
                        }
                    }],
                    buttonAlign: 'center',
                    defaultButton: 0
                }).show();
            } else {
                // User friendly message for end user
                message = 'Error occured. Unable to process request.';
                Ext.Msg.alert(title, message);
            }
        });
    so each exception is catched in this event, but now I have a RowEditor iside the grid in bank.js file and when I do Update to BanksController.cs, method Update, if I got some exception never I get answer to the function in bold (see below), and in my case I need to cancel the edit in the row to restore the original value in the record, so how I can handle this scenario with using Ext.direct for MVC?

    Code:
     beforePost: function(editor, changes, r, rowIndex) {
              
                 Banks.Update(this.newRecord, r.data,
                        function(result, response) {
                             debugger //This line is never reached.
                            if (result.success) {
                           
                            }
                            else
                            {
                             debugger;   //This line is never reached.
                            
                            }
    
                        }, this);
    
                return true;
        },

    any advice please is welcome

    best regards
    Frank

  9. #189
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Skinny79, it is the way DirectWriter works. There's nothing I can do to "fix" it in my library. The solution proposed by bwaters is probably what you want.

    franklt69, in you case it looks like the callback function is never called. First, make sure the beforePost event actually gets fired. Second, do you have a namespace defined in the ext.direct section in your web.config file? Can you post the signature of the Update action? Also check the values of the arguments before you call the method on the client.

  10. #190
    Sencha User
    Join Date
    Mar 2007
    Posts
    761
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    Thanks elishnevsky, yes the function beforePost: function(editor, changes, r, rowIndex) {} is actually gets fired because I can debug the Update Method in the the controller

    this is the method:

    Code:
         [DirectHandleError]
           public ActionResult Update(bool _new, DTOBankAccount aBankAccountRecord)
            {
                try
                {
                    BankAccount aBankAccount = new BankAccount(aBankAccountRecord.AccountNo,
                                                                aBankAccountRecord.BankAccountID,
                                                                aBankAccountRecord.BankCode,
                                                                aBankAccountRecord.CompleteFilePath,
                                                                aBankAccountRecord.Currency,
                                                                aBankAccountRecord.DailyMappingFormat,
                                                                aBankAccountRecord.EDT_ID,
                                                                aBankAccountRecord.EDTTypeID,
                                                                aBankAccountRecord.PartialMappingFormat,
                                                                aBankAccountRecord.PendingFilePath);
                   
                    if (_new)
                    {
                        var result = new
                        {
                            success = _adminService.InsertBankAccount(aBankAccount)
                        };
                        return this.Direct(result);
                    }
                    else
                    {
                        var result = new
                        {
                            success = _adminService.UpdateBankAccount(aBankAccount)
                        };
                        return this.Direct(result);
                    }
                }
                catch (Exception ex)
                {
                    var e = new DirectException("This statement is the original exception message.");
                    e.Data.Add("stringInfo", "Additional string information.");
                    e.Data["intInfo"] = -903;
                    e.Data["dateTimeInfo"] = DateTime.Now;
                    throw e;
                    return this.Direct("This line is never reached.");
    
                }
    
            }

    in the web.config I have it


    PHP Code:
    [B] <ext.direct
            providerName
    ="Ext.app.REMOTING_API"
            
    assembly="APP.BC.Admin2" //this is the name of my assembly
            
    dateFormat="Iso"
            
    debug="true"
        
    />[/B
    best regards
    Frank

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi