RemoteValidation ExtraParam: Uncaught TypeError: Cannot read property 'getValue' of undefined.

  1. #1

    RemoteValidation ExtraParam: Uncaught TypeError: Cannot read property 'getValue' of undefined.

    Hi,

    I'm trying to add ExtraParams to RemoteValidation but I receive the console message: 'Cannot read property 'getValue' of undefined'.
    Am I doing something wrong? (using Ext.NET ver 2.5.2)

    Tanks in advance,


    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void CheckField(object sender, RemoteValidationEventArgs e)
        {
            string sParam1 = e.ExtraParams["Param1"];
    
            if (sParam1 == "Valid")
            {
                e.Success = true;
            }
            else
            {
                e.Success = false;
                e.ErrorMessage = "'Valid' is valid value only";
            }
        }
    
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head id="Head1" runat="server">
        <title>Remote Validation - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
    
            <ext:FormPanel
                runat="server"
                Title="Remote Validation Form"
                BodyPadding="5"
                Frame="true"
                Width="500"
                DefaultAnchor="100%">
                <FieldDefaults>
                    <CustomConfig>
                        <ext:ConfigItem Name="LabelWidth" Value="250" Mode="Raw" />
                        <ext:ConfigItem Name="PreserveIndicatorIcon" Value="true" Mode="Raw" />
                    </CustomConfig>
                </FieldDefaults>
                <Items>
                    <ext:TextField ID="TextField1" runat="server" FieldLabel="Data 1" />
                    <ext:TextField ID="TextField2" runat="server" FieldLabel="Data 2" IsRemoteValidation="true">
                        <RemoteValidation OnValidation="CheckField" Type="Load">
                            <ExtraParams>
                                <ext:Parameter Name="Param1" Value="#{TextField1}.getValue()" Mode="Raw" Encode="true"/>
                            </ExtraParams>
                        </RemoteValidation>
                    </ext:TextField>
                </Items>
            </ext:FormPanel>
        </form>
    </body>
    </html>
  2. #2
    Update:

    Issue solved here: http://forums.ext.net/showthread.php...501#post280501

    Please close this thread.

Similar Threads

  1. Replies: 1
    Last Post: Dec 15, 2015, 2:18 PM
  2. Replies: 3
    Last Post: Sep 13, 2015, 8:41 AM
  3. Replies: 2
    Last Post: Aug 13, 2014, 3:01 AM
  4. Replies: 5
    Last Post: Oct 30, 2013, 1:29 PM
  5. Uncaught TypeError: Cannot read property 'items' of null
    By FlavioSilveira in forum 2.x Help
    Replies: 6
    Last Post: Sep 20, 2013, 7:37 PM

Tags for this Thread

Posting Permissions