[CLOSED] Upgrading from 1.0 RC to 1.0.

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Upgrading from 1.0 RC to 1.0.

    We started developing an application using 1.0RC of the toolset. We are relying on the ToScript Method to generate our controls on the fly. These controls are generated by web services and returned to direct events. After we upgraded from 1.0 RC to 1.0 the calls stopped working. Incidentally, all of the calls by our Stores to their HTTP Proxies stopped working as well.

    This should like a configuration issue. Any suggestions?

    Thanks.
    Last edited by Daniil; Dec 02, 2010 at 7:46 AM. Reason: [CLOSED]
  2. #2
    Hi,

    The v1.0RC1 is the latest release and is available for download at the following location, see

    http://www.ext.net/download/

    The official version "1.0" has not been released yet.
    Geoffrey McGill
    Founder
  3. #3
    Hi,

    Can you provide the source code of your web service (and test page) which works previously?
  4. #4

    As requested...Web Service Example

    
        <WebMethod()> _
        Public Function GetSites() As Paging(Of PRG_Site)
            '-- We don't have time to implement a more sophisticated chaching mechanism
            '-- really all the system lists should be cached.
            Dim oCache As System.Web.Caching.Cache = HttpContext.Current.Cache
            Dim oSites As List(Of PRG_Site)
    
            Try
    
               oSites = SystemListManager.LoadSites.ToList
    
    
                '--- Return the list of sites.
                Return New Paging(Of PRG_Site)(oSites.ToList, oSites.Count)
            Catch ex As Exception
                Throw ex
            End Try
        End Function
  5. #5
    Hi,

    I don't see where you use ToScript method to create a control.
    Please provide full test sample and describe the problem in details
  6. #6
    Sorry... here is a full code example:


    This is the mark up for one of our list windows.

    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="ucUsers.ascx.vb" Inherits="UserControls_ucUsers" %>
    <ext:Window ID="winUsers" runat="server" Title="Users" InitCenter="true" Padding="5"
        Width="600" Height="300" Layout="Fit" Closable="true" Modal="true">
        <Items>
            <ext:GridPanel ID="grdUsers" runat="server" StripeRows="true" Border="false" ClicksToEdit="1"
                Header="false">
                <ColumnModel ID="colModUsers" runat="server">
                    <Columns>
                        <ext:Column ColumnID="UserId" Header="User Id" Width="100" DataIndex="UserId" Sortable="true">
                        </ext:Column>
                        <ext:Column ColumnID="FirstName" Header="First Name" Width="100" DataIndex="FirstName"
                            Sortable="false">
                        </ext:Column>
                        <ext:Column ColumnID="LastName" Header="Last Name" Width="100" DataIndex="LastName"
                            Sortable="false">
                        </ext:Column>
                        <ext:CheckColumn ColumnID="Active" Header="Active" Width="50" DataIndex="Active"
                            Sortable="false">
                        </ext:CheckColumn>
                        <ext:CommandColumn Width="30">
                            <Commands>
                                <ext:GridCommand Icon="PageEdit" CommandName="Edit">
                                    <ToolTip Text="Opens the current row for edit." />
                                </ext:GridCommand>
                            </Commands>
                        </ext:CommandColumn>
                    </Columns>
                </ColumnModel>
                <Store>
                    <ext:Store runat="server" ID="storeUsers" AutoLoad="true">
                        <Proxy>
                            <ext:HttpProxy Method="GET" Url="UserMaintenanceWebService.asmx/GetUsers">
                            </ext:HttpProxy>
                        </Proxy>
                        <Reader>
                            <ext:XmlReader Record="PRG_User" TotalProperty="TotalRecords">
                                <Fields>
                                    <ext:RecordField Name="UserId" Type="String" />
                                    <ext:RecordField Name="FirstName" Type="String" />
                                    <ext:RecordField Name="LastName" Type="String" />
                                    <ext:RecordField Name="Active" Type="Boolean" />
                                </Fields>
                            </ext:XmlReader>
                        </Reader>
                        <AutoLoadParams>
                            <ext:Parameter Name="start" Value="={0}" />
                            <ext:Parameter Name="limit" Value="={50}" />
                        </AutoLoadParams>
                        <BaseParams>
                            <ext:Parameter Name="sort" Value="SORT_getSort()" Mode="Raw" />
                            <ext:Parameter Name="filter" Value="Filter_loadDefault(#{grdUsers})" Mode="Raw"  />
                            <ext:Parameter Name="dir" Value="" />
                        </BaseParams>
                    </ext:Store>
                </Store>
                <LoadMask Msg="Loading, please wait..." ShowMask="true" />
                <Listeners>
                    <Command Handler=" 
    
                    #{winUsers}.body.mask('Loading, please wait...');
    
                              Ext.net.DirectMethod.request({
                    url: 'UIHelperWebService.asmx/GetUserEditScreen',
                    cleanRequest: true,
                    params: {
                        UserId: record.data.UserId
                    },
                    success: function (result) {
                     #{winUsers}.body.unmask();
                        eval(result.script);
                        }
                    });
    
                    " />
                </Listeners>
            </ext:GridPanel>
        </Items>
        <TopBar>
            <ext:Toolbar ID="toolBarUsers" runat="server">
                <Items>
                    <ext:Button ID="btnAddUser" runat="server" Text="Add" Icon="Add">
                        <DirectEvents>
                            <Click Url="UIHelperWebService.asmx/GetUserEditScreen" CleanRequest="true">
                                <EventMask Msg="Please wait..." ShowMask="true" />
                                <ExtraParams>
                                    <ext:Parameter Name="UserId" Value="" Mode="Value">
                                    </ext:Parameter>
                                </ExtraParams>
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                    <ext:Button ID="btnSort" runat="server" Text="Sort" Icon="SortAscending">
                        <Listeners>
                            <Click Handler="SORT_showBuilder();" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="btnFilterUsers" runat="server" Text="Filter" Icon="Find">
                        <Listeners>
                            <Click Handler="Filter_showFilter();" />
                        </Listeners>
                    </ext:Button>
                    <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                    </ext:ToolbarFill>
                     <ext:Button ID="btnCancel" runat="server" Text="Close" Icon="Cancel">
                        <Listeners>
                            <Click Handler="#{winUsers}.close();" />
                        </Listeners>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </TopBar>
        <BottomBar>
            <ext:PagingToolbar runat="server" ID="pageToolBarUsers" StoreID="storeUsers">
            </ext:PagingToolbar>
        </BottomBar>
        <Listeners>
            <BeforeShow Handler="SORT_populateSortableFields(#{grdUsers}, #{btnSort});FILTER_initializeFilterBuilder(CONST_userScreenMasterId, #{grdUsers}, #{btnFilterUsers})" />
        </Listeners>
    </ext:Window>
  7. #7
    This is the code behind. You will see the ToScript method that is used to script out the window that is defined in the markup:

    Partial Class UserControls_ucUsers
        Inherits Common.BaseExtWindowUserControl
    
        Public Overrides Function ToScript() As String
            Me.winUsers.DoLayout()
            Return Me.winUsers.ToScript()
        End Function
    
        Public Overrides Sub DisplayInfo(ByVal Parameter As Object)
    
            Dim oParameter As Ext.Net.Parameter
            oParameter = Me.storeUsers.AutoLoadParams(1)
            oParameter.Value = Common.Utility.GetDefaultPageSize
    
            Me.pageToolBarUsers.PageSize = Common.Utility.GetDefaultPageSize
        End Sub
    End Class
    Below is the actual web service calls to return the scripted window:

    
     <WebMethod(EnableSession:=True)> _
        Public Function GetUsersListScreen() As Ext.Net.DirectResponse
            Dim oUserControl As New UserControl
    
            Dim oControl As Common.BaseExtWindowUserControl = CType(oUserControl.LoadControl("~/UserControls/ucUsers.ascx"), Common.BaseExtWindowUserControl)
            oControl.DisplayInfo(Nothing)
            Dim strWindow As String = oControl.ToScript()
    
            Return New Ext.Net.DirectResponse(strWindow)
        End Function
    This web service method is called by the store that is a child of the grid control that belongs to the scripted window:

    
        <WebMethod(EnableSession:=True)> _
        Public Function GetUsers(ByVal Start As Integer, ByVal Limit As Integer, ByVal Sort As String, ByVal Dir As String, ByVal filter As String) As Ext.Net.Paging(Of PRG_User)
            Return (New Security.UserMaintenance).GetUsers(Start, Limit, Sort, Dir, filter)
        End Function
    And finally, this is the code that returns the user data using Linq To Sql from our database:

    
            Public Function GetUsers(ByVal Start As Integer, ByVal Limit As Integer, ByVal Sort As String, ByVal Dir As String, ByVal filter As String) As Ext.Net.Paging(Of PRG_User)
                Dim oDataContext As New ProgressorDataContext()
    
                If Sort = String.Empty Then
                    Sort = "UserId"
                End If
    
                 qryResults = oDataContext.PRG_Users.Skip(Start).Take(Limit).OrderBy(Sort)
                  Return New Ext.Net.Paging(Of PRG_User)(qryResults.ToList, oDataContext.PRG_Users.Count)
    
          End Function
  8. #8
    Hi,

    1. I don't see any description of your problem, in the first post you mentioned only "After we upgraded from 1.0 RC to 1.0 the calls stopped working" but it is not informative at all

    2. I don't see where and how you generates controls, you mentioned "We are relying on the ToScript Method to generate our controls on the fly" but you did not provide that code

    Please provide test sample which we can run locally without any changes and provide detailed explanation of your issue. You can create test project, zip it (without assemblies) and post (or send to the support@object.net)
  9. #9
    Vlad,

    I included this in the code I just added earlier. We are using the ToScript method that is a method on the Ext.Net.Window class. Below is the code that we use to script it out. Take a look at the ToScript method. You will see it returns whatever is returned by the call to the Window.ToScript function.

    Like I said, this worked like a charm before.


    I am restricted in what I can send out and have only gotten approval for the code that I have sent.

    
    
    Partial Class UserControls_ucUsers
        Inherits Common.BaseExtWindowUserControl
    
        Public Overrides Function ToScript() As String
            Me.winUsers.DoLayout()
            Return Me.winUsers.ToScript()
        End Function
    
        Public Overrides Sub DisplayInfo(ByVal Parameter As Object)
    
            Dim oParameter As Ext.Net.Parameter
            oParameter = Me.storeUsers.AutoLoadParams(1)
            oParameter.Value = Common.Utility.GetDefaultPageSize
    
            Me.pageToolBarUsers.PageSize = Common.Utility.GetDefaultPageSize
        End Sub
    End Class
  10. #10
    I got approval for a small demo project. I will upload it shortly.
Page 1 of 2 12 LastLast

Similar Threads

  1. Upgrading to a pro license
    By juanrayner in forum Licensing
    Replies: 1
    Last Post: May 04, 2012, 5:31 PM
  2. Upgrading from V1.3 to V2.0
    By Birgit in forum 2.x Help
    Replies: 1
    Last Post: Mar 29, 2012, 4:47 PM
  3. Upgrading RC1 to RC2
    By santosbj in forum 1.x Help
    Replies: 8
    Last Post: Jun 14, 2011, 7:06 AM
  4. upgrading from 0.8.1 to 0.8.2
    By Kamal in forum 1.x Help
    Replies: 4
    Last Post: Apr 08, 2010, 5:52 PM
  5. [CLOSED] Before upgrading to 1.0- Needs your help
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 16, 2010, 4:45 PM

Posting Permissions