1. #81
    Ext User williware's Avatar
    Join Date
    Aug 2009
    Location
    Alpharetta, GA
    Posts
    6
    Vote Rating
    0
    williware is on a distinguished road

      0  

    Default Two Routers

    Two Routers


    When adding another handler in the same namespace, I have been foiled by the built in caching. Turn off the caching, or reset IIS. Maybe that can help.
    Dave W

  2. #82
    Ext User
    Join Date
    Mar 2008
    Posts
    125
    Vote Rating
    0
    thomson is on a distinguished road

      0  

    Default


    Can somebody let me know which is the latest Router Version?

    Thanks in Advance
    Thomson

  3. #83
    Ext User Dave.Sanders's Avatar
    Join Date
    Mar 2008
    Posts
    131
    Vote Rating
    0
    Dave.Sanders is on a distinguished road

      0  

    Default


    Latest "official" code is in post #1 (the 0.6 version)

    My latest code with the additions I've mentioned in this thread, which I don't believe the Ext team has had time to evaluate and include, are in this message:

    http://extjs.com/forum/showthread.ph...222#post366222

    Or on my site at:

    http://vulgrin.com/DavesExtDirectBranch.zip

    because someone had a problem unzipping the version I uploaded.

    I would have started a new thread for my "branch" but the changes aren't all that different and I'd rather they just get included in the original code. There was talk about setting up a google code for it, and if someone at Ext wants to do that then I'll happily seed it with my latest copy to eliminate confusion.

    D

  4. #84
    Ext User
    Join Date
    Mar 2008
    Posts
    125
    Vote Rating
    0
    thomson is on a distinguished road

      0  

    Default


    Hello All,
    I have tried using the router version 6 i have tried calling a function using Ext.Direct

    In firebug i can see there is a post happening to the handler and immediately i am getting the

    uncaught exception: Ext.data.DataProxy: DataProxy attempted to execute an API-action but found an undefined url / function. Please review your Proxy url/api-configuration.

    I am loading the store using the following code

    Code:
    var mystore = new Ext.data.DirectStore({
        paramsAsHash: false,
        root: 'Rows',
        api: {
            load: MyApp.Sample.GetOrder('labelle')
        },
        //directFn: ,
        idProperty: 'id',
        autoLoad: true,
        fields: [
                        { name: 'id' },
                        { name: 'name' }
                   
    
                ],
    
        listeners: {
            load: function(s, records) {
                Ext.MessageBox.alert("Information", "Loaded " + records.length + " records");
            },
            beforeload: function(t, params) {
                Ext.MessageBox.alert(t);
            },
            exception: function(current, action, rs, params) {
                Ext.MessageBox.alert(action);
    
            }
        }
    });
    
    var grid = new Ext.grid.GridPanel({
                store:mystore,
                 cm: new Ext.grid.ColumnModel([
                                new Ext.grid.RowNumberer(),
                                { header: "+/-", width: 120, sortable: true, dataIndex: 'id' },
                                { header: "Sel", width: 70, sortable: true, dataIndex: 'name' },
                                  
                               ]),
    
                viewConfig: {
                    forceFit: true
                }      
    
            });
    The Response will be having a Result attribute which having my json, How do i tell the reader to take only that

    Thanks in Advance

    Thomson

  5. #85
    Ext User Dave.Sanders's Avatar
    Join Date
    Mar 2008
    Posts
    131
    Vote Rating
    0
    Dave.Sanders is on a distinguished road

      0  

    Default


    I don't understand the "api" property you have on your directstore. Here's an example of one of mine:

    Code:
    noteStore: new Ext.data.DirectStore({
    		directFn	: Note.GetNotes,
    		idProperty	: 'NoteId',
    		root		: 'notes',
    		fields		: ["NoteId", "ShortText", "NoteText", "Updated", "Username"]
    	}),
    This calls a method that gathers up the note objects and then packs them into a custom JSON object that I use in my C# code. The method returns that, which gets turned into the JSON below and sent back to the browser.

    Code:
    {"type":"rpc","tid":5,"action":"Note","method":"GetNotes",
    "result":
       {"total":2,"notes":[{"ShortText":"test note asdf asfasdf","NoteId":7295,"SampleId":21704,"NoteText":"test note asdf asfasdf","Updated":new Date(1250429820000),"Username":"dsanders"},
    
    {"ShortText":"booga","NoteId":7296,"SampleId":21704,"NoteText":"booga","Updated":new Date(1250429820000),"Username":"dsanders"}]}}]
    (I'm not using 0.6 btw, I'm using my branch of it, so I don't use ParamsAsHash, etc.)

  6. #86
    Ext User
    Join Date
    Mar 2008
    Posts
    125
    Vote Rating
    0
    thomson is on a distinguished road

      0  

    Default


    Hello Sanders,
    Can you send me a sample of your code using the Ext.Direct version of yours

    Thanks
    Thomson

  7. #87
    Ext User
    Join Date
    Mar 2008
    Posts
    125
    Vote Rating
    0
    thomson is on a distinguished road

      0  

    Default


    Hello Sanders,
    Can u give an example using Dave ExtBranch, I just replaced your dll in the router 6 , now its complaining of missing DirectHandler

    Thanks

    Thomson

  8. #88
    Ext User Dave.Sanders's Avatar
    Join Date
    Mar 2008
    Posts
    131
    Vote Rating
    0
    Dave.Sanders is on a distinguished road

      0  

    Default


    FYI, I think there is a bug in the sample. The sample is setting the response content type to "text/javascript". This is fine for the majority of the operations, but it makes Ext.Direct throw up parsing errors when you try to do a file upload. In the sample, here are the two lines:

    Code:
    private const string DirectHandlerContentType = "text/javascript";
    ...
    context.Response.ContentType = DirectHandlerContentType;
    I took out the assignment in my code and it seems to be working all around - so I think this was an unnecessary step anyway. Will report back if its not.

    What's funny is that the third form of the sample (the one where you upload an image file) was failing silently. The file would get uploaded to the code, but if you notice, the callback code never ran. Just escaped notice until now I guess.

    D

  9. #89
    Ext User Dave.Sanders's Avatar
    Join Date
    Mar 2008
    Posts
    131
    Vote Rating
    0
    Dave.Sanders is on a distinguished road

      0  

    Default


    To Mark: (mbajema)

    Concerning your ComplexObjectConverter code from waaaay back on post #57, there is a bug. In ReadArray, those should really be If...else if...else statements, not separate Ifs.

    I found a bug where if you are sending in an array of vars from the client, it was adding on a null object to the list of parameters in Request Data. This was making the processor blow up because it would be looking for the wrong number of arguments to pass to the DirectMethod. If you change the function to read like this, the problem goes away:

    Code:
            private object[] ReadArray(JsonReader reader)
            {
                ArrayList output = new ArrayList();
                while (reader.Read())
                {
                    if (reader.TokenType == JsonToken.EndArray)
                    {
                        return output.ToArray();
                    }
                    else if (reader.TokenType == JsonToken.StartArray)
                    {
                        output.Add(ReadArray(reader));
                    }
                    else if (reader.TokenType == JsonToken.StartObject)
                    {
                        output.Add(ReadObject(reader));
                    }
                    else
                    {
                        output.Add(reader.Value);
                    }
                }
    
                throw new JsonReaderException();
            }
    Cheers
    D

  10. #90
    Ext User Dave.Sanders's Avatar
    Join Date
    Mar 2008
    Posts
    131
    Vote Rating
    0
    Dave.Sanders is on a distinguished road

      0  

    Default


    Quote Originally Posted by thomson View Post
    Hello Sanders,
    Can u give an example using Dave ExtBranch, I just replaced your dll in the router 6 , now its complaining of missing DirectHandler
    It's Dave. The examples given in the Direct Pack from Ext should work with my branch of Ext.Direct. My code doesn't change the interfaces, it just adds some features as listed in posts #44, #45 and #46 of this thread.

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