[CLOSED] Javascript Error loading dynamic usercontrol 1.0

  1. #1

    [CLOSED] Javascript Error loading dynamic usercontrol 1.0

    Hi,

    I am getting the error below when i attempt to load a dynamic usercontrol. "missing ; before statement" Please see attachment for sample. Just click the green button in the left most column to generate the error.

    A child window should be loaded from the south. Please offer some assistance.

  2. #2

    RE: [CLOSED] Javascript Error loading dynamic usercontrol 1.0

    Hi,

    1. Update from SVN
    2. Define stores using Store property of the ListView (like in the following code)

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="RecordProperties.ascx.cs" Inherits="RecordProperties" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    
    <ext:FitLayout ID="FitLayout1" runat="server">
        <Items>
            <ext:Panel ID="PanelReportProperties" runat="server" ButtonAlign="Right" Height="280" Layout="Absolute">       
                <Items>    
                    <ext:Panel ID="Panel1" runat="server" Header="false" Padding="5" X="0" Y="0" Width="400">
                        <Items>
                            <ext:Label ID="LabelSummary" runat="server" Text="Summary:"></ext:Label>
                            <ext:ListView ID="ListViewStatus" runat="server" Height="140" MultiSelect="false" EmptyText="" Width="400" >
                            <Store>
                                <ext:Store runat="server" ID="StoreStatus" AutoLoad="true"   >
                                    <Reader>
                                        <ext:JsonReader IDProperty="ReAssignmentStatus">
                                            <Fields>
                                                <ext:RecordField Name="url"></ext:RecordField>
                                                <ext:RecordField Name="status"></ext:RecordField>
                                            </Fields>
                                        </ext:JsonReader>
                                    </Reader>
                                </ext:Store>
                            </Store>
                            <Columns>
                                 <ext:ListViewColumn Header="" Width="0.15" DataIndex="url" Template='<img style="width:16px;height:16px;" src="{url}" />' />
                                 <ext:ListViewColumn Header="" Width="0.85" DataIndex="status" />   
                            </Columns>                            
                            </ext:ListView>                           
                             <ext:Label runat="server" Text="Attachments:" ID="LabelAttachments"></ext:Label>
                             <ext:ListView runat="server" ID="ListViewAttachments" Height="120">
                                <Store>
                                    <ext:Store runat="server" ID="StoreAttachments" AutoLoad="true" OnRefreshData="StoreAttachments_RefreshData" >
                                        <Reader>
                                            <ext:JsonReader IDProperty="AttachmentsReader">
                                                <Fields>
                                                    <ext:RecordField Name="imageUrl"></ext:RecordField>
                                                    <ext:RecordField Name="Filename"></ext:RecordField>
                                                </Fields>
                                            </ext:JsonReader>
                                        </Reader>
                                    </ext:Store>
                                </Store>
                                <Columns>
                                    <ext:ListViewColumn Header="" Width="0.15" DataIndex="imageUrl" Template='<img style="width:16px;height:16px;" src="{url}" />'></ext:ListViewColumn> 
                                    <ext:ListViewColumn Header="" Width="0.85" DataIndex="Filename"></ext:ListViewColumn>                                   
                                </Columns>
                             </ext:ListView>
                        </Items>
                    </ext:Panel>                    
                       
                    <ext:Panel ID="Panel2" runat="server" Header="false" Padding="5"  X="401" Y="0" Width="400">
                        <Content>
                             <ext:Label runat="server" Text="Details:" ID="LabelDetails"></ext:Label><br />
                             <ext:TextArea runat="server" Height="240" Width="400" ID="TextAreaDetails" ReadOnly="true"></ext:TextArea>
                        </Content>
                    </ext:Panel>
                           
                </Items>
                 <Listeners>
                    <Show Handler="#{PanelReportProperties}.doLayout();" Delay="100" Single="true"/>
                </Listeners>    
            </ext:Panel>
        </Items>
    </ext:FitLayout>
  3. #3

    RE: [CLOSED] Javascript Error loading dynamic usercontrol 1.0

    Since the update

    i am getting an unhandled exception with the message "You can't use StoreID and Store at one time"

    in the DataViewBase class
  4. #4

    RE: [CLOSED] Javascript Error loading dynamic usercontrol 1.0

    Hi,

    You have to remove StoreID if you define inline Store

Similar Threads

  1. [CLOSED] Dynamic usercontrol and execute javascript
    By Patman in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 30, 2011, 4:50 PM
  2. [CLOSED] Loading UserControl window from Parent Form throwing error
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 10, 2011, 3:43 PM
  3. [CLOSED] Error: 'dom.style' by loading UserControl
    By smart+ in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 30, 2010, 6:24 PM
  4. [CLOSED] [1.0] Javascript error when loading usercontrol from code
    By klaus.schwarz in forum 1.x Legacy Premium Help
    Replies: 17
    Last Post: Jul 12, 2010, 3:59 PM
  5. [CLOSED] Javascript error when using this usercontrol
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 25
    Last Post: Jun 15, 2010, 5:26 PM

Posting Permissions