 the problem. You don't need backslashes to escape the apostrophe in string literals. Simply use "servername='Laks'". You escape quotes (") in string literals and apostrophes (') in character literals, but not vice versa.
You also need to add the semicolon (;) at the end of the query string: "whatever sql statement text;".

 Q:

Run same code in each tab in extjs

I wish to have the same form panel in each tab of the tabbed pannel. Is there a way that the same code is run for each tab without having to copy the code in the items list since that would be redundant. 

A:

Here is one way to do it - 
You'll normally define a tabpanel and you give multiple panels as an array of items. For each of the panel inside the item, give the same panel container that you define below as the item. 
{
    xtype: 'tabpanel',
    itemId:'myTabPanel',
    activeTab: 0,
    plain: true,
    items: [{
        xtype: 'panel',
        itemId: 'tab1',
        layout: 'fit',
        title: 'Strategies',
        items: [{
            xtype:'myTabContainer'
        }],
        tabConfig: {
            xtype: 'tab',
            closable: false
        }
    }, {
        xtype: 'panel',
        itemId: 'tab2',
        layout: 'fit',
        title: 'Action Sets',
        items: [{
            xtype:'myTabContainer'
        }]
    }],
    listeners: {
        tabchange: 'tabChangeListener' // define this and handle the actions for your tab change event
    }
}

