Loader is not working with UserControl

  1. #1

    Loader is not working with UserControl

    Dears,

    I will try to explain my scenario in simple way to get best result from the post.
    I'm using UserControls in my main page called (Default.aspx), and is defined as follows:

    ....
    <%@ Register src="~/Apps/UC/SME_NEW_VISITOR_UC.ascx" tagname="visitors" tagprefix="uc1" %>
    ... 
    ..
    .
    
                            <ext:Panel runat="server" Header="false" Border="false" Layout="FitLayout">
                                <Content>
                                    <uc1:visitors ID="ucVisitors" runat="server" Title="New Visitor">
                                    </uc1:visitors>
                                </Content>
                            </ext:Panel>
    In UserControl, I define my panels as follows:

     <window>
    <ext:FormPanel>1</ext:FormPane>
    <ext:FormPanel>2</ext:FormPane>
    <ext:FormPanel>3</ext:FormPane>
    ...
    ..
    .
    </window>
    Inside each FormPanel many controls, with Button to call a Direct Method to do some staff.
    What I want to achieve is: display masking message with executing the direct method, and this should mask the whole window.

    This code is NOT working at all, it is placed inside UserControl FormPanel:

                                    <ext:Button ID="BtnSendEnMail" runat="server" Icon="Mail" Text="Send English Mail" Handler="#{DirectMethods}.SendVisitorEmail('En')" >
                                        <Loader 
                                            runat="server" 
                                            AutoLoad="false"
                                            RemoveAll="false"
                                            DirectMethod="#{DirectMethods}.SendVisitorEmail" 
                                            Mode="Component">
                                            <LoadMask ShowMask="true" />
                                            <Params>
                                                <ext:Parameter Name="name" Value="En" Mode="Raw" />
                                            </Params>
                                        </Loader>
                                    </ext:Button>
    What I'm doing wrong?
    How to achive what I want?

    Regards,
    Ali
  2. #2
    Isn't it masking just the button or a limited area?

    Maybe if you want to mask the whole window you should do a
    Ext.net.Mask.show({msg : 'whatever' });
    In an event you bind to be triggered when the button is clicked or right before the directMethod is run (if you wrap thru a js).

    Then, in the last line of the direct method, you just
    X.AddScript("Ext.net.Mask.hide();");
    This should work just fine, but is not as elegant as the loader mask (which applies a mask to a limited area, regarding the container of what is loaded).

    I am not VERY experient in ext.net but I believe the paragraph is true, as for the remaining above, it is how I force the mask to be applied to the whole window. If you want to mask a given element, on the first code, you add a second parameter named el: and specify the element's ID you want to mask. The msg: parameter is also optional.

    I hope this approach solves your issue.
  3. #3
    Dear avenger,

    Will try your suggestion and return to you.
    Thanks for your response.

    Regards,
    Ali

Similar Threads

  1. [CLOSED] Component Loader Not Working
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 06, 2014, 6:43 AM
  2. Replies: 5
    Last Post: Jun 12, 2013, 2:49 AM
  3. [CLOSED] DisableCaching not working Panel Loader
    By advBackOffice in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 11, 2013, 11:24 PM
  4. [CLOSED] Register UserControl with Loader
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 16, 2012, 1:42 PM

Posting Permissions