Javascript errors on render (simplified code)

  1. #1

    Javascript errors on render (simplified code)



    Hi,

    I Send you a simplified code for my previously topic "javascript error when render"

    Regards,

    Rinaldo J. Sassaroli

    
    
    
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestCheckedList.aspx.vb" Inherits="TestCheckedList" %>
    
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    
    <%@ Page Language="VB" EnableEventValidation="true" AutoEventWireup="false" CodeFile="Customers.aspx.vb" Inherits="CustomersPage"%>
    
    
    <%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    
    <head id="Head1" runat="server">
    
    
    <title>Index Manager System - IndexEuropea</title>
    
    
    </head>
    
    
    <body>
    
    
    <form id="form1" runat="server">
    
    
    <div id="main">
    
    
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    
    
    
    
    
    <asp:ObjectDataSource ID="CustomersDataSource" runat="server" 
    
    
    
    
    
    >
    
    
    <SelectParameters>
    
    
    <asp:Parameter Name="start" Type="Int32" />
    
    
    <asp:Parameter Name="limit" Type="Int32" />
    
    
    <asp:Parameter Name="sort" />
    
    
    <asp:Parameter Name="dir" />
    
    
    <asp:Parameter Name="count" Direction="Output" Type="Int32" />
    
    
    <asp:Parameter Name="Filter" Type="String" />
    
    
    </SelectParameters>
    
    
    </asp:ObjectDataSource>
    
    
    
    
    
    <asp:ObjectDataSource ID='StatusIDDataSource' runat='server'
    
    
    
    
    
    >
    
    
    <SelectParameters>
    
    
    <asp:Parameter Name='start' Type='Int32' />
    
    
    <asp:Parameter Name='limit' Type='Int32' />
    
    
    <asp:Parameter Name='sort' />
    
    
    <asp:Parameter Name='dir' />
    
    
    <asp:Parameter Name='count' Direction='Output' Type='Int32' />
    
    
    <asp:Parameter Name='Filter' Type='String' />
    
    
    </SelectParameters>
    
    
    </asp:ObjectDataSource>
    
    
    
    
    
    <asp:ObjectDataSource ID='ActivityIDDataSource' runat='server'
    
    
    
    
    
    >
    
    
    <SelectParameters>
    
    
    <asp:Parameter Name='start' Type='Int32' />
    
    
    <asp:Parameter Name='limit' Type='Int32' />
    
    
    <asp:Parameter Name='sort' />
    
    
    <asp:Parameter Name='dir' />
    
    
    <asp:Parameter Name='count' Direction='Output' Type='Int32' />
    
    
    <asp:Parameter Name='Filter' Type='String' />
    
    
    </SelectParameters>
    
    
    </asp:ObjectDataSource>
    
    
    
    
    
    <asp:ObjectDataSource ID='EntityTypeIDDataSource' runat='server'
    
    
    
    
    
    >
    
    
    <SelectParameters>
    
    
    <asp:Parameter Name='start' Type='Int32' />
    
    
    <asp:Parameter Name='limit' Type='Int32' />
    
    
    <asp:Parameter Name='sort' />
    
    
    <asp:Parameter Name='dir' />
    
    
    <asp:Parameter Name='count' Direction='Output' Type='Int32' />
    
    
    <asp:Parameter Name='Filter' Type='String' />
    
    
    </SelectParameters>
    
    
    </asp:ObjectDataSource>
    
    
    
    
    
    <asp:ObjectDataSource ID="IdentitiesAddressDataSource" runat="server" 
    
    
    
    
    
    >
    
    
    <SelectParameters>
    
    
    <asp:Parameter Name="start" Type="Int32" />
    
    
    <asp:Parameter Name="limit" Type="Int32" />
    
    
    <asp:Parameter Name="sort" />
    
    
    <asp:Parameter Name="dir" />
    
    
    <asp:Parameter Name="count" Direction="Output" Type="Int32" />
    
    
    <asp:Parameter Name="Filter" Type="String" />
    
    
    </SelectParameters>
    
    
    </asp:ObjectDataSource>
    
    
    
    
    
    <asp:ObjectDataSource ID='AddressTypeIDDataSource' runat='server'
    
    
    
    
    
    >
    
    
    <SelectParameters>
    
    
    <asp:Parameter Name='start' Type='Int32' />
    
    
    <asp:Parameter Name='limit' Type='Int32' />
    
    
    <asp:Parameter Name='sort' />
    
    
    <asp:Parameter Name='dir' />
    
    
    <asp:Parameter Name='count' Direction='Output' Type='Int32' />
    
    
    <asp:Parameter Name='Filter' Type='String' />
    
    
    </SelectParameters>
    
    
    </asp:ObjectDataSource>
    
    
    
    
    
    <asp:ObjectDataSource ID='CityIDDataSource' runat='server'
    
    
    
    
    
    >
    
    
    <SelectParameters>
    
    
    <asp:Parameter Name='start' Type='Int32' />
    
    
    <asp:Parameter Name='limit' Type='Int32' />
    
    
    <asp:Parameter Name='sort' />
    
    
    <asp:Parameter Name='dir' />
    
    
    <asp:Parameter Name='count' Direction='Output' Type='Int32' />
    
    
    <asp:Parameter Name='Filter' Type='String' />
    
    
    <asp:Parameter Name='RegionID' Type='Int32' DefaultValue='0' />
    
    
    </SelectParameters>
    
    
    </asp:ObjectDataSource>
    
    
    
    
    
    <ext:Store ID="CustomersStore" runat="server" 
    
    
    DataSourceID="CustomersDataSource" 
    
    
    
    
    
    AutoLoad="true"
    
    
    RemoteSort="true">
    
    
    <AutoLoadParams>
    
    
    <ext:Parameter Name="start" Value="={0}" />
    
    
    <ext:Parameter Name="limit" Value="={20}" />
    
    
    </AutoLoadParams>
    
    
    <Proxy>
    
    
    <ext:DataSourceProxy />
    
    
    </Proxy>
    
    
    <Reader>
    
    
    <ext:JsonReader ReaderID="IdentityID">
    
    
    <Fields>
    
    
    <ext:RecordField Name='IdentityID' />
    
    
    <ext:RecordField Name='DateLastSale' />
    
    
    <ext:RecordField Name='DateAdded' />
    
    
    <ext:RecordField Name='StatusID' />
    
    
    <ext:RecordField Name='Description' />
    
    
    <ext:RecordField Name='IdentifyNumber' />
    
    
    <ext:RecordField Name='ActivityID' />
    
    
    <ext:RecordField Name='EntityTypeID' />
    
    
    <ext:RecordField Name='EntityTypeCode' />
    
    
    <ext:RecordField Name='ActivityCode' />
    
    
    <ext:RecordField Name='Status' />
    
    
    <ext:RecordField Name='Activity' />
    
    
    </Fields>
    
    
    </ext:JsonReader>
    
    
    </Reader>
    
    
    <Listeners>
    
    
    <LoadException Handler="" />
    
    
    </Listeners>
    
    
    </ext:Store>
    
    
    
    
    
    <ext:Store ID='StatusIDStore' runat='server'
    
    
    DataSourceID='StatusIDDataSource' 
    
    
    
    
    
    AutoLoad='True'>
    
    
    <Proxy><ext:DataSourceProxy /></Proxy>
    
    
    <Reader>
    
    
    <ext:JsonReader ReaderID='StatusID'>
    
    
    <Fields>
    
    
    <ext:RecordField Name='StatusID' />
    
    
    <ext:RecordField Name='Status' />
    
    
    </Fields>
    
    
    </ext:JsonReader>
    
    
    </Reader>
    
    
    <Listeners>
    
    
    <LoadException Handler="" />
    
    
    </Listeners>
    
    
    </ext:Store>
    
    
    
    
    
    <ext:Store ID='ActivityIDStore' runat='server'
    
    
    DataSourceID='ActivityIDDataSource' 
    
    
    
    
    
    AutoLoad='True'>
    
    
    <Proxy><ext:DataSourceProxy /></Proxy>
    
    
    <Reader>
    
    
    <ext:JsonReader ReaderID='ActivityID'>
    
    
    <Fields>
    
    
    <ext:RecordField Name='ActivityID' />
    
    
    <ext:RecordField Name='Activity' />
    
    
    </Fields>
    
    
    </ext:JsonReader>
    
    
    </Reader>
    
    
    <Listeners>
    
    
    <LoadException Handler="" />
    
    
    </Listeners>
    
    
    </ext:Store>
    
    
    
    
    
    <ext:Store ID='EntityTypeIDStore' runat='server'
    
    
    DataSourceID='EntityTypeIDDataSource' 
    
    
    
    
    
    AutoLoad='True'>
    
    
    <Proxy><ext:DataSourceProxy /></Proxy>
    
    
    <Reader>
    
    
    <ext:JsonReader ReaderID='EntityTypeID'>
    
    
    <Fields>
    
    
    <ext:RecordField Name='EntityTypeID' />
    
    
    <ext:RecordField Name='EntityType' />
    
    
    </Fields>
    
    
    </ext:JsonReader>
    
    
    </Reader>
    
    
    <Listeners>
    
    
    <LoadException Handler="" />
    
    
    </Listeners>
    
    
    </ext:Store> 
    
    
    
    
    
    <ext:Store ID="IdentitiesAddressStore" runat="server" 
    
    
    DataSourceID="IdentitiesAddressDataSource" 
    
    
    
    
    
    AutoLoad="true"
    
    
    RemoteSort="true">
    
    
    <AutoLoadParams>
    
    
    <ext:Parameter Name="start" Value="={0}" />
    
    
    <ext:Parameter Name="limit" Value="={20}" />
    
    
    </AutoLoadParams>
    
    
    <Proxy>
    
    
    <ext:DataSourceProxy />
    
    
    </Proxy>
    
    
    <Reader>
    
    
    <ext:JsonReader ReaderID="AddressID">
    
    
    <Fields>
    
    
    <ext:RecordField Name='AddressID' />
    
    
    <ext:RecordField Name='IdentityID' />
    
    
    <ext:RecordField Name='AddressTypeID' />
    
    
    <ext:RecordField Name='Street' />
    
    
    <ext:RecordField Name='StreetNumber' />
    
    
    <ext:RecordField Name='StreetOther' />
    
    
    <ext:RecordField Name='Phone1' />
    
    
    <ext:RecordField Name='Phone2' />
    
    
    <ext:RecordField Name='Fax' />
    
    
    <ext:RecordField Name='CityID' />
    
    
    <ext:RecordField Name='ZipCode' />
    
    
    <ext:RecordField Name='CityOther' />
    
    
    <ext:RecordField Name='AdressTypeCode' />
    
    
    <ext:RecordField Name='City' />
    
    
    </Fields>
    
    
    </ext:JsonReader>
    
    
    </Reader>
    
    
    <Listeners>
    
    
    <LoadException Handler="" />
    
    
    </Listeners>
    
    
    </ext:Store>
    
    
    
    
    
    <ext:Store ID='AddressTypeIDStore' runat='server'
    
    
    DataSourceID='AddressTypeIDDataSource' 
    
    
    
    
    
    AutoLoad='True'>
    
    
    <Proxy><ext:DataSourceProxy /></Proxy>
    
    
    <Reader>
    
    
    <ext:JsonReader ReaderID='AdressTypeID'>
    
    
    <Fields>
    
    
    <ext:RecordField Name='AdressTypeID' />
    
    
    <ext:RecordField Name='AdressType' />
    
    
    </Fields>
    
    
    </ext:JsonReader>
    
    
    </Reader>
    
    
    <Listeners>
    
    
    <LoadException Handler="" />
    
    
    </Listeners>
    
    
    </ext:Store>
    
    
    
    
    
    <ext:Store ID='CityIDStore' runat='server'
    
    
    DataSourceID='CityIDDataSource' 
    
    
    
    
    
    AutoLoad='True'>
    
    
    <Proxy><ext:DataSourceProxy /></Proxy>
    
    
    <Reader>
    
    
    <ext:JsonReader ReaderID='CityID'>
    
    
    <Fields>
    
    
    <ext:RecordField Name='CityID' />
    
    
    <ext:RecordField Name='City' />
    
    
    </Fields>
    
    
    </ext:JsonReader>
    
    
    </Reader>
    
    
    <Listeners>
    
    
    <LoadException Handler="Ext.Msg.alert('Cities - Load failed', e.message || response.statusText);" />
    
    
    </Listeners>
    
    
    </ext:Store>
    
    
    
    
    
    <ext:ViewPort ID="CustomersViewPort" runat="server">
    
    
    <Body>
    
    
    <ext:BorderLayout ID="CustomersBorderLayout" runat="server">
    
    
    <Center MarginsSummary="0 0 5 5" Split="true">
    
    
    <ext:Panel ID="CenterPanel" 
    
    
    runat="server" 
    
    
    Frame="true" 
    
    
    Title="Customers" 
    
    
    Icon="User">
    
    
    <Body>
    
    
    <ext:FitLayout ID="CenterFitLayout" runat="server">
    
    
    <ext:GridPanel 
    
    
    ID="GridPanelCustomers" 
    
    
    runat="server" 
    
    
    AutoExpandColumn="Description" 
    
    
    StoreID="CustomersStore"
    
    
    Border="false">
    
    
    <ColumnModel ID="ColumnModelCustomers" runat="server">
    
    
    <Columns>
    
    
    <ext:Column ColumnID='IdentityID' DataIndex='IdentityID' Header='IdentityID' Width='50' />
    
    
    <ext:Column ColumnID='Description' DataIndex='Description' Header='Description' />
    
    
    <ext:Column ColumnID='IdentifyNumber' DataIndex='IdentifyNumber' Header='IdentifyNumber' />
    
    
    <ext:Column ColumnID='EntityTypeCode' DataIndex='EntityTypeCode' Header='EntityTypeCode' />
    
    
    <ext:Column ColumnID='Status' DataIndex='Status' Header='Status' />
    
    
    <ext:Column ColumnID='Activity' DataIndex='Activity' Header='Activity' />
    
    
    </Columns>
    
    
    </ColumnModel>
    
    
    <SelectionModel>
    
    
    <ext:RowSelectionModel ID="RowSelectionModelCustomers" runat="server" SingleSelect="true">
    
    
    <AjaxEvents>
    
    
    <RowSelect Buffer="250">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{DetailsCustomers}" />
    
    
    <ExtraParams>
    
    
    <ext:Parameter Name="IdentityID" Value="this.getSelected().id" Mode="Raw" />
    
    
    </ExtraParams>
    
    
    </RowSelect>
    
    
    </AjaxEvents>
    
    
    </ext:RowSelectionModel>
    
    
    </SelectionModel>
    
    
    <Plugins>
    
    
    <ext:GridFilters runat="server" ID="GridFiltersCustomers" ShowMenu="true" Visible="true">
    
    
    <Filters>
    
    
    <ext:StringFilter DataIndex='IdentityID' />
    
    
    <ext:StringFilter DataIndex='Description' />
    
    
    <ext:StringFilter DataIndex='IdentifyNumber' />
    
    
    <ext:StringFilter DataIndex='EntityTypeCode' />
    
    
    <ext:StringFilter DataIndex='Status' />
    
    
    <ext:StringFilter DataIndex='Activity' />
    
    
    </Filters>
    
    
    </ext:GridFilters>
    
    
    </Plugins>
    
    
    <TopBar>
    
    
    <ext:Toolbar ID="toolbarGridTabs" runat="server">
    
    
    <Items>
    
    
    <ext:Button ID="cmdNewButton" runat="server" Text="New" Icon="ApplicationAdd">
    
    
    <AjaxEvents>
    
    
    <Click Failure="Ext.MessageBox.alert('New Item failed', 'Error during ajax event');">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{DetailsCustomers}.body}" />
    
    
    </Click>
    
    
    </AjaxEvents>
    
    
    <ToolTips><ext:ToolTip Title="Create" Html="Create New item" /></ToolTips>
    
    
    </ext:Button>
    
    
    <ext:Button ID="cmdEditButton" runat="server" Text="Edit" Icon="ApplicationEdit" Enabled="false">
    
    
    <AjaxEvents>
    
    
    <Click Failure="Ext.MessageBox.alert('Editing failed', 'Error during ajax event');">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{DetailsCustomers}.body}" />
    
    
    <ExtraParams>
    
    
    <ext:Parameter Name="IdentityID" Value="#{GridPanelCustomers}.getSelectionModel().getSelected().data.IdentityID" Mode="Raw" />
    
    
    </ExtraParams>
    
    
    </Click>
    
    
    </AjaxEvents>
    
    
    <ToolTips><ext:ToolTip Title="Edit" Html="Edit active item" /></ToolTips>
    
    
    </ext:Button>
    
    
    <ext:Button ID="cmdDeleteButton" runat="server" Text="Delete" Icon="ApplicationDelete" Enabled="false">
    
    
    <Listeners>
    
    
    <Click Handler="Ext.Msg.confirm('Delete Item', 'Are you sure to delete?', function(btn){
    
    
    if(btn=='yes') {
    
    
    #{GridPanelCustomers}.loadMask.msg = 'Deleting...'
    
    
    #{GridPanelCustomers}.loadMask.show();
    
    
    #{GridPanelCustomers}.loadMask.msg = 'Loading...'
    
    
    #{CustomersDetailsStatus}.showBusy('Deleting...');
    
    
    Coolite.AjaxMethods.DeleteItem(#{GridPanelCustomers}.getSelectionModel().getSelected().data.IdentityID,{success:function(result){if (result.result!='') {Ext.Msg.show({title:'Deleting Error',msg: result, buttons: Ext.Msg.OK, icon: Ext.MessageBox.ERROR});}}});
    
    
    }}
    
    
    )" 
    
    
    />
    
    
    </Listeners>
    
    
    <ToolTips><ext:ToolTip Title="Delete" Html="Delete active item" /></ToolTips>
    
    
    </ext:Button>
    
    
    </Items>
    
    
    </ext:Toolbar>
    
    
    </TopBar>
    
    
    <BottomBar>
    
    
    <ext:PagingToolBar ID="PagingToolbarGridCustomers" runat="server" PageSize="20" StoreID="CustomersStore">
    
    
    <Items>
    
    
    <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server"></ext:ToolbarSeparator>
    
    
    <ext:ComboBox ID="RecordsPerPage" runat="server" width="50px" Editable="false">
    
    
    <Items>
    
    
    <ext:ListItem Text="15" Value="15" />
    
    
    <ext:ListItem Text="20" Value="20" />
    
    
    <ext:ListItem Text="50" Value="50" />
    
    
    <ext:ListItem Text="100" Value="100" />
    
    
    </Items>
    
    
    <SelectedItem Text="20" Value="20" />
    
    
    <AjaxEvents>
    
    
    <Select Buffer="250">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{GridPanelCustomers}" />
    
    
    </Select>
    
    
    </AjaxEvents>
    
    
    </ext:ComboBox>
    
    
    </Items>
    
    
    </ext:PagingToolBar>
    
    
    </BottomBar>
    
    
    <LoadMask ShowMask="true" />
    
    
    
    
    
    </ext:GridPanel>
    
    
    </ext:FitLayout>
    
    
    </Body>
    
    
    </ext:Panel>
    
    
    </Center>
    
    
    <East MarginsSummary="0 5 5 5" Collapsible="true" Split="true" MinWidth="200">
    
    
    <ext:Panel 
    
    
    ID="DetailsCustomers" 
    
    
    runat="server" 
    
    
    Frame="true" 
    
    
    Title="Customers Details" 
    
    
    Width="380"
    
    
    Icon="User">
    
    
    <Body>
    
    
    <ext:FitLayout ID="FitLayout1" runat="server">
    
    
    <ext:TabPanel Title="Principal" 
    
    
    ID="TabPanel1" Border="false" 
    
    
    runat="server" BodyStyle="background-color:#DFE8F6;padding-top:5px;">
    
    
    <Tabs>
    
    
    <ext:Tab ID="tabGeneral" Title="__General__" >
    
    
    <Body>
    
    
    <ext:FormLayout ID="DetailsCustomersFormLayout1" runat="server"> 
    
    
    <ext:Anchor><ext:Hidden runat="server" ID="Customers_CRUDMode" Text="View" /></ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='IdentityID' 
    
    
    Runat='Server' 
    
    
    FieldLabel='IdentityID' 
    
    
    ReadOnly='true' 
    
    
    Width="50" 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='EntityName' 
    
    
    Runat='Server' 
    
    
    FieldLabel='EntityName' 
    
    
    ReadOnly='true' 
    
    
    Width="200"
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='FantasyName' 
    
    
    Runat='Server' 
    
    
    FieldLabel='FantasyName' 
    
    
    ReadOnly='true'
    
    
    Width="200"
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='IdentifyNumber' 
    
    
    Runat='Server' 
    
    
    FieldLabel='IdentifyNumber' 
    
    
    ReadOnly='true'
    
    
    Width="100"
    
    
    />
    
    
    </ext:Anchor> 
    
    
    <ext:Anchor>
    
    
    <ext:ComboBox 
    
    
    ID='StatusID' 
    
    
    Runat='Server' 
    
    
    FieldLabel='StatusID' 
    
    
    StoreID='StatusIDStore' 
    
    
    DisplayField='Status' 
    
    
    ValueField='StatusID' 
    
    
    ReadOnly='true' 
    
    
    TypeAhead='true' 
    
    
    Disabled='true' 
    
    
    ForceSelection='true' 
    
    
    TriggerAction='All' 
    
    
    Width="100"
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:Panel>
    
    
    <Body>
    
    
    <ext:TableLayout ID="TableLayout1" runat="server" Columns=3 StyleSpec="padding:5px">
    
    
    <ext:Cell><ext:Label ID="Label1" runat="server" Text="Activity: " StyleSpec="font-size:12px;" /></ext:Cell>
    
    
    <ext:Cell>
    
    
    <ext:ComboBox
    
    
    ID='ActivityID' 
    
    
    Runat='Server' 
    
    
    FieldLabel='Activity' 
    
    
    StoreID='ActivityIDStore' 
    
    
    DisplayField='Activity' 
    
    
    ValueField='ActivityID' 
    
    
    ReadOnly='true' 
    
    
    TypeAhead='true' 
    
    
    Disabled='true' 
    
    
    ForceSelection='true' 
    
    
    TriggerAction='All'
    
    
    Width="200"
    
    
    />
    
    
    </ext:Cell>
    
    
    <ext:Cell>
    
    
    <ext:Button ID="ActivityIDX" runat="server" Icon="ApplicationAdd" Enabled="false">
    
    
    <Listeners>
    
    
    <Click Handler="parent.OpenPopup('Legals Entities Activities', 'IdentitiesLegalsEntitiesActivities.aspx','&amp;src=Customers&amp;control=ActivityID')" />
    
    
    </Listeners>
    
    
    </ext:Button>
    
    
    </ext:Cell>
    
    
    </ext:TableLayout>
    
    
    </Body>
    
    
    </ext:Panel>
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:ComboBox 
    
    
    ID='EntityTypeID' 
    
    
    Runat='Server' 
    
    
    FieldLabel='EntityType' 
    
    
    StoreID='EntityTypeIDStore' 
    
    
    DisplayField='EntityType' 
    
    
    ValueField='EntityTypeID' 
    
    
    ReadOnly='true' 
    
    
    TypeAhead='true' 
    
    
    Disabled='true' 
    
    
    ForceSelection='true' 
    
    
    TriggerAction='All' 
    
    
    Width="200" 
    
    
    />
    
    
    </ext:Anchor> 
    
    
    <ext:Anchor>
    
    
    <ext:DateField 
    
    
    ID='DateLastSale' 
    
    
    Runat='Server' 
    
    
    FieldLabel='DateLastSale' 
    
    
    ReadOnly="true" 
    
    
    
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:DateField 
    
    
    ID='DateAdded' 
    
    
    Runat='Server' 
    
    
    FieldLabel='DateAdded' 
    
    
    ReadOnly="true" 
    
    
    
    
    
    />
    
    
    </ext:Anchor>
    
    
    </ext:FormLayout> 
    
    
    </Body> 
    
    
    </ext:Tab>
    
    
    <ext:Tab ID="tabDomicilio" Title="__Address__" >
    
    
    <Body>
    
    
    <ext:BorderLayout ID="BorderLayoutAddress" runat="server">
    
    
    <North Split="True">
    
    
    <ext:GridPanel 
    
    
    ID="GridPanelIdentitiesAddress" 
    
    
    runat="server" 
    
    
    AutoExpandColumn="Street" 
    
    
    StoreID="IdentitiesAddressStore"
    
    
    Height="200">
    
    
    <ColumnModel ID="ColumnModelIdentitiesAddress" runat="server">
    
    
    <Columns>
    
    
    <ext:Column ColumnID='Street' DataIndex='Street' Header='Street' />
    
    
    <ext:Column ColumnID='StreetNumber' DataIndex='StreetNumber' Header='StreetNumber' Width='50' />
    
    
    <ext:Column ColumnID='StreetOther' DataIndex='StreetOther' Header='StreetOther' Width='70' />
    
    
    <ext:Column ColumnID='AdressTypeCode' DataIndex='AdressTypeCode' Header='AdressTypeCode' />
    
    
    <ext:Column ColumnID='City' DataIndex='City' Header='City' />
    
    
    </Columns>
    
    
    </ColumnModel>
    
    
    <SelectionModel>
    
    
    <ext:RowSelectionModel ID="RowSelectionModelIdentitiesAddress" runat="server" SingleSelect="true">
    
    
    <AjaxEvents>
    
    
    <RowSelect Buffer="250">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{DetailsIdentitiesAddress}" />
    
    
    <ExtraParams>
    
    
    <ext:Parameter Name="AddressID" Value="this.getSelected().id" Mode="Raw" />
    
    
    </ExtraParams>
    
    
    </RowSelect>
    
    
    </AjaxEvents>
    
    
    </ext:RowSelectionModel>
    
    
    </SelectionModel>
    
    
    <TopBar>
    
    
    <ext:Toolbar ID="toolbarGridAddress" runat="server">
    
    
    <Items>
    
    
    <ext:Button ID="cmdNewAddress" runat="server" Text="New" Icon="ApplicationAdd">
    
    
    <AjaxEvents>
    
    
    <Click Failure="Ext.MessageBox.alert('New Item failed', 'Error during ajax event');">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{DetailsIdentitiesAddress}.body}" />
    
    
    </Click>
    
    
    </AjaxEvents>
    
    
    <ToolTips><ext:ToolTip Title="Create" Html="Create New item" /></ToolTips>
    
    
    </ext:Button>
    
    
    <ext:Button ID="cmdEditAddress" runat="server" Text="Edit" Icon="ApplicationEdit" Enabled="false">
    
    
    <AjaxEvents>
    
    
    <Click Failure="Ext.MessageBox.alert('Editing failed', 'Error during ajax event');">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{DetailsIdentitiesAddress}.body}" />
    
    
    <ExtraParams>
    
    
    <ext:Parameter Name="AddressID" Value="#{GridPanelIdentitiesAddress}.getSelectionModel().getSelected().data.AddressID" Mode="Raw" />
    
    
    </ExtraParams>
    
    
    </Click>
    
    
    </AjaxEvents>
    
    
    <ToolTips><ext:ToolTip Title="Edit" Html="Edit active item" /></ToolTips>
    
    
    </ext:Button>
    
    
    <ext:Button ID="cmdDeleteAddress" runat="server" Text="Delete" Icon="ApplicationDelete" Enabled="false">
    
    
    <Listeners>
    
    
    <Click Handler="Ext.Msg.confirm('Delete Item', 'Are you sure to delete?', function(btn){
    
    
    if(btn=='yes') {
    
    
    #{GridPanelIdentitiesAddress}.loadMask.msg = 'Deleting...'
    
    
    #{GridPanelIdentitiesAddress}.loadMask.show();
    
    
    #{GridPanelIdentitiesAddress}.loadMask.msg = 'Loading...'
    
    
    #{IdentitiesAddressDetailsStatus}.showBusy('Deleting...');
    
    
    Coolite.AjaxMethods.DeleteItemAddress(#{GridPanelIdentitiesAddress}.getSelectionModel().getSelected().data.AddressID,{success:function(result){if (result.result!='') {Ext.Msg.show({title:'Deleting Error',msg: result, buttons: Ext.Msg.OK, icon: Ext.MessageBox.ERROR});}}});
    
    
    }}
    
    
    )" 
    
    
    />
    
    
    </Listeners>
    
    
    <ToolTips><ext:ToolTip Title="Delete" Html="Delete active item" /></ToolTips>
    
    
    </ext:Button>
    
    
    </Items>
    
    
    </ext:Toolbar>
    
    
    </TopBar>
    
    
    <LoadMask ShowMask="true" />
    
    
    </ext:GridPanel>
    
    
    </North>
    
    
    <Center Split="True">
    
    
    <ext:Panel 
    
    
    ID="DetailsIdentitiesAddress" 
    
    
    runat="server" 
    
    
    AutoWidth="true"
    
    
    Width="250"
    
    
    >
    
    
    <Body>
    
    
    <ext:FormLayout ID="DetailsCustomersFormLayoutAddressDetails" runat="server">
    
    
    <ext:Anchor><ext:Hidden runat="server" ID="IdentitiesAddress_CRUDMode" Text="View" /></ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='AddressID' 
    
    
    Runat='Server' 
    
    
    FieldLabel='AddressID' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:ComboBox 
    
    
    ID='AddressTypeID' 
    
    
    Runat='Server' 
    
    
    FieldLabel='AddressTypeID' 
    
    
    StoreID='AddressTypeIDStore' 
    
    
    DisplayField='AdressType' 
    
    
    ValueField='AdressTypeID' 
    
    
    ReadOnly='true' 
    
    
    TypeAhead='true' 
    
    
    Disabled='true' 
    
    
    ForceSelection='true' 
    
    
    TriggerAction='All' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='Street' 
    
    
    Runat='Server' 
    
    
    FieldLabel='Street' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='StreetNumber' 
    
    
    Runat='Server' 
    
    
    FieldLabel='StreetNumber' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='StreetOther' 
    
    
    Runat='Server' 
    
    
    FieldLabel='StreetOther' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='Phone1' 
    
    
    Runat='Server' 
    
    
    FieldLabel='Phone1' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='Phone2' 
    
    
    Runat='Server' 
    
    
    FieldLabel='Phone2' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='Fax' 
    
    
    Runat='Server' 
    
    
    FieldLabel='Fax' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:ComboBox 
    
    
    ID='CityID' 
    
    
    Runat='Server' 
    
    
    FieldLabel='CityID' 
    
    
    StoreID='CityIDStore' 
    
    
    DisplayField='City' 
    
    
    ValueField='CityID' 
    
    
    ReadOnly='true' 
    
    
    TypeAhead='true' 
    
    
    Disabled='true' 
    
    
    ForceSelection='true' 
    
    
    TriggerAction='All' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='ZipCode' 
    
    
    Runat='Server' 
    
    
    FieldLabel='ZipCode' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    <ext:Anchor>
    
    
    <ext:TextField 
    
    
    ID='CityOther' 
    
    
    Runat='Server' 
    
    
    FieldLabel='CityOther' 
    
    
    ReadOnly='true' 
    
    
    />
    
    
    </ext:Anchor>
    
    
    </ext:FormLayout>
    
    
    </body>
    
    
    <BottomBar>
    
    
    <ext:StatusBar runat="server" ID="IdentitiesAddressDetailsStatus" StyleSpec="text-align:right;border-top:1px solid #99BBE8">
    
    
    <Items>
    
    
    <ext:Button ID="CmdSaveAddress" runat="server" Text="Save" Icon="Disk" Enabled="false">
    
    
    <AjaxEvents>
    
    
    <Click Failure="Ext.Msg.show({title:'Saving Error',msg: result.errorMessage, buttons: Ext.Msg.OK, icon: Ext.MessageBox.ERROR});" Before="IdentitiesAddressDetailsStatus.showBusy('Saving...');">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{DetailsIdentitiesAddress}.body}" />
    
    
    <ExtraParams>
    
    
    <ext:Parameter Name="ID" Value="#{AddressID}.value" Mode="Raw" />
    
    
    </ExtraParams>
    
    
    </Click>
    
    
    </AjaxEvents>
    
    
    <ToolTips><ext:ToolTip Title="Save" Html="Save item" /></ToolTips>
    
    
    </ext:Button>
    
    
    <ext:ToolbarSeparator ID="ToolbarSeparator3" runat="server"></ext:ToolbarSeparator>
    
    
    <ext:Button ID="CmdCancelAddress" runat="server" Text="Cancel" Icon="Cancel" Enabled="false">
    
    
    <AjaxEvents>
    
    
    <Click Failure="Ext.MessageBox.alert('Editing failed', 'Error during ajax event');">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{DetailsIdentitiesAddress}.body}" />
    
    
    </Click>
    
    
    </AjaxEvents>
    
    
    <ToolTips><ext:ToolTip Title="Cancel" Html="cancel create/edit item" /></ToolTips>
    
    
    </ext:Button>
    
    
    </Items>
    
    
    </ext:Statusbar>
    
    
    </BottomBar>
    
    
    </ext:Panel>
    
    
    </Center>
    
    
    </ext:BorderLayout> 
    
    
    </Body>
    
    
    </ext:Tab> 
    
    
    <ext:Tab ID="TabDetails3" Title="__LegalRepresentation__" >
    
    
    <Body>
    
    
    
    
    
    </Body>
    
    
    </ext:Tab> 
    
    
    </Tabs>
    
    
    </ext:TabPanel>
    
    
    </ext:FitLayout>
    
    
    </body>
    
    
    <BottomBar>
    
    
    <ext:StatusBar runat="server" ID="CustomersDetailsStatus" StyleSpec="text-align:right;border-top:1px solid #99BBE8">
    
    
    <Items>
    
    
    <ext:Button ID="cmdSave" runat="server" Text="Save" Icon="Disk" Enabled="false">
    
    
    <AjaxEvents>
    
    
    <Click Failure="Ext.Msg.show({title:'Saving Error',msg: result.errorMessage, buttons: Ext.Msg.OK, icon: Ext.MessageBox.ERROR});" Before="CustomersDetailsStatus.showBusy('Saving...');">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{DetailsCustomers}.body}" />
    
    
    <ExtraParams>
    
    
    <ext:Parameter Name="ID" Value="#{IdentityID}.value" Mode="Raw" />
    
    
    </ExtraParams>
    
    
    </Click>
    
    
    </AjaxEvents>
    
    
    <ToolTips><ext:ToolTip Title="Save" Html="Save item" /></ToolTips>
    
    
    </ext:Button>
    
    
    <ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server"></ext:ToolbarSeparator>
    
    
    <ext:Button ID="cmdCancel" runat="server" Text="Cancel" Icon="Cancel" Enabled="false">
    
    
    <AjaxEvents>
    
    
    <Click Failure="Ext.MessageBox.alert('Editing failed', 'Error during ajax event');">
    
    
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{DetailsCustomers}.body}" />
    
    
    </Click>
    
    
    </AjaxEvents>
    
    
    <ToolTips><ext:ToolTip Title="Cancel" Html="cancel create/edit item" /></ToolTips>
    
    
    </ext:Button>
    
    
    </Items>
    
    
    </ext:Statusbar>
    
    
    </BottomBar>
    
    
    </ext:Panel>
    
    
    </East>
    
    
    </ext:BorderLayout>
    
    
    </Body>
    
    
    </ext:ViewPort>
    
    
    
    
    
    
    </form>
    
    
    </body>
    
    
    </html>
  2. #2

    RE: Javascript errors on render (simplified code)

    Hi nanosassa,

    It looks like you are loading 7 objectdatasource controls and I'm getting 7 exceptions thrown. Can you simplify your example and narrow this down to one specific issue?

    Another quick tip that I noticed... you should be able to set the the 'start' and 'limit' params without the rawtoken wrapper by using the Mode="Raw" property.

    Example

    // Existing
    <ext:Parameter Name="start" Value="={0}" />
    
    // New
    <ext:Parameter Name="start" Value="0" Mode="Raw" />
    Hope this helps.

    Geoffrey McGill
    Founder & CEO
  3. #3

    RE: Javascript errors on render (simplified code)

    Hi geoffrey,

    I solved that replacing tab content with an iframe and creating a new page with the content...

    Thanks for your time

    Regards,

    Rinaldo J. Sassaroli

Similar Threads

  1. [CLOSED] Help debugging various javascript errors
    By jmcantrell in forum 1.x Premium Help
    Replies: 1
    Last Post: Jun 23, 2010, 1:31 PM
  2. [CLOSED] [1.0] ColumnModel JavaScript errors
    By egodoy in forum 1.x Premium Help
    Replies: 3
    Last Post: Apr 29, 2010, 12:18 PM
  3. Javascript errors when upgrading to 0.8.2
    By principal_X in forum 1.x Help
    Replies: 4
    Last Post: Jan 07, 2010, 10:06 PM
  4. [CLOSED] javascript errors with the latest
    By alexp in forum 1.x Premium Help
    Replies: 10
    Last Post: Oct 28, 2009, 1:07 PM
  5. javascript errors when render
    By nanosassa in forum 1.x Help
    Replies: 2
    Last Post: May 09, 2009, 1:10 PM

Posting Permissions