Mar 21, 2011, 2:44 PM
[CLOSED] Error executing child request for handler 'Ext.Net.SelfRenderingPage'.
Following error is appearing when I use my recordset creating a dynamic grid based on the following example
Error executing child request for handler 'Ext.Net.SelfRenderingPage'.
Error executing child request for handler 'Ext.Net.SelfRenderingPage'.
<%@ Page Title="Lista de Valores" Language="C#" MasterPageFile="~/Views/Model/SUtFrm00.Master"
AutoEventWireup="true" CodeBehind="SUtLst00.aspx.cs" Inherits="Sispro.Ut.Geral.PL.SUtLogW500.Views.ListValues.SUtLst00" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<asp:Content ID="ContentHead" runat="server" ContentPlaceHolderID="cphFrmMainHead">
<script type="text/javascript">
</script>
</asp:Content>
<asp:Content ID="ContentBory" ContentPlaceHolderID="cphFrmMainBody" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="Viewport" runat="server" Layout="Fit">
<Items>
<ext:Panel ID="pnlGrid" runat="server" Layout="Fit" Frame="true">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:Button ID="Button3" runat="server" Text="Fechar Modal">
<Listeners>
<Click Handler="window.parent.hideSpot();" />
</Listeners>
</ext:Button>
<ext:Button ID="Button1" runat="server" Text="Add GridPanel" Icon="Add">
<DirectEvents>
<Click OnEvent="Button1_Click">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="Window1" />
</Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
</ext:Panel>
</Items>
</ext:Viewport>
</asp:Content>
SUtLst00.aspx.csusing System;
using System.Collections.Generic;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using Sispro.Ut.Geral.PL.SUtLogW500.Presenter;
using Sispro.Ut.Geral.PL.SUtLstG500;
using Sispro.Ut.Geral.PL.SUtPrsG500;
using Sispro.Ut.Geral.PL.SUtResG500;
using Sispro.Ut.Geral.UTL.SUtGlbL500;
using Sispro.Ut.Geral.UTL.SUtPacL500;
using Ext.Net;
namespace Sispro.Ut.Geral.PL.SUtLogW500.Views.ListValues
{
public partial class SUtLst00 : System.Web.UI.Page, IView
{
#region Page Events
protected void Button1_Click(object sender, DirectEventArgs e)
{
this.BuildGridPanel().AddTo(this.pnlGrid);
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
Registry.Window = this;
if (!Page.IsPostBack)
{
// Inicialização dos recursos embutidos
Registry.SUtLst00Presenter.InitializeEmbedeedResources();
//this.BuildGridPanel().AddTo(this.pnlGrid);
}
}
catch (Exception ex)
{
Sispro.Ut.Geral.UTL.SUtGlbL500.Window.CloseWindow(this.Page);
throw new ManagerException(null, null, string.Format("{0}", ex.Message.ToString()));
}
}
#endregion
#region Private Methods
private GridPanel BuildGridPanel()
{
String columnID;
String header;
String dataIndex;
try
{
//Descerialização da classe Fields
System.Byte[] BinaryFields = (System.Byte[])Session["LIST_FIELDS"];
List<Fields> Fields = SerializationHelpers<List<Fields>>.LoadMemory(BinaryFields, true);
Session["LIST_FIELDS"] = Fields;
//Descerialização da classe SutListValues
byte[] BinaryList = (byte[])Session["LIST_VALUES"];
SUtListValues ListValues = SerializationHelpers<SUtListValues>.LoadMemory(BinaryList, true);
Session["LIST_VALUES"] = ListValues;
//Definições Gerais do Grid
GridPanel grid = new GridPanel
{
Border = false,
StripeRows = true,
TrackMouseOver = true,
AutoScroll = true,
AutoExpandColumn = ListValues.AutoExpandColumn,
Store = { this.BuildStore(Fields) },
SelectionModel = { new RowSelectionModel { SingleSelect = true }},
};
//Mascara do Grid
grid.LoadMask.ShowMask = true;
grid.LoadMask.Msg = "Carregando...";
//Paginador
PagingToolbar ptb = new PagingToolbar() { PageSize = 10 };
////ToolbarSpacer
//ToolbarSpacer tbs = new ToolbarSpacer();
//tbs.Width = 10;
//ptb.Items.Add(tbs);
//ComboBox
//ComboBox cbb = new ComboBox();
//cbb.Width = 80;
//cbb.Template.Visible = false;
//cbb.Template.EnableViewState = false;
////cbb.Items.Add(new ListItem { TextAlign = 10 });
//cbb.Items.Add(new Ext.Net.ListItem { Text = "1" });
//cbb.Items.Add(new Ext.Net.ListItem { Text = "2" });
//cbb.Items.Add(new Ext.Net.ListItem { Text = "5" });
//cbb.Items.Add(new Ext.Net.ListItem { Text = "10" });
//cbb.Items.Add(new Ext.Net.ListItem { Text = "20" });
//cbb.SelectedItem.Value = "5";
//Adiciona o PagingToolbar no BottomBar do Grid
grid.BottomBar.Add(ptb);
//Colunas do Grid
Fields.ForEach(delegate(Fields fields)
{
columnID = Crypto.DecryptPassword(fields.Nome, ",.;{]<(/}+->)[_*&$@!#%");
header = Crypto.DecryptPassword(fields.Descricao, ",.;{]<(/}+->)[_*&$@!#%");
dataIndex = Crypto.DecryptPassword(fields.Nome, ",.;{]<(/}+->)[_*&$@!#%");
grid.ColumnModel.Columns.Add(new Ext.Net.Column { ColumnID = columnID, Header = header, DataIndex = dataIndex });
});
return new GridPanel();
}
catch (Exception ex)
{
Sispro.Ut.Geral.UTL.SUtGlbL500.Window.CloseWindow(this.Page);
throw new ManagerException(null, null, string.Format("{0}", ex.Message.ToString()));
}
}
private Store BuildStore(List<Fields> pFields)
{
try
{
Store store = new Store();
ArrayReader reader = new ArrayReader();
store.ID = "Store1"; // <-- ID is Required
pFields.ForEach(delegate(Fields fields)
{
reader.Fields.Add(Crypto.DecryptPassword(fields.Nome, ",.;{]<(/}+->)[_*&$@!#%"));
});
store.Reader.Add(reader);
byte[] BinaryRecordDataSet = (byte[])Session["LIST_RECORDSET"];
RecordSet RecordSet = SerializationHelpers<RecordSet>.LoadMemory(BinaryRecordDataSet, true);
Session["LIST_RECORDSET"] = RecordSet;
store.DataSource = RecordSet;
store.DataBind();
return store;
}
catch (Exception ex)
{
Sispro.Ut.Geral.UTL.SUtGlbL500.Window.CloseWindow(this.Page);
throw new ManagerException(null, null, string.Format("{0}", ex.Message.ToString()));
}
}
#endregion
#region IView Members
public void CompleteDelete()
{
}
public void CompleteInsert()
{
}
public void CompleteUpdate()
{
}
public void FinalizePage()
{
}
public void GeneratePackage(Package package, OperationPackage operation)
{
}
public void GetReturnPackageDelete(Package returnPackage)
{
}
public void GetReturnPackageInsert(Package returnPackage)
{
}
public void GetReturnPackageSelect(Package returnPackage)
{
}
public void GetReturnPackageUpdate(Package returnPackage)
{
}
public void InitializeData()
{
}
public void InitializeEmbedeedResources()
{
}
public void InitializeKeys()
{
}
public void InitializePage()
{
}
public void ProcessList(RecordSet recordDataSet, string nameList)
{
}
public void UpdateControls(RecordSet recordDataSet)
{
}
public void ValidateData()
{
}
public void ValidateDelete()
{
}
public void ValidateInsert()
{
}
public void ValidateKeys()
{
}
public void ValidateUpdate()
{
}
#endregion
}
}
Last edited by Daniil; Apr 01, 2011 at 12:27 PM.
Reason: [CLOSED]