[CLOSED] Ext.net.MVC & direct methods mapped to controller actions

  1. #1

    [CLOSED] Ext.net.MVC & direct methods mapped to controller actions

    I have several MVC controllers that contain methods for different actions that add, remove, update data etc. So far I wrote the JavaScript code that invokes these methods by hand. Is it possible to have Ext.Net somehow create the JavaScript proxy functions that call these controller methods and inject them into a specific namespace ? This would be exactly the same thing as Direct Methods but applied to MVC controller actions as opposed to the methods of a Page class.

    Thanks
    Last edited by Daniil; Dec 05, 2011 at 5:37 PM. Reason: [CLOSED]
  2. #2
    Hi,

    We don't think it's required, because it's easy to call a controller action:
     Ext.net.DirectMethod.request({ url : "/Controller/Action" });
    or
    Ext.Ajax.request({ url : "/Controller/Action" })
  3. #3
    Quote Originally Posted by Daniil View Post
     Ext.net.DirectMethod.request({ url : "/Controller/Action" });
    The same way as it's here:
    https://examples1.ext.net/#/Events/D...ds/WebService/
  4. #4
    I know it is easy but it would be nice to have the tool generate the code for you. I think I am going to write my own function to do that.
  5. #5
    Could you clarify the expected benefit (-s)?
  6. #6
    I think the main benefit would be less typing and less possibility for errors. If the parameter names change in C# I don't need to come back to JavaScript to change the names (this might not be a problem if you use Resharper to rename variables and choose to search strings).

    Overall, it's more of a convenience. You can live without it for sure.
  7. #7
    Sounds good, but, unfortunately, we have no time resources to implement it now.

    Maybe, consider in the future.

Similar Threads

  1. Direct Methods and Custom Control
    By Zdenek in forum 1.x Help
    Replies: 0
    Last Post: Apr 19, 2012, 10:18 PM
  2. [CLOSED] Common Direct Methods
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 25, 2011, 5:54 AM
  3. Are direct methods same as WebMethod
    By deeptechtons in forum 1.x Help
    Replies: 2
    Last Post: Dec 27, 2010, 3:31 AM
  4. [CLOSED] Registering resources in Direct Methods/Events
    By r_honey in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 14, 2010, 10:27 AM
  5. [CLOSED] how to pass combobox values through direct methods
    By dev in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 08, 2010, 3:54 AM

Posting Permissions