Rank: Advanced Member Groups: Member
Joined: 3/9/2010 Posts: 119
|
I have a callback panel inside a dialog's template. The panel has many child controls and one is a an updateable table where each tablecell holds an update panel. When the tablecell's callback panel is executed the callback_before_execute_handler function fires but the server side execute does not and what ever is happening it is causing the dialog closes. Does anyone have any insights?
|
Rank: Advanced Member Groups: Member
Joined: 3/9/2010 Posts: 119
|
I created a test application to simplify the troubleshooting. When the nested callback panel tries to execute I get the error EO944. Is this a valid error code or do I need to keep testing?
Code: HTML/ASPX
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!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 runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<script type="text/javascript" language="javascript">
function before_execute(callback) {
alert("before execute...");
}
function after_execute(callback, output, extraData) {
alert("after execute...");
}
function executeCallback(txt, callback_id) {
eo_Callback(callback_id, 'test');
}
function clientside_error_handler(control, error, message) {
alert(message);
}
</script>
<asp:Image ID="Image1" runat="server" ImageUrl="~/home.png" onmouseover="this.style.cursor = 'pointer';" onclick="eo_Callback('CallbackPanel1','test');" />
<eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="200px" Width="100%">
<asp:Panel ID="Panel1" runat="server" Height="200px" with="500px" ScrollBars="Auto">
<asp:Table ID="Table1" runat="server">
</asp:Table>
</asp:Panel>
</eo:CallbackPanel>
</form>
</body>
</html>
Code: Visual Basic.NET
Protected Sub CallbackPanel1_Execute(ByVal sender As Object, ByVal e As EO.Web.CallbackEventArgs) Handles CallbackPanel1.Execute
Dim row As New TableRow
Dim cell As New TableCell
Dim cbp As New EO.Web.CallbackPanel
Dim txt As New TextBox
With txt
.ID = "txt1"
.Attributes.Add("onchange", "executeCallback(this, 'cbp1')")
.Width = New Unit(50, UnitType.Pixel)
End With
With cbp
.ID = "cbp1"
.Height = New Unit(100, UnitType.Percentage)
.Width = New Unit(100, UnitType.Percentage)
.ClientSideBeforeExecute = "before_execute"
.ClientSideAfterExecute = "after_update"
.ClientSideOnError = "clientside_error_handler"
.Controls.Add(txt)
End With
AddHandler cbp.Execute, AddressOf CallbackPanel_Execute
With cell
.ID = "cell1"
.Width = New Unit(55, UnitType.Pixel)
.Controls.Add(cbp)
End With
row.Cells.Add(cell)
cell = New TableCell
cbp = New EO.Web.CallbackPanel
txt = New TextBox
With txt
.ID = "txt2"
.Attributes.Add("onchange", "executeCallback(this, 'cbp2')")
.Width = New Unit(50, UnitType.Pixel)
End With
With cbp
.ID = "cbp2"
.Height = New Unit(100, UnitType.Percentage)
.Width = New Unit(100, UnitType.Percentage)
.ClientSideBeforeExecute = "before_execute"
.ClientSideAfterExecute = "after_update"
.ClientSideOnError = "clientside_error_handler"
.Controls.Add(txt)
End With
AddHandler cbp.Execute, AddressOf CallbackPanel_Execute
With cell
.ID = "cell2"
.Width = New Unit(55, UnitType.Pixel)
.Controls.Add(cbp)
End With
row.Cells.Add(cell)
Table1.Rows.Add(row)
End Sub
Private Sub CallbackPanel_Execute(ByVal sender As Object, ByVal e As EO.Web.CallbackEventArgs)
System.Diagnostics.Debug.Print(e.Parameter)
End Sub
|