[FIXED] HTML Editor inside an update panel?
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
[FIXED] HTML Editor inside an update panel?
Subscribe
Last Login: 3/8/2008 12:37:32 PM
Posts: 1,
Posted 2/29/2008 3:16:34 PM

Group: Coolite Early Adopter
Hello guys,
I was playing with the coolite controls today and really enjoyed it. However, just found a strange behavious of the HtmlEditor placed on an update panel.

Please try the following code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="Admin_test" %>
<%@ Register assembly="Coolite.Web.UI" namespace="Coolite.Web.UI" tagprefix="cool" %>
<!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>HTML Editor Test</title>
</head>
<body>
<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager2" runat="server">
        </asp:ScriptManager>
    <cool:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
        <asp:Button ID="Button1" runat="server" Text="Update HTML Editor"
            onclick="Button1_Click" />
    </div>
    <div style="border:2px solid #c90000; padding:20px; margin:20px;">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
            <ContentTemplate>
                <cool:HtmlEditor ID="HtmlEditor1" runat="server" />
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    <div>
        <asp:Button ID="Button2" runat="server" Text="Update the 2nd panel"
            onclick="Button2_Click" />
    </div>
    <div style="border:2px solid #c90000; padding:20px; margin:20px;">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Label ID="Label1" runat="server"></asp:Label>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
</form>
</body>
</html>


And the code behind is quite simple:

public partial class Admin_test : System.Web.UI.Page
{
    protected void Button1_Click(object sender, EventArgs e)
    {
        HtmlEditor1.Text += "Updated! ";
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Label1.Text += "Label updated! ";
    }
}


When you click on Button1, the HtmlEditor is bein updated as expected. However, when you click on Buttton2, it seems that another instance on the HtmlEditor is being created inside UpdatePanel1. And that is for every Button2 click. Weird...
 
Or, I'm doing something wrong?

Regards,
Julian
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 2/29/2008 4:21:49 PM

Group: Core Development Team
Hi Julian,

Thanks for the sample. I'll test this out and let you know what's going wrong. We're expecting to release version 0.4 on Tuesday, so if a fix is necessary, I'll do my best to squeeze it into 0.4.
--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 3/14/2008 7:01:24 PM

Group: Core Development Team

I apologize for the delay in getting back to you regarding this issue.

I have reproduced the bug, but do not have a fix (yet). I have an idea why this is happening, although a solution is going to involve some re-plumbing inside the Assembly. I will do my best to keep this thread updated with our progress.

--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 6/15/2008 6:41:57 AM

Group: Core Development Team
This bug has been fixed with the latest release. Please download from the following location.

http://www.coolite.com/download/

Hope this helps.
--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 10:17pm