[FIXED] [V0.6] Load UserControl with Tab + HtmlEditor dinamically

Page 2 of 3 FirstFirst 123 LastLast
  1. #11

    RE: [FIXED] Load UserControl with Tab + HtmlEditor dinamically



    Hi Geoffrey,

    Thanks for your reply.

    As I mentioned, I did try to put the Panel Collapsed to false, but as far as I can see there will be always an Visibility issue. Because the Panel itself is also inside a Tab which is not active at the first time.

    I tried all suggestions to make it HideMode="Offset", but that doesn't work as well.

    I rollback my version to 0.5.4 where most problems doesn't happens. I managed to make even the Editor works on version 5.4, but just on IE. On FF, the Editor appears like the image attachment I sent you before with the following message catch by Firebug:

    [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) 
    [nsIDOMNSHTMLdocument.designMode]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  
    location: "JS frame :: http://localhost/My-Project/WebResou...58655869900051 
    :: anonymous :: line 28447" data: no]
    
    
    http://localhost/My-Project/WebResou...58655869900051
    
    
    Line 28447
    
    Sys$CultureInfo$_getAbbrMonthIndex("")
    No, sorry, unfortunately I could not make a simplier sample, because on simple scenario that problems just doesn't happen. I wish I could remove UpdatePanels, because I don't like the way UpdatePanels do Ajax, but I have no simpliest solution to work with Ajax. Before I was using Anthem and your Coolite AjaxEvents are my hope to remove that UpdatePanels.

    What I was trying to explain you in my last post is that not even my pages were not been loaded because that 'Operation Aborted' problem. This problem is very critical and doesn't not happen on version 0.5.4.
    I'll try to make a simpler sample to reproduce this specific problem, but there are other issues preventing me to update to Coolite version 0.6.0.

    When I asked you about the Listener sintax, you told be both ways should work, but that is not true. The way I am doing at the moment with the version 0.5.4 is not valid for version 0.6.0. That is way I asked by a breaking changes documentation. It says that there is no Listener constructor with one argument. But don't worry about it, as long as the other way works, it is fine. I am just giving you feedback.

    Ok, I'll chat with you soon.
    Leo.
  2. #12

    RE: [FIXED] Load UserControl with Tab + HtmlEditor dinamically

    Hi Leo,

    If using the latest source from SVN, the following sample demonstrates three different ways to add a Click Listener. I reviewed the code sample you provided earlier and it should work. Give the following sample a try and let me know if you experience something different.

    Example

    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            // Option #1 - Create new Listener()
            this.Button1.Listeners.Click = new Listener("!{'Message', 'Button1_Click_1'}");
    
            // Option #2 - Set the .Handler property. 
            // The Listener object is created automatically when the .Handler property is set. 
            this.Button1.Listeners.Click.Handler = "!{'Message', 'Button1_Click_2'}";
        }
    </script>
    
    <ext:Button ID="Button1" runat="server" Text="Submit" AutoPostBack="false">
        <Listeners>
            <%--// Add the Listener via markup--%>
            <Click Handler="!{'Message', 'Button1_Click_3'}" />
        </Listeners>
    </ext:Button>
    NOTE: I demonstrate three options above, but obviously all three do exactly the same thing and the ones not being tested should be commented out.

    Hope this helps.

    Geoffrey McGill
    Founder
  3. #13

    RE: [FIXED] Load UserControl with Tab + HtmlEditor dinamically

    I've also been running many samples with the <ext:HtmlEditor> and it looks like several bugs were introduced with the ExtJS v2.2 release. I know there was some work done on the HtmlEditor to fix the FireFox/Safari rendering bugs, although those revisions may have created new problems.

    I'm working with the extjs team to document the defects and find possible work-arounds.

    For now (Coolite v0.6 + ExtJS 2.2) the old rule that the HtmlEditor must be visible on initial page load still applies. Currently this is just a limitation of the HtmlEditor.
    Geoffrey McGill
    Founder
  4. #14

    RE: [FIXED] Load UserControl with Tab + HtmlEditor dinamically



    Hi Geoffrey,

    Thanks for the listeners examples.
    Quick question still regarding Listeners:

    Considering Option #2 or #3, adding listeners through code-behind, how can I destroy/clear the old listeners before insert new ones.

    I've seen this post, using clearListeners() on client side. I am wondering how they can be cleared on code-behind c#.

    Thanks.

    PS: Using version 0.5.4.
  5. #15

    RE: [FIXED] Load UserControl with Tab + HtmlEditor dinamically

    Hi Leo,

    I apologize for the delay in getting back to you.

    Currently (0.5.x) setting the Listener to "null" will clear/reset the Listener.

    Example

    this.Button1.Listeners.Click = null;
    We're also working on a .Clear() Method that will be available on both the .Listeners property and on the individual Listener objects.

    The following code sample demonstrates how to clear all Listeners for the <ext:Button> control.

    Example

    this.Button1.Listeners.Clear();
    The following code sample demonstrates how to clear an individual Listener.

    Example

    this.Button1.Listeners.Click.Clear();
    The sample .Clear() Method has also been added to the AjaxEvents.

    The following code sample demonstrates clearing all AjaxEvents from an <ext:Button> control.

    Example

    this.Button1.AjaxEvents.Clear();
    The following code sample demonstates how to clear an individual AjaxEvent.

    Example

    this.Button1.AjaxEvents.Click.Clear();
    The .Clear() functionality is being tested right now, and will be available with the v0.6 release.

    Hope this helps.


    Geoffrey McGill
    Founder
  6. #16

    RE: [FIXED] Load UserControl with Tab + HtmlEditor dinamically

    Hi Leo,

    I just committed a revision to ext-all.js which might help with the hidden (non visible) <ext:HtmlEditor> rendering issues. I have not re-run your sample, but the revision did fix a couple other problems I found with the <ext:HtmlEditor>.

    I'm working right now on the <asp:UpdatePanel> support within the toolkit, which should also help with your samples.

    You *must* clear your browsers cache if you svn update and build with the latest code (Revision #303).


    Geoffrey McGill
    Founder
  7. #17

    RE: [FIXED] Load UserControl with Tab + HtmlEditor dinamically



    Hi Geoffrey,

    Thank you very much. That solved all my problems, including those 'Operation Aborted' not related to Editor and UpdatePanel.

    Well done. Really aprreciate all your effort to solve the problems.

    I am back to version 0.6.0.

    Best regards,
    Leo.
  8. #18

    RE: [FIXED] Load UserControl with Tab + HtmlEditor dinamically

    well, I wasn't expecting that, but I'll take it. :)

    Let me know if you find any other issues.*
    Geoffrey McGill
    Founder
  9. #19

    RE: [FIXED] [V0.6] Load UserControl with Tab + HtmlEditor dinamically



    Hi Geoffrey,

    Sorry to say we still have one of the issues with Editor.
    So much I wish had solve this annoying problem, that maybe I haven't tested it correctly.
    Anyway, now I am in trouble again, an urgent help would be very appreciated.

    It is a shame because all the rest of the Coolite/ExtJs Framework works like a charm, but the editor simply has so many problems.

    I managed to solve that 'Invalid Argument' problem by setting an width for the editor, although I got the AutoWidth property set to true. I played around with the properties, and the code I have so far is:

    <ext:Panel ID="Panel1" runat="server" Height="200" Title="Short Text" Border="false" BodyBorder="false" Frame="true">
    <Content>
     <ext:AnchorLayout ID="AnchorLayout1" runat="server">
      <ext:Anchor Horizontal="100%" Vertical="100%">
       <ext:HtmlEditor ID="HtmlEditor_ShortText" Height="285" Width="680" AutoWidth="true" runat="server" StyleSpec="width:98%;">
       </ext:HtmlEditor>
      </ext:Anchor>
     </ext:AnchorLayout>
    </Content>
    </ext:Panel>
    The main issue is that the internal editor frame is not setting its size correctly as you can see on the screenshots I am sending you.
    The text goes just to the half of the way and you can notice there if I paste a long text the scroolbar shows up at that position and the toolbar is no longer visible.

    Thanks for your help

    Leo.
  10. #20

    RE: [FIXED] [V0.6] Load UserControl with Tab + HtmlEditor dinamically



    Hi Geoffrey,

    I managed to solve the problem by getting the new release, referencing all again and removing AutoWidth and StyleSpec property. So, please, ignore my last thread, bu I do still need your help for the problem on FF that I mentioned here. Actually the code error is the same, but the message is slightly different:

    uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTML&#100;ocument.designMode]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: http://localhost/My-Project/WebResou...77670887436990 :: anonymous :: line 29525"  data: no]
    
    
    Line 0
    Again, it just happens on Firefox.

    Best regards.

    Leo.
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Load Usercontrol on DesktopModule
    By Kaveh in forum 2.x Help
    Replies: 6
    Last Post: Apr 28, 2012, 4:59 AM
  2. regarding usercontrol load in runtime
    By ranjit2k99 in forum 1.x Help
    Replies: 22
    Last Post: May 30, 2011, 1:38 PM
  3. load usercontrol in viewport
    By maxdiable in forum 1.x Help
    Replies: 1
    Last Post: Jul 28, 2010, 11:01 PM
  4. Load usercontrol by AjaxEvents
    By latif in forum 1.x Help
    Replies: 4
    Last Post: Dec 15, 2009, 3:22 PM
  5. Replies: 1
    Last Post: Aug 06, 2008, 1:23 PM

Posting Permissions