What exactly is Page Proxy?

  1. #1

    What exactly is Page Proxy?

    Can someone please explain what Page Proxy is and why it is needed. I just want to be sure I'm using it properly and at the right time.

    For example, is it needed on Stores that do not use paging? Do you need OnRefreshData if I'm not using it? etc.
  2. #2
  3. #3
    A confusing English response. I was hoping to get a better explanation on why the Proxy tag is (how/why) used. For example, is the Proxy tag required to make a Store use OnRefreshData (otherwise is OnRefreshData ignored when a Proxy tag is missing)? What are the other ways that force OnRefreshData on the Store to be called, does it always get used on page loads if present?

    In what ways is the Proxy tag required or are there alternate ways of accomplishing the same thing without using it. I'm trying to determine when I should use Proxy and what cases I should not use it. It's not clear to me yet why it exists, mainly because I seem to be accomplishing what I need without it.

    Any further help is appreciated!

    This type of proxy processes data requests within the originating page. A url of requests is a WebForm's url.
    It can be used to get data from page or/and save data to page.
    In grid's context, for example, 'load' (get) request's handler is OnRefreshData="Store_RefreshData"
    Last edited by geoffrey.mcgill; Dec 13, 2011 at 3:31 PM.
  4. #4
    A PageProxy can be useful when you need to load a data to a store from code behind. For example, to organize remote paging:
    https://examples1.ext.net/#/GridPane..._Sorting/Page/

    Some aspects:

    1. A PageProxy requires an OnRefreshData handler to be set up. A PageProxy uses that handler to load a data.

    2. An OnRefreshData handler is a common DirectEvent hanlder - it means that a common page life cycle occurs when this handler is executed. It might be too costly in a real application and I would try to avoid it using an HTTP handler or a web service, see:

    https://examples1.ext.net/#/GridPane...rting/Handler/
    https://examples1.ext.net/#/GridPane...ON_WebService/

    3. An OnRefreshData handler doesn't require a PageProxy and can be used to refresh a data from code behind:
    https://examples1.ext.net/#/GridPane...rayWithPaging/
  5. #5

    the above questions

    Daniil, 'chearner' asked:

    'What are the other ways that force OnRefreshData on the Store to be called, does it always get used on page loads if present?'

    I am interested in that one as well.

    So what will trigger 'OnRefreshData' when having a PageProxy assigned to a store?

    1) The 'Next Page' clicked on PagingToolbar
    2) Page_Load?
    3) store.load() in javascript?

    I have a situation where PageProxy being added dynamically in PageInit, does that mean that 'OnRefreshData' will be triggered afterwards?
  6. #6
    Quote Originally Posted by deejayns View Post
    'What are the other ways that force OnRefreshData on the Store to be called, does it always get used on page loads if present?'

    So what will trigger 'OnRefreshData' when having a PageProxy assigned to a store?

    1) The 'Next Page' clicked on PagingToolbar
    2) Page_Load?
    3) store.load() in javascript?
    A OnRefreshData handler of a Store with PageProxy is executed each time when a Proxy initiates a load request.

    A proxy's load request is always initiated on client side and can occur:

    1. On initial page loading when a Store is rendered and its AutoLoad="true". It's "true" by default.

    2. On PagingToolbar changing pages when a Store is configured with RemotePaging="true". It's "true" by default when a Store is configured with any kind of proxy.

    3. On sorting when a Store is configured with RemoteSort="true". It's "false" by default.

    4. On remote grouping and filtering.

    5. The Store's load and reload should also initiate a load request.

    Quote Originally Posted by deejayns View Post
    I have a situation where PageProxy being added dynamically in PageInit, does that mean that 'OnRefreshData' will be triggered afterwards?
    Yes, it should be triggered in all cases I mentioned above.

Similar Threads

  1. Replies: 2
    Last Post: Jun 03, 2012, 4:18 PM
  2. Replies: 0
    Last Post: Oct 05, 2011, 3:45 PM
  3. Multicombo store proxy
    By David Pelaez in forum 1.x Help
    Replies: 1
    Last Post: Feb 08, 2011, 1:27 PM
  4. Replies: 3
    Last Post: Sep 13, 2010, 8:39 AM
  5. Proxy with Nested Url
    By Dominik in forum 1.x Help
    Replies: 3
    Last Post: Jun 10, 2010, 6:53 AM

Tags for this Thread

Posting Permissions