Checking TabPanel Items In Server - Side (Example)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Checking TabPanel Items In Server - Side (Example)

    Hi Guys

    I was asked that question

    This trick,related above my question.

    How to check TabPanelItems in server-side. ?

    I have tried in server-side methods.

    Method 1 (not worked)
    TabPanel tabPanel = X.GetCmp<TabPanel>("tabContainer");
    if  (tabPanel.FindControl("tab1") != null) // always working  
    {
      //to do
    }
    Method 2 (not worked)
    TabPanel tabPanel = X.GetCmp<TabPanel>("tabContainer");
    Panel tab1= X.GetCmp<Panel>("tab1"); // always working...
    if (tab1!=null)
    {
      // to do 
    }

    Working Method.

    treePanel.DirectEvents.ItemClick.Before = "o.extraParams.param1 = record.data.id; o.extraParams.param2 = record.data.text; var tagId = record.raw['tag']; o.extraParams.param3 = tagId; var tab = App.tabContainer.getComponent('Id'+tagId); var result = false; if (tab) { result = true; } else { result = false; } o.extraParams.tabIsExist=result; ";

    public class MenuController : Controller
    {
       public ActionResult TreePanelClickHandler(string param1,string param2,string param3,bool tabIsExist)
       {
          if (tabIsExist)
          {
    	    // todo
           }
          X.Msg.Alert("server-side:", param1 + "\n" + param2+ "\n" + param3).Show();
          AjaxResult r = new AjaxResult();
          return r;
       }
    }
    Last edited by ismailkocacan; Aug 12, 2015 at 8:42 AM.

Similar Threads

  1. Replies: 7
    Last Post: Oct 05, 2012, 1:49 PM
  2. Server-side TabPanel creation
    By jmroyb in forum 1.x Help
    Replies: 1
    Last Post: Dec 29, 2010, 6:43 PM
  3. Replies: 1
    Last Post: Dec 01, 2010, 5:14 PM
  4. Replies: 1
    Last Post: Jul 21, 2010, 9:11 PM
  5. How to get items in Multiselect in Server side
    By Nagaraj K Hebbar in forum 1.x Help
    Replies: 2
    Last Post: Sep 25, 2009, 3:30 AM

Tags for this Thread

Posting Permissions