[CLOSED] [8.2] PageTreeLoader - error handling in OnNodeLoad

  1. #1

    [CLOSED] [8.2] PageTreeLoader - error handling in OnNodeLoad

    Hi!
    I have TreePanel with code:
    <Loader>
                        <ext:PageTreeLoader OnNodeLoad="LoadPages"  >
                            <BaseParams>
                                <ext:Parameter Name="klientId" Value="1" Mode="Raw">
                                </ext:Parameter>
                            </BaseParams>
                            
                            <Listeners>
                                <Load Fn="onAfterLoadNode" />
                            </Listeners>
                        </ext:PageTreeLoader>
                    </Loader>
    in code behind:

     protected void LoadPages(object sender, NodeLoadEventArgs e)
            {              
                try
                {
                   //do some work
                }
                catch (Exception ex)
                {
                    e.Success = false;
                    e.ErrorMessage = "an error occured";
                }
            }
    How can I present my error message to user when OnNodeLoad fail?
  2. #2
    Hi,

    Please use the following listener for PageTreeLoader
    <LoadException Handler="alert(errorMessage);" />
  3. #3
    Thank you!

Similar Threads

  1. [CLOSED] Javascript Global Error Handling
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 20, 2012, 8:30 PM
  2. [CLOSED] Grid Error Handling
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 11, 2012, 8:37 PM
  3. Global Error Handling
    By wdk in forum 1.x Help
    Replies: 2
    Last Post: Apr 03, 2012, 2:34 AM
  4. [CLOSED] [1.0] Global error handling of DirectMethods
    By jchau in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 27, 2010, 7:59 PM
  5. [CLOSED] Error handling in GridPanel/Store AjaxEvents
    By jchau in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 09, 2009, 5:49 PM

Posting Permissions