[CLOSED] Migrating to 2: Javascript code issues

  1. #1

    [CLOSED] Migrating to 2: Javascript code issues

    Hi,

    I'm getting a lot of issues in the code I'm trying to migrate to ext.net 2 with reference errors caused by namespace issues. For example, I have a menu that contains this click handler:

          <ext:MenuItem Text="Edit Site" Icon="BuildingEdit">
            <Listeners>
              <Click Handler="var win = SiteDetailsWindow; win.autoLoad.params.id = #{TreePanel1}.menuNode.actualId; win.show();" />
            </Listeners>
          </ext:MenuItem>
    I've changed the Resourcemanager to this:

          <ext:ResourceManager ID="ResourceManager1" runat="server" IDMode="Explicit" NameSpace=""/>
    But when I run, I get a JS error - Uncaught ReferenceError: MainContent_MainPanel_TreePanel1 is not defined. That JS error is when the page loads - it stops the UI from rendering.

    Is this related to where I am adding the click hander code, or is there something else I need to do with ext.net 2?

    Thanks
    Last edited by Daniil; May 28, 2012 at 5:54 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please post test case
  3. #3
    Quote Originally Posted by Vladimir View Post
    Hi,

    Please post test case
    I'll try to get one together for you - it happens in a lot of places so I was wondering if there was a general rule change about referencing Ext.net components in javascript..
  4. #4
    Well, empty value for Namespace should be enough to prevent any namespace
    If you have issue with empty namespace then please post a sample
  5. #5
    By the way, did you set up empty namespace on the same page where TreePanel
    If you set emptynamespace in web.config then is the issue still persisted?

Similar Threads

  1. [CLOSED] Migrating to 2: PartialViewResult
    By PhilG in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: May 21, 2012, 9:27 AM
  2. [CLOSED] Migrating a MVC App from v1 to v2
    By RCN in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 10, 2012, 7:05 PM
  3. Security issues with javascript console
    By dimitar in forum 1.x Help
    Replies: 2
    Last Post: Dec 17, 2010, 11:10 AM
  4. [CLOSED] [1.0] Render Portal Code behind Mask Issues
    By ljankowski in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 10, 2010, 11:18 AM
  5. Replies: 11
    Last Post: Oct 23, 2008, 8:45 AM

Posting Permissions