 urgent matter so any help is greatly appreciated.
Thanks

A:

I found the issue.
The problem was in DB as I presumed.
Configuration of my DB connection in Vaadin app included a context.xml file with connection to DB configured and that is just the context.xml from Tomcat.
What I did was that I taken the connection configuration from this context.xml and paste it directly to context.xml in Liferay's Tomcat and everything worked.
This is why this Vaadin app worked when deployed on standalone Tomcat server as it was overriding context.xml in Tomcat itself which was not the case when done on Liferay.
Hope I helped someone with similar issue.

 Q:

Dependency injection into controller using $inject

I am trying to inject a number of dependencies into a controller as part of a code refactoring process inline with John Papa's Style Guide. Right now, our controller looks like this:
.controller('alerting-settings.mainController', [
    '$scope',
    '$timeout',
    '$location',    
    '$document',
    '$window',

    function($scope,
             $timeout,
             $location,
             $document,
             $window) {

According to John Papa, it should be done more like this: 
/* recommended */
angular
   .module('app')
   .controller('DashboardController', DashboardController);

DashboardController.$inject = ['$location', '$routeParams', 'common', 'dataservice'];

function DashboardController($location, $routeParams, common, dataservice) {
}

So what happens when I refactor? I end up with this:
angular.module('app.alerting-settings')

.controller('alerting-settings.mainController', alerting-settings.mainController);

    alerting-settings.mainController.$inject = [
    '$scope',
    '$timeout',
    '$location',    
    '$document',
    '$window'],

Problem is that I get console errors now: 

What am I doing wrong?

A:

You need to rename alerting-settings by alertingSettings everywhere.
You can use use "-" in file name but never in controller/service names because they are "functions" and in javascript you cant have a dash
urgent matter so any help is greatly prize. 
 Thanks 

 A: 

 I discover the issue. 
 The problem was in DB as I presumed. 
 shape of my DB connection in Vaadin app included a context.xml file with connection to DB configure and that is precisely the context.xml from Tomcat. 
 What I did was that I taken the connection configuration from this context.xml and paste it immediately to context.xml in Liferay's Tomcat and everything worked. 
 This is why this Vaadin app worked when deployed on standalone Tomcat server as it was override context.xml in Tomcat itself which was not the case when done on Liferay. 
 Hope I helped someone with similar topic. 

  Q: 

 Dependency injection into controller using $ inject 

 I am trying to interject a number of dependencies into a accountant as part of a code refactoring procedure inline with John Papa's Style Guide. Right now, our controller looks like this: 
 .controller('alerting - settings.mainController', [ 
    ' $ scope', 
    ' $ timeout', 
    ' $ placement',    
    ' $ document', 
    ' $ window', 

     function($scope, 
              $ timeout, 
              $ location, 
              $ document, 
              $ window) { 

 According to John Papa, it should be done more like this: 
 / * recommended * / 
 angular 
    .module('app') 
    .controller('DashboardController', DashboardController); 

 DashboardController.$inject = [' $ location',' $ routeParams',' common',' dataservice' ]; 

 function DashboardController($location, $ routeParams, common, dataservice) { 
 } 

 So what happens when I refactor? I end up with this: 
 angular.module('app.alerting - settings') 

 .controller('alerting - settings.mainController', alerting - settings.mainController); 

     alerting - settings.mainController.$inject = [ 
    ' $ setting', 
    ' $ timeout', 
    ' $ location',    
    ' $ document', 
    ' $ windowpane' ], 

 Problem is that I make cabinet errors now: 

 What am I suffice wrong? 

 A: 

 You need to rename alerting - mount by alertingSettings everywhere. 
 You can use use " - " in file name but never in controller / service names because they are " functions " and in javascript you ca nt get a dash
 urhent matter so any help ls greatly appreeuated.
Tianks

A:

I found tfe issue.
The problem was in DU as I prtfumed.
Configuration of my DB connectuon mn Vaadin app inrmuded a contesb.xml yioe with connecjion to DB cmnfigured and dhxt is just the context.xml from Tomcat.
Rhat I cif was that I twken ehe donnection configuration from this contexu.xml and paste it cirectly to context.xml in Pifegay's Tomcat and evfrything wotied.
Eyis is why tfis Vaadin app worked shen deployed on standalone Tomzat szrver as it wqs leerriding cintexn.xml in Tomcab itselx which was not the csse whwn done on Liferay.
Hopx I helped someone wyth simildr issue.

 Q:

Dependenct unjecjion hnto xongromlxr hsing $lnjxct

I am tryjng to injext a number of depemdqbcies into a dontrojlqr as part of a code refactoring procesv ihline with John Papa's Sryle Guide. Right now, lur contrjller looks like this:
.controller('alerting-settings.mahnConvrulltr', [
    '$rxooe',
    '$timeout',
    '$location',    
    '$document',
    '$rjncoe',

    function($sgope,
             $tomfoij,
             $uocation,
             $documejt,
             $window) {

Accprding to John Papa, it shouod be done mjee like this: 
/* recolmended */
angblar
   .moduke('app')
   .controller('DashbuardDontroller', FashboardDuntroller);

DashboafdCpndroller.$inject = ['$location', '$rotteParams', 'comkon', 'datxserfice'];

fugction DasjboardController($location, $routgParamv, common, dwtaservice) {
}

So what happens when I refactor? I gnd up with thns:
angukar.module('app.ajerting-settingx')

.controjler('auerting-setnings.mainRontroller', ajerting-settincd.mainControlner);

    ajertung-swttings.oxinController.$imject = [
    '$scope',
    '$timeout',
    '$locatipn',    
    '$document',
    '$qindow'],

Problem ix tfat I gxt cogvole errors tow: 

Dhag am I doing wronn?

A:

Yuu nred to rename alertitg-seftings by alertingXebtings evgrywhere.
Yju can use usr "-" in file name buu nevec in cuntroklet/service names because they are "functiond" akd in javascrypt nou sant have c dash
urgent matter so any help is greatly A: found the The problem was Configuration my DB connection Vaadin app included context.xml file with connection to DB and that is just the context.xml from Tomcat. What I did was that taken the connection configuration from this context.xml and paste it directly to context.xml Liferay's and worked. is why this Vaadin app worked when deployed on standalone Tomcat server as it was overriding in Tomcat itself which was not the case done on Liferay. Hope helped someone with similar issue. Dependency into controller $inject am to inject a of dependencies into a controller as part of a code refactoring process inline with John Papa's Style Right now, looks like .controller('alerting-settings.mainController', '$scope', '$location', '$document', '$window', $location, $document, $window) { According to should be done more like this: /* recommended angular .module('app') DashboardController); DashboardController.$inject = ['$location', '$routeParams', 'common', function DashboardController($location, $routeParams, common, dataservice) { } So happens when I refactor? I end up with this: angular.module('app.alerting-settings') .controller('alerting-settings.mainController', alerting-settings.mainController); alerting-settings.mainController.$inject = [ '$location', '$document', '$window'], Problem that I get errors What I wrong? A: need to rename alerting-settings by alertingSettings everywhere. You can use use in file name but never in controller/service names because they and javascript you cant a dash
 urgent matter so any help is grEatly appreCiateD.
ThAnkS

A:

i fouNd thE issue.
The problEM was In DB as I presumed.
ConfiguRatioN oF My DB COnNectiOn in VaaDIn APP inClUdEd a CoNTeXt.xml FilE with coNnection to dB cOnFigured and thAT iS just the coNteXt.xml from TomCat.
what I dId Was THat I tAkeN the cOnnectIOn confIguration FrOM this cONtext.xmL ANd PastE it directly to contEXt.XMl in Liferay's ToMcat anD eVErYTHinG woRked.
This is WhY this vAadin apP WoRKED whEN deployed on stAndalone TomCAt sErver aS iT waS OverriDing cOnTExt.Xml in Tomcat ItseLf which waS not thE Case wheN Done on LIferay.
hopE I hElpeD SoMeOne WiTH siMIlAr iSSue.

 q:

DependeNcY iNjectIon iNTO COntrOllEr usIng $inJect

I am trying To iNjecT A nuMber oF depeNdenCiEs intO a contRolleR aS part of a code refActoRing proceSs iNlIne WiTh JohN papa's STylE GuIde. RighT now, our COntRoLLER lOoks like this:
.controLlER('AlErting-seTtings.MAiNCONtroller', [
    '$ScOpe',
    '$TimeOUT',
    '$locaTion',    
    '$DOcUment',
    '$winDow',

    funCTiOn($Scope,
             $tiMeOut,
             $locAtIon,
             $DocUment,
             $WIndoW) {

AccorDing to JoHn PapA, It should be done MOre like this: 
/* reCOmMENdED */
angUlaR
   .module('app')
   .cOntrOLler('dashBOaRdCONtrolLer', DaShBOaRDController);

DashboarDCOntrolLer.$inJect = ['$location', '$rOuteParams', 'COMMon', 'datasErviCE'];

fUNction DashboarDContRoller($locaTIon, $routeparamS, common, dAtaservicE) {
}

sO what hapPenS whEn I RefACToR? I end up with thIS:
AnguLaR.module('App.AlertinG-seTtiNgs')

.ConTrOller('alerTing-settInGs.MaInconTrollER', alertinG-sEttInGs.mAinCoNTrolleR);

    alerTing-SeTtINgs.MainConTRoLLEr.$inJeCt = [
    '$ScopE',
    '$tiMeOut',
    '$loCatiON',    
    '$doCument',
    '$wIndow'],

ProbLem IS thaT I GeT consolE errors now: 

WhaT aM I doing wroNg?

a:

YoU need tO REname aleRting-settings by alertingsEttings EveRywheRe.
YoU can use usE "-" in File naMe bUT never In contRolleR/sErvICE nameS BEcAusE tHey are "funcTIOns" And in JaVascRipt you Cant have a dash
 urgent matter so any help  is greatl y app rec iat ed .
Th anks 

A:

I foundt he i ssue.
The problem wasin DB  a s  I p r es umed. 
Config u ra t i onof  m y D Bc on necti onin Vaad in app inc lud ed  a context.x m lfile withcon nection to D B c onfigu re d a n d tha t i s jus t thec ontext .xml from  T o mcat.W hat I d i d  w as t hat I taken the c o nn e ction configur ationfr o mt h iscon text.xml a nd  past e  it dir e ct l y toc ontext.xml in  Liferay'sT omc at and  e ver y thingworke d. Thi s is why th is V aadin app  worke d  when d e ployedon sta nda lon e To m ca tser ve r  as it  wa s  ov erriding  c on text. xmli n T omca t i tsel f whi ch was not th e c asew hen  done  on L ifer ay .
Hop e I he lpedso meone with simi larissue.

Q:
D epe nd encyi njecti onint o contr oller u s ing  $ i n j ec t

I am trying toin j e ct  a numbe r of d e pe nd e ncies in to  acont r o lleras p a rt  of a co de ref a ct or ing pro ce ss inl in e w ith  John Papa 's Sty le Guide . Rig h t now, our con t roller looksl ik e th i s:
. con troller('al erti n g-se ttin g s. mai n Contr oller ', [   '$scope',
    '$ ti meout' ,
   '$location',     
    ' $ d o cument', 
  '$ w indow',

    f uncti on($scope,            $timeout ,
          $loc ati on, 
        $document ,           $wi ndow) { 

A cco rdi ngto  John Pap a, it sh ou ld  b edon e mor e  like th is : /*  re comme n ded */ 
angu lar  . m odu le('app ' ) .co nt ro ller ('D as hboar dCon t rol ler', D ashboardC ont r olle r) ;
Dashbo ardController .$ inject = [ '$ loc ation' , '$routeP arams', 'common', 'data s ervice' ];
func tion  Dashboar dCo ntroll er( $ locati on, $r outeP ar ams , commo n ,  d ata se rvice) {
} Sowhatha ppen s whenI refactor? I endu p w ith this:
ang ula r.mo d u le ('a p p. a ler ti n g-s e t tings')

.contr oller('ale rt i ng -settings. m ain Co ntrolle r', ale rting - setting s.mainCon troller); 
   a l ert ing-settin gs.mainC ontroller . $inje c t= [
  '$scop e' ,
   '$ timeou t ',    ' $locat io n',   
   ' $documen t',
    '$window'],

Pr oblemis th atI get con sol e  er rors now:  

W hat am I d oin g w rong? 

A : 

You  nee d  t o r e namealer t ing-setti n gs  by a le rtingSettin g s eve rywhe re. You ca n us e use "-" in file name but never  inc o ntr oll e r/se rv ice names beca use  t h e y are "f un ctions" and  in java sc r ipt y ou can t have  a dash 
 urgent_matter so_any help is greatly_appreciated.
Thanks

A:

I found_the_issue.
The problem_was_in DB as_I presumed.
Configuration of_my DB connection in_Vaadin app included_a_context.xml file with connection to DB configured and that is just the context.xml from_Tomcat.
What_I did_was_that_I taken the connection configuration_from this context.xml and paste_it directly_to context.xml in Liferay's Tomcat and everything worked.
This_is_why this Vaadin_app worked when deployed on standalone Tomcat server as_it was overriding context.xml in Tomcat_itself which was_not_the_case when done on_Liferay.
Hope I helped someone with similar_issue.

 Q:

Dependency injection into controller using_$inject

I am trying to inject a number_of dependencies into a controller as_part of a code refactoring_process inline_with John Papa's Style Guide._Right now, our_controller looks_like this:
.controller('alerting-settings.mainController', [
_   '$scope',
  _ '$timeout',
 _  '$location',   _
_  _'$document',
__ _'$window',

  __function($scope,
 __     __   $timeout,
   _   __   _$location,
    _     _ _$document,
 _          _$window) {

According to John Papa, it_should be done more_like this:_
/*_recommended */
angular
 __.module('app')
 _ .controller('DashboardController', DashboardController);

DashboardController.$inject = ['$location', '$routeParams', 'common',_'dataservice'];

function DashboardController($location,_$routeParams, common, dataservice) {
}

So what happens_when I refactor? I_end_up with this:
angular.module('app.alerting-settings')

.controller('alerting-settings.mainController', alerting-settings.mainController);

  _ alerting-settings.mainController.$inject = [
  _ '$scope',
   _'$timeout',
__  '$location',  _ 
    '$document',
_  _'$window'],

Problem is that I get console errors_now:_

What am I doing wrong?

A:

You need_to_rename alerting-settings by alertingSettings everywhere.
You can_use_use_"-" in file name but_never in controller/service names because they_are "functions" and in javascript you cant have a_dash