[CLOSED] DirectMethods not called anymore

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] DirectMethods not called anymore

    I know this is too little info perhaps, but this is all I can do now. Maybe someone gets a "aha!" when they read this.

    All of a sudden Click Listeners refuse to fire the DirectMethod. It just stopped working, and I cant see any reason for it.

    there are no javascript errors in the browser, and I have but a breakpoint in the code-behind - it never breaks and the code that is supposed to execute does not fire.

    <TopBar>
        <ext:Toolbar ID="Toolbar_Customer2" runat="server">
            <Items>
                <ext:Button ID="Button_Customer1" runat="server" Icon="Add" Text="Create">
                    <Listeners>
                        <Click Handler="#{DirectMethods}.asd();" />
                    </Listeners>
                </ext:Button>
            </Items>
        </ext:Toolbar>
    </TopBar>
    the directmethod:

    [DirectMethod]
            public void asd()
            {
                X.Msg.Alert("TEst", "TEst1").Show();
            }
    It is never called! Anyone know why?
    Last edited by Daniil; May 06, 2011 at 3:23 PM. Reason: [CLOSED]
  2. #2
    Hi,

    1. Where the direct method is located (user control, master page or somewhere else) ?
    2. Where the button is located (in the same location) ?
    3. Open generated source in the browser (View source) and check that direct method function is rendered and token #{DirectMethod} is parsed correctly
  3. #3
    Well, this button is in a Usercontrol.

    But another button that uses DirectEvent is also not called. And that button using the DirectEvent is placed in a ContentPlaceHolder (not custom usercontrol).

    THis was all working up untilk today. Didnt make any changes that I know of.
    I will check source.
  4. #4
    Hi,

    Is the remote request initiated (check in the Fiddler or FireBug)?
    If request is initiated then what the response of the request?
    I can assume next if request is initiated but direct method is not called: server side exception is fired before direct method execution (response should show it) or direct method is not found in the cache (it can be if ScriptMode=Release and you add direct method on fly to running web site, in this case IIS restarting can help you)
  5. #5
    Ok, found the error.

    I had a NumberField and into that number field, in this special situation, was fed a "string". When that happened, the whole paged "died", ie no more javascript worked ever.

    My fault, BUT, what is very annoying is that I got no error what so ever. Not in code-behind (as the Value takes an object) and not in the browser. Very hard to track that error!
  6. #6
    Hi,

    Can you provide that NumberField and how you feed a string to the field? Which string you feed?
  7. #7
    I fed the NUmberField in codeBehind like this:

    string MyString = SRef.GetTheString();
    numberTelephone.Value = MyString;
    The string was in this case an empty string, "".
  8. #8
    Hi,

    Why do you use Value for NumberField?
    Value is used by fields internally (just each field has own format of value), we allow to work with Value directly but you have to work with it carefuly because Value doesn't check value in the field context (Value is defined in base class of all fields and doesn't know about inheritors and its logic)

    If you want to work safely then please use Number property of NumberField
  9. #9
    Well, why not would be my first answer =)

    I use whatever I find available. The Value property is normally what I look for, I had no (obvious) reason to use something else.

    I guess you cannot hide a member that is inherited, and thats why the VAlue property is available, even though it should not be used?
  10. #10
    yes, I think we should be able to override the functionality of .Value in the NumberField. Just need to investigate further.

    As a temp work-around, you can set to .Number property.
    Geoffrey McGill
    Founder
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: Aug 08, 2012, 6:28 PM
  2. Replies: 0
    Last Post: May 11, 2012, 9:28 AM
  3. [CLOSED] PartialViewResult doesn't work with ASP.NET MVC 3.0 anymore
    By SandorD in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 11, 2011, 1:09 PM
  4. AutoScroll doesn't work anymore
    By tenkyu in forum 1.x Help
    Replies: 6
    Last Post: Nov 05, 2010, 2:26 PM
  5. [1.0] Autoscroll not working anymore in Portal
    By AlexWight in forum 1.x Help
    Replies: 4
    Last Post: Apr 06, 2010, 12:11 PM

Tags for this Thread

Posting Permissions