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

      0  

    Default


    You don't have to create neither DirectRouter.ashx nor DirectApi.ashx. They are not physical files. These values are used by Ext.Direct.Mvc to define two routes - one to generate API, and one to route Direct requests. DirectHandler.ashx (or whatever value you used in web.config) simply defines URL to be used by Ext.Direct to make AJAX requests against.
    Just follow the steps in the first post precisely, and you'll be fine.

  2. #42
    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 The direct tab still fails

    The direct tab still fails


    I am starting to get a handle on this, but I still haven't set up my project correctly.

    http://www.box.net/shared/1h9o0ks0vo

    The project elishnevsky has setup works, but now I am trying to copy concepts from this page to another website, and I am missing something.

    I need something simpler to start, so I have just deleted out most of the content except for a panel and a "Hello World" button.

    I have deliberately used different namespaces because this forces me to understand where everything is coming from.

    I suspect that I have some problems with referring to the correct objects on this line (in Site.Master

    <%= Html.ActionLink("Direct", "DirectPage", "Direct")%></li>

    It fails in the following code:

    protectedoverridevoid ExecuteCore() {
    if (ControllerContext.RouteData.RouteHandler isDirectMvcRouteHandler) {
    this.ActionInvoker = newDirectMethodInvoker();
    } elseif (IsDirectMethodCall()) {
    thrownewInvalidOperationException("This controller action can only be executed by Ext.Direct.");
    }
    base.ExecuteCore();
    }


    This is the error I most often get:
    A public action method 'DirectPage' could not be found on controller 'Ext.Direct.Mvc.DirectController'.


    I have once gotten this error (with a prior edit of the code), but I haven't figured out how to duplicate it:
    This controller action can only be executed by Ext.Direct

  3. #43
    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 I have figured some of this out on my own

    I have figured some of this out on my own


    http://www.box.net/shared/ad841i4dal

    This new file is now correctly implements "Hello World" on the Direct tab.

    I was getting confused about namespace names, view names, and so on. Perhaps this example will help others since it is very simple.

    I am now working on implementing the CustomerOrders tab using ext.direct.

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

      0  

    Default


    As for your previous post, keep in mind, that every action in a controller, that inherits from DirectController, is considered a Direct method, unless marked with [DirectIgnore] attribute. Such controller actions should only be used by Ext.Direct and cannot be executed in any other way, except in a Direct request context.

    As for your last post, I don't understand your confusion. Can you please describe your problem?

  5. #45
    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


    I am new to the MVC pattern as well as to ExtJS. So almost everything about this is unfamiliar. So I was getting confused between Ext.Direct actions, view names, controllers, especially since I was renaming everything on purpose so such confusions WOULD happen and I'd have to work them out.

    I also had to rename the test project namespaces so I'd have more clarity while editing to know which project was the test bed and which was your reference code. I had to restore your original project from the downloaded zip file because I accidently overwrote it with some of my testbed code.

    I have two more weeks of down time to get my head wrapped around this, and it appears to be a great way to implement my upcoming project which will be converting some very complex asp.net pages that were written very badly in highly repetitive ASP classic and were ported in the most work-intensive but intellectually lazy way possible to ASP.Net 2003 a long time ago.

    I want to avoid intellectual laziness this time and do modern Web 2.0 coding. Part of that is becoming part of the open source community and ExtJS appears to be very robust and elegantly designed, so this looks like a great place to be.

    I am reasonably good at Javascript, but the ExtJS style of defining things with functions inside functions, and internal complex nested arrays is not exactly the way I was used to building or using my objects. It is a very compact way of coding but it will take a few more days for me to start doing this with some confidence.

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

      0  

    Default


    Well, all I can say is "good luck" There's many good starting points to learn Ext JS. Check out the links in my signature.
    As for ASP.NET MVC, there's the official site as well as some blogs, for example this one or this one.

  7. #47
    Ext User netski's Avatar
    Join Date
    Oct 2008
    Posts
    50
    Vote Rating
    0
    netski is on a distinguished road

      0  

    Default elishnevsky

    elishnevsky


    Hello elishnevsky,

    Great contribution works well out of the box.

    Was wondering, any support for unit testing? Or at a minimum the ability to call the methods directly for testing if they are not attributed with ignore?

    Cheers,
    Timothy

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

      0  

    Default


    Quote Originally Posted by netski View Post
    Hello elishnevsky,

    Great contribution works well out of the box.

    Was wondering, any support for unit testing? Or at a minimum the ability to call the methods directly for testing if they are not attributed with ignore?

    Cheers,
    Timothy
    What you always can do is call the methods directly from the Firebug console, like so:
    Code:
    Test.AddNumbers(10, 33, function(result, response) {
        console.info(result);
    });
    With regard to unit testing you can try something like JsUnit, but I personally don't use it, so I can't tell how good or bad it is.

  9. #49
    Ext User netski's Avatar
    Join Date
    Oct 2008
    Posts
    50
    Vote Rating
    0
    netski is on a distinguished road

      0  

    Default


    Thanks elishnevsky -- I was hoping to avoid using the console but hey ... it's better than nothing

    Again, cheers for the wicked job on the this contribution!

    Cheers,
    Timothy

  10. #50
    Ext User netski's Avatar
    Join Date
    Oct 2008
    Posts
    50
    Vote Rating
    0
    netski is on a distinguished road

      0  

    Default


    Hello elishnevsky,

    Was just wondering how you would deal with a form that has more than 25 fields to submit to an action, I don't want to have to write a server side action that has 25 parameters for each one.

    Any recommendations?

    Thanks again for your help, much appreciated

    Cheers

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