Došlo je do pogreške prilikom obrade predloška.
The following has evaluated to null or missing:
==> serviceLocator.findService("hr.combis.hnb.portal.liquidity.service.LiquidityLocalService")  [in template "20155#20195#2044551" at line 25, column 36]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign liquidityLocalService = servi...  [in template "20155#20195#2044551" at line 25, column 3]
----
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
2<#assign articleId = .vars['reserved-article-id'].data /> 
3<#assign article = journalArticleLocalService.getArticle(groupId, articleId)> 
4 
5<#if article.getAvailableLanguageIds()?seq_contains(locale) > 
6 
7<#assign portletDisplay = requestMap['theme-display']['portlet-display'] /> 
8<#assign portalUrl = requestMap['theme-display']['portal-url'] /> 
9<#assign scheme = requestMap['scheme'] /> 
10<#assign title = .vars['reserved-article-title'].data /> 
11<#assign liquidity = "{}"/> 
12<#assign count = 0/> 
13<#assign liquidityList = "{}"/> 
14<#if serviceName?has_content && serviceName.getData() == "likvidnost:trenutna"> 
15  <#assign liquidityLocalService = serviceLocator.findService("hr.combis.hnb.portal.liquidity.service.LiquidityLocalService")> 
16    <#assign liquidity = liquidityLocalService.getLastJSON() /> 
17 
18    <script> 
19      var LiquidityDateRangePickerComponent = {}; 
20      var PaginationComponent = {}; 
21    </script> 
22 
23</#if> 
24<#if serviceName?has_content && serviceName.getData() == "likvidnost:arhiva"> 
25  <#assign liquidityLocalService = serviceLocator.findService("hr.combis.hnb.portal.liquidity.service.LiquidityLocalService")> 
26    <#assign count = liquidityLocalService.countAll()!0 /> 
27    <#assign liquidityList = liquidityLocalService.findAllJSON(0,30)/> 
28    <link href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" rel="stylesheet"> 
29    <script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> 
30 
31    <#if locale == "hr_HR"> 
32         <script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.9.2/i18n/jquery.ui.datepicker-hr.min.js"></script> 
33    </#if> 
34 
35    <script type="text/x-template" id="liquidity-daterangepicker"> 
36        <div> 
37            <input type="text" ref="liquidityinputFrom" style="display: none" > 
38            <span v-if="endDatepickerCreated"> - </span><input type="text" ref="liquidityinputTo" style="display: none" > 
39            <i v-if="showCancel" v-on:click="cancel" class="fa fa-times"></i> 
40        </div> 
41    </script> 
42 
43    <script type="text/x-template" id="pagination"> 
44         <div class="lfr-pagination"> 
45            <div class="pull-left smallest-font pad-t-4"> {{showingText}} {{firstItem}} - {{lastItem}} {{ofText}} {{total}}.</div> 
46            <ul v-if="pageSize < total" class="pager lfr-pagination-buttons margo-0 pull-right smallest-font"> 
47                <li v-bind:class="{'disabled': inProgress | firstItem <= 1}"> <a href="#" @click.prevent="first()">{{firstText}}</a> </li> 
48                <li v-bind:class="{'disabled': inProgress | (firstItem - pageSize) < 1}"> <a href="#" @click.prevent="previous()"> <i class="fa fa-angle-left"></i> {{previousText}}</a> </li> 
49                <li class="lfr-pages disabled"> {{Math.ceil(lastItem/pageSize)}} / {{Math.ceil(total/pageSize)}}  </li> 
50                <li v-bind:class="{'disabled': inProgress | lastItem >= total}"> <a href="#" @click.prevent="next()">{{nextText}} <i class="fa fa-angle-right"></i> </a> </li> 
51                <li v-bind:class="{'disabled': inProgress | lastItem >= total}"> <a href="#" @click.prevent="last()">{{lastText}}</a> </li> 
52            </ul> 
53        </div> 
54    </script> 
55 
56    <script> 
57 
58    var jq = jQuery.noConflict(); 
59 
60    var LiquidityDateRangePickerComponent = { 
61        template: '#liquidity-daterangepicker', 
62        props: ['textStart', 'textEnd'], 
63        data: function () { 
64            return { 
65              showCancel: false, 
66              endDatepickerCreated: false, 
67              dateformat: "dd.mm.yy." 
68
69        }, 
70        methods: { 
71            showEndDatepicker : function(datepickerStartDateText) { 
72                var self = this; 
73                if(!this.endDatepickerCreated){ 
74                    jq(this.$refs.liquidityinputTo).datepicker({ 
75                        showOn: "button", 
76                        buttonText: this.textEnd, 
77                        dateFormat: self.dateformat, 
78                        maxDate: 0, 
79                        changeMonth: true, 
80                        onSelect: function(datepickerEndDateText){ 
81                            jq(self.$refs.liquidityinputTo).datepicker( "option", "buttonText", datepickerEndDateText); 
82                            jq(self.$refs.liquidityinputFrom).datepicker( "option", "maxDate", jq.datepicker.parseDate( self.dateformat, datepickerEndDateText )); 
83                            self.getLiquidityByDateRange(); 
84
85                    }); 
86                    this.endDatepickerCreated = true; 
87                } else { 
88                    self.getLiquidityByDateRange(); 
89
90                jq(this.$refs.liquidityinputFrom).datepicker( "option", "buttonText", datepickerStartDateText); 
91                jq(this.$refs.liquidityinputTo).datepicker( "option", "minDate", jq.datepicker.parseDate( self.dateformat, datepickerStartDateText )); 
92            }, 
93            getLiquidityByDateRange : function(){ 
94                this.showCancel = true; 
95                var startDate = jq(this.$refs.liquidityinputFrom).datepicker('getDate'); 
96                var endDate = jq(this.$refs.liquidityinputTo).datepicker('getDate'); 
97                if(startDate && endDate){ 
98                    startDate = startDate.getFullYear() + "-" + (startDate.getMonth()+1) + "-" + startDate.getDate(); 
99                    endDate = endDate.getFullYear() + "-" + (endDate.getMonth()+1) + "-" + endDate.getDate(); 
100                    this.$root.$emit("getByDateRange", startDate, endDate); 
101
102            }, 
103            cancel : function() { 
104                jq(this.$refs.liquidityinputFrom).datepicker( "option", "buttonText", this.textStart); 
105                jq(this.$refs.liquidityinputFrom).datepicker( "option", "maxDate", 0); 
106                this.showCancel = false; 
107                jq(this.$refs.liquidityinputTo).datepicker( "destroy" ); 
108                this.endDatepickerCreated = false; 
109                this.$root.$emit("initPagination"); 
110                //this.$root.liquidityByDate={}; 
111            }, 
112            getLiquidityByDate : function(dateString){ 
113                var self = this; 
114                jq(this.$refs.liquidityinput).datepicker( "option", "buttonText", dateString); 
115                this.showCancel = true; 
116                var serviceUrl = "${scheme}://${portalUrl}/api/jsonws/liquidity.liquidity/get-one-by-date/date/"; 
117                var url = serviceUrl + date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate(); 
118                jq.get( url, function( response ) { 
119                    if(Object.keys(response).length > 0){ 
120                        self.$root.liquidityByDate=response; 
121                    }else{ 
122                        self.$root.liquidityByDate={}; 
123
124                }); 
125
126 
127        }, 
128        mounted: function() { 
129            var self = this; 
130            this.originalText = this.text; 
131            jq(this.$refs.liquidityinputFrom).datepicker({ 
132                showOn: "button", 
133                buttonText: this.textStart, 
134                dateFormat: self.dateformat, 
135                maxDate: 0, 
136                changeMonth: true, 
137                onSelect: function(dateText){ 
138                    self.showEndDatepicker(dateText); 
139
140            }); 
141        }, 
142
143 
144    var PaginationComponent = { 
145        template: '#pagination', 
146        props: ['showingText', 'ofText', 'firstText', 'previousText', 'nextText', 'lastText'], 
147        data: function () { 
148            return { 
149              pageSize: 30, 
150              total: ${count}, 
151              firstItem : 1, 
152              lastItem : this.$root.liquidityList.length, 
153              inProgress : false, 
154              startDate: null, 
155              endDate: null 
156
157        }, 
158        methods: { 
159          callService : function(start, end){ 
160                var serviceUrl = "${scheme}://${portalUrl}/api/jsonws/liquidity.liquidity/get-by-date-range?"; 
161                // /find-by-date-range/start-date/2017-05-12/end-date/2017-05-19/start/0/end/2 
162                serviceUrl += "start=" + start + "&end=" + end; 
163                if(this.startDate && this.endDate){ 
164                  serviceUrl += "&startDate=" + this.startDate + "&endDate=" + this.endDate; 
165                } else { 
166                  serviceUrl += "&-startDate&-endDate"; 
167
168 
169                this.inProgress = true; 
170                this.$root.fadeInTableData = false; 
171                var self = this; 
172                jq.get(serviceUrl, function( response ) { 
173                    self.total = response.count === null ? ${count} : response.count; 
174                    self.$root.liquidityList = response.liquidityList; 
175                    self.firstItem = start + 1; 
176                    self.lastItem = start + response.liquidityList.length; 
177                    self.inProgress = false; 
178                }); 
179                setTimeout(function() { //animation 
180                    self.$root.fadeInTableData = true; 
181                 }, 100); 
182 
183            }, 
184            first: function(){ 
185                if(this.firstItem > 1){ 
186                    this.callService(0, this.pageSize); 
187
188            }, 
189            previous: function () { 
190                if(this.firstItem - this.pageSize >= 1){ 
191                    var end = this.firstItem - 1; 
192                    var start = end - this.pageSize; 
193                    this.callService(start, end); 
194
195            }, 
196            next: function () { 
197                if(this.lastItem < this.total){ 
198                    var end = this.lastItem + this.pageSize; 
199                    this.callService(this.lastItem, end); 
200
201            }, 
202            last: function () { 
203                if(this.lastItem < this.total){ 
204                    var start = this.pageSize * ( Math.ceil(this.total / this.pageSize) - 1 ); 
205                    this.callService(start, this.total); 
206
207
208        }, 
209        mounted: function() { 
210          var self = this; 
211          this.$root.$on('initPagination', function() { 
212            self.startDate = null; 
213            self.endDate = null; 
214            self.callService(0, self.pageSize); 
215          }); 
216          this.$root.$on('getByDateRange', function (startDate, endDate) { 
217            self.startDate = startDate; 
218            self.endDate = endDate; 
219            self.callService(0, self.pageSize); 
220          }); 
221
222
223    </script> 
224 
225</#if> 
226 
227<style> 
228.hnb-body .text-right { 
229  text-align: right; 
230
231.hnb-body .text-right { 
232  text-align: right; 
233
234.hnb-body .text-bold { 
235  font-weight: bold; 
236
237.hnb-body .no-border-left { 
238  border-left: none; 
239
240.hnb-body .no-border-right { 
241  border-right: none; 
242
243.hnb-body .no-border-child-td td { 
244  border: none; 
245
246.hnb-body .no-pad-horizontal * { 
247  padding-left: 0; 
248  padding-right: 0; 
249
250.hnb-body .pad-vertical * { 
251  padding-top: 6px; 
252  padding-bottom: 4px; 
253
254.hnb-body .table-fixed { 
255  table-layout: fixed; 
256
257.hnb-body .t01 thead th { 
258  vertical-align: middle; 
259
260.hnb-body .nav-tabs > .active > a, .hnb-body .nav-tabs > .active > a:hover, .hnb-body .nav-tabs > .active > a:focus { 
261    color:rgba(200, 24, 24, 1.0); 
262
263.hnb-body .inline-block { 
264  display: inline-block; 
265
266.hnb-body .relative{ 
267    position: relative; 
268
269.hnb-body .absolute-r-b{ 
270    position: absolute; 
271    right: 0; 
272    bottom: 0; 
273
274.hnb-body table.t01 .no-hover *:hover { 
275    background-color: #c81818 !important; 
276
277 
278</style> 
279 
280<div class="article"> 
281    <h2 class="article-title">${title}</h2> 
282    <div id="vue_${portletDisplay['id']}_"> 
283        ${html.getData()} 
284    </div> 
285</div> 
286 
287<script type="text/x-template" id="tabs-template"> 
288<div> 
289    <ul class="nav nav-tabs"> 
290      <li v-for="tab in tabs" class="tab" v-bind:class="[{'active': current === tab}]" style="margin-bottom: -1px"> 
291        <a href="#" @click.prevent="changeTab(tab)">{{tab.title}}</a> 
292      </li> 
293    </ul> 
294    <div class="tab-content"> 
295        <slot></slot> 
296    </div> 
297</div> 
298</script> 
299<script type="text/x-template" id="tab-template"> 
300  <div class="tab-pane fade" ref="item" v-bind:class="{'active': active, 'in':fadein}"> 
301    <slot></slot> 
302  </div> 
303</script> 
304 
305<script type="text/x-template" id="print"> 
306    <a href="javascript:window.print()"><i class="fa fa-print"></i></a> 
307</script> 
308 
309<script type="text/x-template" id="export-to-csv"> 
310  <a v-bind:href="url" v-on:click="exportToCsv"><i class="fa fa fa-file-o"></i></a> 
311</script> 
312 
313<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.3.3/vue.min.js"></script> 
314 
315<script> 
316 
317Vue.component('tabs', { 
318  template: '#tabs-template', 
319  data: function() { 
320    return { 
321        tabs: [], 
322        current: null 
323    }; 
324  }, 
325  methods: { 
326    addTab: function(tab) { 
327        if (!this.current) { 
328            this.current = tab; 
329            tab.active = tab.fadein = true; 
330
331        this.tabs.push(tab); 
332    }, 
333    changeTab: function(tab) { 
334        var self = this; 
335        this.current = tab; 
336        this.tabs.forEach(function(value) { 
337            value.active = value === tab; 
338            value.fadein = false; 
339        }); 
340        this.$nextTick(function () { 
341            self.current.$refs.item.offsetWidth;  // force css reflow 
342            self.current.fadein = true; 
343        }) 
344
345
346}); 
347 
348Vue.component('tab', { 
349  template: '#tab-template', 
350  data: function() { 
351    return { 
352        active: false, 
353        fadein: false 
354    }; 
355  }, 
356  props: { 
357    'title': { 
358        required: true, 
359        type: String 
360
361  }, 
362  mounted: function() { 
363    this.$parent.addTab(this); 
364  }, 
365}); 
366 
367var LiquidityComponent = { 
368    template: '<span>{{ value }}</span>', 
369    props: ['property', 'filter', 'liquidityObject'], 
370    data: function () { 
371        return { 
372            value: this.getValue() 
373
374    }, 
375    watch : { 
376        liquidityObject : function (value) { 
377            this.value = this.getValue(); 
378
379    }, 
380    methods: { 
381        getValue: function(){ 
382            var liquidity = this.liquidityObject ? this.liquidityObject : JSON.parse('${liquidity}'); 
383            if(this.property instanceof Array ){ 
384                this.filter = this.property[1]; 
385                this.property = this.property[0]; 
386
387            return this.dynamicFilter(liquidity[this.property]); 
388        }, 
389        dynamicFilter: function (value) { 
390            if(value){ 
391                if(this.filter){ 
392                    return Vue.filter(this.filter)(value); 
393                }else{ 
394                    return value; 
395
396
397            return ""; 
398
399
400
401 
402var PrintComponent = { 
403    template: '#print' 
404
405 
406var ExportToScvComponent = { 
407    template: '#export-to-csv', 
408    data: function () { 
409        return { 
410            url: "#", 
411            startDate: null, 
412            endDate: null 
413
414    }, 
415    methods: { 
416        exportToCsv: function(){ 
417            this.url = "/o/liquidity/get-liquidity-csv"; 
418            if(this.startDate && this.endDate){ 
419              this.url += "?startDate=" + this.startDate + "&endDate=" + this.endDate; 
420
421
422    }, 
423    mounted: function() { 
424      var self = this; 
425      this.$root.$on('getByDateRange', function (startDate, endDate) { 
426        self.startDate = startDate; 
427        self.endDate = endDate; 
428      }); 
429
430 
431 
432
433 
434Vue.filter('formatDate', function (date) { 
435    var d = new Date(date); 
436    return d.getDate()  + "." + (d.getMonth()+1) + "." + d.getFullYear() + "."; 
437}); 
438 
439new Vue({ 
440    el: '#vue_${portletDisplay["id"]}_', 
441    data: function () { 
442        return { 
443            liquidityByDate : {}, 
444            liquidityList: JSON.parse('${liquidityList}'), 
445            fadeInTableData: true 
446
447    }, 
448    components: { 
449        'liquidity': LiquidityComponent, 
450        'liquidity-daterange-picker' : LiquidityDateRangePickerComponent, 
451        'pagination' : PaginationComponent, 
452        'print' : PrintComponent, 
453        'export-to-csv' : ExportToScvComponent 
454
455}); 
456 
457</script> 
458 
459<#else> 
460    <div class="no-translation">${languageUtil.get(locale,"templates.locale.contentNotAvailable")}</div> 
461</#if>