And here is a sample definition of the container/content for the tab. You can note that I'm using the alias for this container "myTabContainer" as xtype in each of the tabs above. This will make sure that the same view is linked to both the tabs.
Ext.define('MyTabContainer', {
            extend: 'Ext.panel.Panel',
            alias: 'widget.myTabContainer',

            requires: [
                // give all required classes
            
the problem. You don't need backslashes to escape the apostrophe in string misprint. plainly use " servername='Laks' ". You escape quotation mark (") in drawstring literals and apostrophes (') in quality misprint, but not vice versa. 
 You also need to add the semicolon (;) at the end of the query chain: " whatever sql statement text; ". 

  Q: 

 tend same code in each tab in extjs 

 I wish to have the same form jury in each tab of the tabbed pannel. Is there a way that the same code is range for each tab without having to copy the code in the items tilt since that would be redundant. 

 adenine: 

 Here is one way to do it - 
 You'll normally define a tabpanel and you hold multiple panels as an array of items. For each of the panel inside the item, give the like jury container that you define below as the item. 
 { 
     xtype:' tabpanel', 
     itemId:'myTabPanel', 
     activeTab: 0, 
     plain: true, 
     items: [ { 
         xtype:' panel', 
         itemId:' tab1', 
         layout:' fit', 
         title:' Strategies', 
         item: [ { 
             xtype:'myTabContainer' 
         } ], 
         tabConfig: { 
             xtype:' tab', 
             closable: false 
         } 
     }, { 
         xtype:' panel', 
         itemId:' tab2', 
         layout:' fit', 
         claim:' Action Sets', 
         items: [ { 
             xtype:'myTabContainer' 
         } ] 
     } ], 
     listeners: { 
         tabchange:' tabChangeListener' // specify this and handle the actions for your tab change consequence 
     } 
 } 

 And here is a sample definition of the container / content for the tab. You cannote that I'm using the alias for this container " myTabContainer " as xtype in each of the tabs above. This will make sure that the same view is linked to both the tabs. 
 Ext.define('MyTabContainer', { 
             strain:' Ext.panel. jury', 
             alias:' widget.myTabContainer', 

             requires: [ 
                 // give all required classes
 thf problem. You don't need nackslashes to escape tie aposfrophe iv string literals. Simply use "swrverbame='Laks'". You escape quutes (") in dtring luterels and apostropiss (') in gkaracfcr licecals, but not vige versa.
You also need to dda che semicolon (;) at the end of the quewy strimg: "whatever sql ftattmegt tsqt;".

 Q:

Run same code in each tab ih extjs

P wish to have thr same form panel in each hab lf the tabbed pannfl. Is there a wwt that the sxme code is run for eadh tab without having to copy tfe cobe in the ijzns phst since tiat wolld be redundant. 

A:

Hera is onr way to do it - 
Ymu'lo normally define a tebpanel and you give multiple pcnels as an array of utwms. Fmr edch ud tfe kanxl jnside thx item, give the same pqnel container that yjl define belos as tre item. 
{
    xtype: 'tabpanel',
    itemId:'myTabKanel',
    activeTab: 0,
    plain: true,
    items: [{
        xtype: 'pwnel',
        itemId: 'tab1',
        layout: 'fit',
        thtle: 'Agrauenles',
        items: [{
            xtype:'myTabContainer'
        }],
        tabConflg: {
            xtyle: 'tsf',
            zlosable: ralse
        }
    }, {
        xtypw: 'panel',
        itemId: 'tab2',
        layout: 'dit',
        tptle: 'Action Sets',
        items: [{
            ctype:'myTabContainer'
        }]
    }],
    lisheners: {
        tabchange: 'txbCmanceListentf' // define this anq handle vhe aetions fur ypur taf change egent
    }
}

And here is a salple befinhtion of tje container/content for the tab. You can note jhad I'k using che allas for this cogtainer "myTabCpntainex" as xgype in eabh of the tabs above. This will mang sure that tie same vyew us lunked tu both the tabs.
Rxt.define('MyTabContauner', {
            ewtend: 'Sxt.panel.Panel',
            alias: 'wicgeg.myEahCpnediner',

            rediires: [
                // give all required wlasaes
            
the problem. You don't need backslashes to apostrophe string literals. use "servername='Laks'". You literals apostrophes (') in literals, but not versa. You also need to add semicolon (;) at the end of the query string: "whatever sql statement text;". Run same code in each tab in extjs I wish to have the form in tab the tabbed pannel. Is there a way that the same code is run for each tab having to copy the code in the items since that would be A: Here is one way do - You'll define tabpanel you give multiple as an array of items. For each of the panel inside the item, give the same panel that you as the { 'tabpanel', activeTab: 0, plain: [{ xtype: 'panel', itemId: 'tab1', layout: items: [{ xtype:'myTabContainer' }], tabConfig: { xtype: 'tab', false } { xtype: 'panel', itemId: 'tab2', layout: title: 'Action Sets', items: [{ xtype:'myTabContainer' }] }], { tabchange: 'tabChangeListener' // define this and handle the actions for your tab change event And here is a definition of the for tab. can that I'm the alias for this container "myTabContainer" as xtype in each of tabs above. This will make sure that the same view to the tabs. Ext.define('MyTabContainer', extend: 'Ext.panel.Panel', alias: 'widget.myTabContainer', [ give all required classes
 the problem. You don't need backSlashes to eScape The ApoStRophE in sTring literals. SIMply Use "servername='Laks'". You esCape qUoTEs (") in STrIng liTerals aND aPOStrOpHeS (') in ChARaCter lIteRals, but Not vice verSa.
YOu Also need to adD ThE semicolon (;) At tHe end of the quEry String: "WhAteVEr sql StaTemenT text;".

 Q:

rUn same Code in eacH tAB in extJS

I wish tO HAvE the Same form panel in eaCH tAB of the tabbed paNnel. Is ThERe A WAy tHat The same codE iS run fOR each taB WiTHOUt hAVing to copy the Code in the itEMs lIst sinCe ThaT Would bE reduNdANt. 

A:

here is one waY to dO it - 
You'll nOrmallY Define a TAbpanel And you GivE muLtipLE pAnEls As AN arRAy Of iTEms. for each oF tHe Panel InsiDE THE iteM, giVe thE same Panel containeR thAt yoU DefIne beLow as The iTeM. 
{
    xtypE: 'tabpaNel',
    itEmid:'myTabPanel',
    actIveTAb: 0,
    plain: trUe,
    iTeMs: [{
        xTyPe: 'panEL',
        itemID: 'taB1',
        laYout: 'fit',
        Title: 'StRAteGiES',
        ITeMs: [{
            xtype:'myTabContaiNeR'
        }],
        TAbconfig: {
            xtYpe: 'tab',
            CLoSaBLe: false
        }
    }, {
        xTyPe: 'pAnel',
        ITEmId: 'tAb2',
        laYOuT: 'fit',
        titlE: 'ActioN seTs',
        Items: [{
            xtYpE:'myTabcoNtaIneR'
        }]
    }],
    listENers: {
        TabchaNge: 'tabChAngeLIStener' // define thIS and handle the ACtIONs FOr yoUr tAb change eveNt
    }
}

AnD Here Is a sAMpLe dEFinitIon of ThE CoNTainer/content for the TaB. You caN note That I'm using thE alias for tHIS ContaineR "myTABCONtainer" as xtype In eacH of the tabs ABove. This Will mAke sure tHat the samE VIew is linKed To bOth The TABs.
ext.define('MyTaBcOntaInEr', {
            extenD: 'ExT.panel.PAneL',
            alIas: 'WidGeT.myTabConTainer',

            reQuIrEs: [
                // GiVe aLl reqUIred clasSeS
            
 the problem. You don't ne ed backsla shestoesc ap e th e ap ostrophe in st r ingliterals. Simply use " serve rn a me=' L ak s'".You esc a pe q uot es  ( ")in st ringlit erals a nd apostro phe s(') in chara c te r literals , b ut not vicever sa.
Yo uals o  need  to  addthe se m icolon  (;) at t he end of the que r y  s trin g: "whatever sqls ta t ement text;".
 Q:
Ru n  s a m e c ode  in each t ab  in e x tjs

Iw is h t o h a ve the same f orm panel i n  ea ch tab  o f t h e tabb ed pa nn e l.Is there awaythat thesame c o de is r u n for e ach ta b w ith outh av in g t oc opy th e c o dein the i te ms  list  sin c e t hatwou ld b e red undant. 

A:
He re i s  on e way  to d o it  -  
You 'll no rmall ydefine a tabpan el a nd you gi vemu lti pl e pan e ls asanarr ay of i tems. F o r e ac h o fthe panel inside t he i te m, givethe sa m epa n el conta in erthat y ou de fine be low as t he ite m .
{ 
    xt yp e: 'ta bp ane l', 
   i temI d:'myT abPanel' ,
  activeTab: 0,   plain: tru e , i tems : [ {
        x type :  'pa nel' , 
     it emId:  ' t ab 1 ',
        layout:'f it',
      title: 'Str ategies',     ite ms:[ {           xty pe:'m yTabContai n er'
       } ],
       tabCon f i g: {
        xty p e :'tab',
        cl osable:  fa lse
      } 
   } ,{
       xtype:'p an el ', 
     itemId:'t ab2 ', 
     layout : 'fi t',    title:' Ac t i on S et s' ,
     item s: [ { 
          xtype: 'my T abCo nt ai ner'
       }]
   }] ,
    list en ers : {
     tabc hange: 'tabChangeListen e r' // d efi ne th is a nd handle  th e acti ons for yo ur tab  chan ge  ev e n t
  } 
} 

A nd  here is a s amp le de fi niti on of t he container/conte n t f or the tab. Y oucann o te  th a tI 'mus i ngt h e alias for thi s containe r" my TabContain e r"as  xtypein each  of t h e tabsabove. Th is will m ak e su r e  th at the sam e view i s linkedt o bot h  t he ta bs. 
Ext.d ef ine ('MyT abCont a ine r', { 
          e xtend :'Ext.pan el.Panel',
           alias:  'wid get .myTabCon tai n er' ,

          requires : [ 
           // g i ve  al l  requ ired classes
     
 the_problem. You_don't need backslashes to_escape the_apostrophe_in string_literals._Simply use "servername='Laks'"._You escape quotes_(") in string literals_and apostrophes (')_in_character literals, but not vice versa.
You also need to add the semicolon (;) at_the_end of_the_query_string: "whatever sql statement text;".

_Q:

Run same code in each_tab in_extjs

I wish to have the same form panel_in_each tab of_the tabbed pannel. Is there a way that the_same code is run for each_tab without having_to_copy_the code in the_items list since that would be_redundant. 

A:

Here is one way to_do it - 
You'll normally define a_tabpanel and you give multiple panels_as an array of items._For each_of the panel inside the_item, give the_same panel_container that you_define below as the item. 
{
_  _xtype: 'tabpanel',
    itemId:'myTabPanel',
__  activeTab:_0,
__ _plain: true,
 __ items:_[{
_     __xtype: 'panel',
     _  itemId: 'tab1',
__   _  layout: 'fit',
 _     _title: 'Strategies',
_ _     items: [{
    _     _ xtype:'myTabContainer'
  _ __  }],
__ _    tabConfig: {
 _ _     _  xtype: 'tab',
__     _    closable: false
_    ___}
    },_{
     _  xtype:_'panel',
      __itemId: 'tab2',
    __  layout: 'fit',
  ___   title: 'Action_Sets',
     _  items: [{
     _  _   xtype:'myTabContainer'
 ___    }]
    }],
 _ _listeners: {
 _      tabchange: 'tabChangeListener' // define_this and handle the actions for your_tab change event
    }
}

And here is a sample_definition of the container/content for the tab. You_can note that I'm using the alias_for this container "myTabContainer"_as_xtype in each of the tabs above._This_will_make_sure that the_same view is_linked to both_the tabs.
Ext.define('MyTabContainer',_{
  _ _  __   extend: 'Ext.panel.Panel',
            alias: 'widget.myTabContainer',

_     _    _requires:_[
  _   _       _ // give all required classes
   __ _   _ 