ItemTag validation (_tkn_18): Reference token (buttonXXX_ClientInit) was not found.

Page 2 of 2 FirstFirst 12
  1. #11
    I need urgent help.. Can anyone help me with this.. Is this a big issue that cannot be tracked?
    Last edited by AshwiniRane; Jun 24, 2014 at 9:08 AM.
  2. #12
    You have to post simple runable sample which reproduces the issue and doesn't require any changes from our side
    In this case, we will investigate it. Otherwise (without test sample) we cannot help you
  3. #13
    XmlDocument doc1 = new XmlDocument();
                FormPanelMenu.Show();
                MenuPanel menupnl1 = new MenuPanel();
                tree.Menu.ShowSeparator = false;
                string res = "";
                string dup = "";
               
                    doc1.Load(Server.MapPath("abc.xml"));
               
    
                foreach (XmlNode item in doc1.GetElementsByTagName("Parent"))
                {
                    if (!dup.Contains(item.Attributes["Text"].Value))
                    {
                        dup += item.Attributes["Text"].Value + ",";
    
                        Ext.Net.Button menu = new Ext.Net.Button();
                        menu.Text = item.Attributes["Text"].Value;
                        menu.ID = "btn" + item.Attributes["Text"].Value;
                       
                        Ext.Net.Parameter grantType = new Ext.Net.Parameter();
                        grantType.Name = "grant";
                        Ext.Net.Parameter grantType1 = new Ext.Net.Parameter();
                        if (item.HasChildNodes)
                        {
                            grantType.Value = item.ChildNodes[0].Attributes["ID"].Value;
                            grantType1.Value = item.ChildNodes[0].Attributes["href"].Value;
                        }
                        else
                        {
                            grantType.Value = item.Attributes["ID"].Value;
                            grantType1.Value = item.Attributes["href"].Value;
                        }
                        grantType1.Name = "granturl";
                        menu.DirectEvents.Click.ExtraParams.Add(grantType);
                        menu.DirectEvents.Click.ExtraParams.Add(grantType1);
                        menu.DirectEvents.Click.Event += Display_SubMenus;
    
                        if (item.Attributes["ID"].Value == Convert.ToString(Session["MainMenuID"]) && item.Attributes["ID"].Value != "1")
                        {
                            menu.Style.Add("background", "#416da3");
                            // menu.Cls = "my-style";
                        }
                        pnlmenu.Items.Add(menu);
    
                        if (item.HasChildNodes)
                        {
                            foreach (XmlNode c in item.ChildNodes)
                            {
                                if (item.Attributes["ID"].Value == Convert.ToString(Session["MainMenuID"]))
                                {
                                    try
                                    {
                                        tree.Title = c.Attributes["Text"].Value;
                                        Ext.Net.Menu mnu = new Ext.Net.Menu();
                                        //tt  tree.TitleCollapse = true;
                                        if (c.OuterXml.Contains("submenu"))
                                        {
                                            foreach (XmlNode item2 in c)
                                            {
                                                //Ext.Net.Button submm = new Ext.Net.Button();
                                                //submm.Text = item2.Attributes["Text"].Value;
                                                //submm.ID = "btn" + item2.Attributes["Text"].Value;
                                                Ext.Net.Parameter grantType11 = new Ext.Net.Parameter();
                                                grantType11.Value = item2.Attributes["href"].Value;
                                                grantType11.Name = "granturl";
                                                //submm.DirectEvents.Click.ExtraParams.Add(grantType11);
                                                //submm.DirectEvents.Click.Event += Get_Menu;
    
                                                ////submm.Listeners.Click.Fn = "Ext.net.DirectMethods.Get_Menu(" + grantType11 + ")";
    
                                                //if (item2.Attributes["ID"].Value == Convert.ToString(Session["SubMenuID"]))
                                                //{
                                                //    submm.Style.Add("background", "#416da3");
                                                //    // submm.Cls = "my-style";
                                                //}
    
                                                tree.Menu.Add(new Ext.Net.MenuItem(item2.Attributes["Text"].Value));
                                                tree.Menu.Listeners.Click.Handler = "alert(menuItem.text);";
                                                tree.Menu.DirectEvents.Click.ExtraParams.Add(grantType11);
                                                tree.Menu.DirectEvents.Click.Event += Get_Menu;
                                                //mnu.Add(submm);
                                            }
                                        }
                                        // tree.Menu.Add(mnu);
                                    }
                                    catch (Exception ex)
                                    {
                                        g.ErrorLog("Setup/AccessControl/btn_ok_Click", ex);
                                        Response.Redirect("../Error/Error.aspx");
                                    }
                                }
                               FormPanelMenu.Items.Add(tree);                           
                               FormPanelMenu.Render(EastPanel, RenderMode.Auto);
    
    
    
    
    
    
    
    
        protected void Get_Menu(object sender, DirectEventArgs e)
        {
            try
            {
                AssignRights ar = new AssignRights();
                string str = Request.Url.ToString();
                string rts = Session["rights"].ToString();
                ar.getRights(e.ExtraParams["granturl"].Trim(), rts);
              
                X.Redirect(e.ExtraParams["granturl"].Trim());
                //}
               
            }
            catch (Exception ex)
            {
            }
        }
    
        protected void Display_SubMenus(object sender, DirectEventArgs e)
        {
            try
            {
                AssignRights ar = new AssignRights();
                string str = Request.Url.ToString();
                string rts = Session["rights"].ToString();
                ar.getRights(e.ExtraParams["grant"].Trim(), rts);
                if (ar.view != null)
                {
                    Response.Redirect(e.ExtraParams["granturl"].Trim());
                    // Response.End();
                }
                else
                {
                    string[] arr = rts.Split(',');
                    string smid = e.ExtraParams["granturl"];
                    string ss = "";
                    //smid = smid.Remove(0, 3);
                    //smid = smid.Substring(0, smid.IndexOf("/"));
                    for (int i = 0; i < arr.Length - 1; i++)
                    {
                        string y = arr[i];
                        y = y.Remove(0, y.IndexOf(" "));
                        if (arr[i].Contains(smid))
                        {
                            ss = arr[i];
                            break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
    Last edited by Daniil; Jun 26, 2014 at 8:56 AM. Reason: Please use [CODE] tags
  4. #14
    I have submitted my code.. please check it and let me know the problem area to solve the error as soon as possible..
  5. #15
    It is not test sample, it is just a code somewhere and somehow is used
    We need test sample which we can copy/paste and run
  6. #16

    test sample to be used as abc.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <Menu>
      <Parent ID="2" Text="A" />
      <Parent ID="3" Text="B">
        <submenu Text="C" >
          <submenumenu Text="D"/>
        </submenu>
      </Parent>
      <Parent ID="4" Text="E" >
        <submenu Text="F">
          <submenumenu Text="G" />
        </submenu>
        <submenu Text="H">
          <submenumenu Text="I"/>
        </submenu>
      </Parent>
    </Menu>
    Last edited by Daniil; Jun 26, 2014 at 8:56 AM. Reason: Please use [CODE] tags
  7. #17
    this xml is used to generate a menupanel with accordion layout.
  8. #18
    Please review the following Guidelines before posting in the forums, especially the sections about posting a code sample.

    http://forums.ext.net/showthread.php...ing-New-Topics

    http://forums.ext.net/showthread.php...ation-Required
    Geoffrey McGill
    Founder
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 4
    Last Post: Dec 13, 2013, 7:49 PM
  2. Replies: 13
    Last Post: Nov 22, 2013, 10:30 AM
  3. [CLOSED] Reference token (ext.net.initscriptfiles) was not found.
    By jesperhp in forum 2.x Legacy Premium Help
    Replies: 14
    Last Post: Oct 08, 2013, 10:24 AM
  4. Replies: 5
    Last Post: Jun 11, 2013, 7:46 AM
  5. Replies: 3
    Last Post: Jul 11, 2011, 9:43 AM

Posting Permissions