[CLOSED] Caching common part of UI

  1. #1

    [CLOSED] Caching common part of UI

    Greetings,

    I have a requirement of caching/storing common part of UI on client browser so that the navigation wont look like a full postback or refresh.
    I am relatively new to ext.net so am not much aware of the features of it.

    Can you please provide me some solution to the requirement or suggest any path through which I can achieve that using ext.net.
    Last edited by Daniil; Mar 26, 2013 at 4:18 AM. Reason: [CLOSED]
  2. #2
    Hi @vijay.sahu,

    Well, you could cache something in cookies. But it would be rather some data, not UI.

    Please provide more details. What exactly do you need to "cache"?

    so that the navigation wont look like a full postback or refresh
    I guess it is rather a problem of the application's design. If you don't need to refresh some part of the page, you should not reload it.

    For example, please open some examples here (clicking the tree's nodes).
    https://examples2.ext.net

    As you can see it doesn't refresh the whole page, but just loads and renders the requested things.
  3. #3
    Hi Daniil,

    We are trying to achive RIA look for our applications.

    Please refer image for more clarification. We would like to refresh only the central panel (bordered panel) without using iframe and load different content on clicking the different links of the tree rather than refreshing the whole page and expanding the tree.

    In the https://examples2.ext.net url, the contents are loaded in different tabs on clicking the tree nodes which is not what we are actually looking for.

    It would be great if you would be able to provide any solution available for such a scenario.




    Quote Originally Posted by Daniil View Post
    Hi @vijay.sahu,

    Well, you could cache something in cookies. But it would be rather some data, not UI.

    Please provide more details. What exactly do you need to "cache"?



    I guess it is rather a problem of the application's design. If you don't need to refresh some part of the page, you should not reload it.

    For example, please open some examples here (clicking the tree's nodes).
    https://examples2.ext.net

    As you can see it doesn't refresh the whole page, but just loads and renders the requested things.
    Attached Thumbnails Click image for larger version. 

Name:	PanelReload.jpg 
Views:	21 
Size:	75.7 KB 
ID:	5866  
    Last edited by vijay.sahu; Mar 20, 2013 at 12:25 PM.
  4. #4
    You can achieve it using the XRender functionality. XRender means rendering controls to client of the fly.
    https://examples2.ext.net/#/XRender/Basic/Add_Items/

    Here is a very simple example demonstrating the basics.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Render(object sender, DirectEventArgs e)
        {
            this.PanelCenter.RemoveAll();
            
            Ext.Net.Label label = new Ext.Net.Label(DateTime.Now.Second.ToString());
    
            label.AddTo(this.PanelCenter);
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Viewport runat="server" Layout="BorderLayout">
                <Items>
                    <ext:Container runat="server" Region="West" Width="150">
                        <Items>
                            <ext:Button runat="server" Text="Render new content" OnDirectClick="Render" />
                        </Items>
                    </ext:Container>
                    <ext:Panel ID="PanelCenter" runat="server" Title="Center" Region="Center">
                        <Items>
                            <ext:Label runat="server" Text="Some Initial Content" />
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
    Another approach is using a Loader.
    https://examples2.ext.net/#/Loaders/...Direct_Method/
    https://examples2.ext.net/#/Loaders/.../Http_Handler/
    https://examples2.ext.net/#/Loaders/...ON_WebService/

Similar Threads

  1. Common ExtraParams for all DirectEvents
    By wdk in forum 1.x Help
    Replies: 7
    Last Post: Apr 05, 2012, 2:26 AM
  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. [CLOSED] Events defind in common.js for calendar is not firing.
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 12, 2011, 4:19 PM

Tags for this Thread

Posting Permissions