Yangman - make elements accessible via ids - part1
[dlux.git] / modules / yangman-resources / src / main / resources / yangman / controllers / yang-form.controller.js
index f312608fbbd043d6b9d41c27ca7cfaf212b3da44..7a82ef855eb0dd1db8d3e9fe73818bda90911263 100644 (file)
@@ -28,15 +28,23 @@ define([
 
         yangForm.viewPath = $scope.globalViewPath + 'rightpanel/form';
         yangForm.errorMsg = '';
+        yangForm.inputIndex = 0;
         $scope.constants = constants;
 
-        // methods
+
         yangForm.getNodeName = getNodeName;
 
-        // watchers
-        $scope.$on(constants.YANGMAN_SET_ERROR_DATA, setRcvdErrorData);
+        init();
+
+
+
+
+        function init() {
+            $scope.$on(constants.YANGMAN_SET_ERROR_DATA, setRcvdErrorData);
+            $scope.$on(constants.YANGMAN_SET_ERROR_MESSAGE, setErrorMessage);
+        }
+
 
-        $scope.$on(constants.YANGMAN_SET_ERROR_MESSAGE, setErrorMessage);
 
         /**
          * Method for set error message in form