Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Create custom control before calling view.js

$
0
0

Hi,

 

I want to create line chart with one dynamic customized list box.Based on dynamic list box value, I should create line chart. First I excuted list box creation code, thereafter only I am calling view.js, but I am getting undefined for list box value. It seems list box is not ceated before calling listbox.

 

Here is my code,

 

 

script for creating creating list box and calling view.js       

 

var viewbydata = [{viewby : "Customer"  }, {viewby : "City" },{ viewby : "State"},{viewby : "Country"}];

var selectElement = $("");

$.each(viewbydata, function(i, item) {

$("", {value: item.viewby, text: item.viewby}).appendTo(selectElement);

});

new sap.ui.commons.Label({ text: "viewby"}).placeAt("viewbyList_lbl");

$("#viewbyList").append(selectElement);

sap.ui.localResources("Test");

var view = sap.ui.view({id:"Test, viewName:"Test.LineTest", type:sap.ui.core.mvc.ViewType.JS}); view.placeAt("content","only");

 

Html element

 

<div class="viewbyDiv" style="" >

  <div style="padding-bottom:0px; font-size:12px; font-weight: bold;" id="viewbyList_lbl"> </div>

  <div id="viewbyList" class="sltDiv"> </div>

  </div>

 

  <div id="content"> </div>

 

 

 

I am new to SAP HANA. Please help me to solve this problem.
Thanks in Advance,
  Suja Arjunan


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>