[CLOSED] Converting from v1.4 - v2.0, what is the update for the 'Method' in HttProxy when converted to AjaxProxy??

  1. #1

    [CLOSED] Converting from v1.4 - v2.0, what is the update for the 'Method' in HttProxy when converted to AjaxProxy??

    Do I still need to set the 'Method' property in the NEW AjaxProxy ??

    Old: v1.4
              Store.Proxy.Add(new HttpProxy
                        {
                            DisableCaching = true,
                            Json = true,
                            Method = HttpMethod.GET,
                            Url = Core.Web.ProcessController.HandlerUrl()
                        });
    NEW: v2.0
                Store.Proxy.Add(new AjaxProxy
                        {
                            NoCache = true,
                            Json = true,
                            //GetMethod = HttpMethod.GET,
                            Url = Core.Web.ProcessController.HandlerUrl()
                        });
    Last edited by Daniil; Jun 25, 2012 at 4:47 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please see the CHANGELOG item #15.
    https://examples2.ext.net/#/Getting_...nts/CHANGELOG/

    Here how it looks.
    15. The server HttpProxy class has been renamed to AjaxProxy.

    Example
    //Old
    <ext:HttpProxy Url="Some.url" />

    //New
    <ext:AjaxProxy Url="Some.url" />

    And there is no .Method

    Use ActionMethods

    Example

    //Old
    <ext:HttpProxy Url="some.url" Method="POST">

    //New
    <ext:AjaxProxy Url="some.url">
    <ActionMethods READ="POST" />
    </ext:AjaxProxy>
    And yes, I think you should set up
    <ActionMethods READ="GET" />
  3. #3
    How would I set this up in the Code Behind ??

    Quote Originally Posted by Daniil View Post
    Hi,

    Please see the CHANGELOG item #15.
    https://examples2.ext.net/#/Getting_...nts/CHANGELOG/

    Here how it looks.


    And yes, I think you should set up
    <ActionMethods READ="GET" />
  4. #4
    Example
    AjaxProxy proxy = new AjaxProxy();
    proxy.ActionMethods.Read = HttpMethod.GET;
  5. #5
    Ok, thank you.

    I was trying to do it like below, but some how it does seems to like 'ActionMethod.Read'
    
           Store.Proxy.Add(new AjaxProxy         
                                {             
                                        NoCache = true,             
                                        Json = true,             
                                        ActionMethods.Read = HttpMethod.GET,          
                                        Url = Core.Web.ProcessController.HandlerUrl()         
                                });

    Quote Originally Posted by Daniil View Post
    Example
    AjaxProxy proxy = new AjaxProxy();
    proxy.ActionMethods.Read = HttpMethod.GET;
  6. #6
    Within a constructor it should look like this.

    Example
    AjaxProxy proxy = new AjaxProxy()
        {
            ActionMethods =
            {
                Read = HttpMethod.GET
            }
        };
  7. #7
    Thank you...

    Quote Originally Posted by Daniil View Post
    Within a constructor it should look like this.

    Example
    AjaxProxy proxy = new AjaxProxy()
        {
            ActionMethods =
            {
                Read = HttpMethod.GET
            }
        };

Similar Threads

  1. How to give a converted object from an json ?
    By marcelorosait in forum 1.x Help
    Replies: 4
    Last Post: Feb 20, 2012, 11:41 AM
  2. [CLOSED] Update ASP.Net Controls during DirectEvent/Method
    By alexkay in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 19, 2011, 6:23 AM
  3. [CLOSED] Update records subcollection with set() method?
    By PatrikG in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 26, 2010, 12:29 PM
  4. [CLOSED] update() method for innerHTML change on v1.0
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 19, 2010, 12:54 PM
  5. Update ASP.net controls via Direct Method
    By glenh in forum 1.x Help
    Replies: 4
    Last Post: Sep 14, 2010, 5:38 PM

Posting Permissions