<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Application with SmartTable and JSONModel binding in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351049#M18944</link>
    <description>&lt;P&gt;I don't think you can use the smart table with JSON model. My understanding is that smart tables are designed to work only with oData models as they generate columns and rows based on the metadata an annotations. Although it would be very useful to use the smart table with JSON model.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2016 13:39:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-12-23T13:39:08Z</dc:date>
    <item>
      <title>Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaq-p/351048</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to develop SAPUI5 application using smart table with the json model binding. While running the program I'm getting error I'm sharing that snapshot with you.I'm sharing my code, please suggest me to how to make this work.&lt;/P&gt;&lt;P&gt;And please say how to refer JSONModel data/entity set to the annotations.xml file&lt;/P&gt;&lt;P&gt;In view:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;smartTable:SmartTable 
        id="smartTable_ResponsiveTable"
        smartFilterId="smartFilterBar" 
        tableType="ResponsiveTable" 
        editable="false"
        entitySet="tableSet"
        useVariantManagement="false"
        useTablePersonalisation="false" 
        header="Products" 
        showRowCount="true"
        useExportToExcel="false" 
        enableAutoBinding="true"
        initiallyVisibleFields="name"&amp;gt;
    &amp;lt;/smartTable:SmartTable&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In Controller:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;var array = [{
                "name" : "Dinesh",
                "id" : "123"
            },
            {
                "name" : "Nikhil",
                "id" : "456"
            },{
                "name" : "Pulkit",
                "id" : "789"
            }];
            var model = new sap.ui.model.json.JSONModel();
            model.setData({
                tableSet: array
            });
            this.getView().byId("smartTable_ResponsiveTable").setModel(model);
            });&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/12422-capture.png" /&gt;&lt;/P&gt;&lt;P&gt;I'm getting above error after running it. According to my knowledge smart table not able to get the data( that is entity set configuration issue). Please suggest me how to fix this and how to write annotations.xml file for JSONModel data&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Sai Ram Dinesh Pallapotu&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 06:38:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaq-p/351048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-23T06:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351049#M18944</link>
      <description>&lt;P&gt;I don't think you can use the smart table with JSON model. My understanding is that smart tables are designed to work only with oData models as they generate columns and rows based on the metadata an annotations. Although it would be very useful to use the smart table with JSON model.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 13:39:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351049#M18944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-23T13:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351050#M18945</link>
      <description>&lt;P&gt;Hi Radek,&lt;/P&gt;&lt;P&gt;In the explored, they gave smart control sample applications with JSON file data by using metadata.xml(we can write annotations here) and mockserver.js. So like that is there any loop hole to use JSON model data?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 05:32:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351050#M18945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-26T05:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351051#M18946</link>
      <description>&lt;P&gt;Hi Sai Ram&lt;/P&gt;&lt;P&gt;Smart Controls need OData metadata info like EntitySet/Attributes to get the data from the service. In the explorer they used JSON Model because that works based on MockServer. MockServer mimics the oData calls, moreover you can find the JSON file name as same name with the EntitySet which is defined in the metadata file of ODATA.&lt;/P&gt;&lt;P&gt;There is no way to use Smart Controls with JSON files directly, they are designed and intended for the ODATA model.&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 05:46:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351051#M18946</guid>
      <dc:creator>venkatakalyan_karanam</dc:creator>
      <dc:date>2016-12-26T05:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351052#M18947</link>
      <description>&lt;P&gt;Hi Venkatakalyan,&lt;/P&gt;&lt;P&gt;Thank you for your reply. You are correct. But I got requirement like develop an application using smart controls with JSON model data. So is there any way that, by using mock server can I make a relation between JSON model data and metadata.xml file.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sai Ram Dinesh&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 10:44:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351052#M18947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-27T10:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351053#M18948</link>
      <description>&lt;P&gt;No there is not - metadata.xml always comes from oData services for oData model not for JSON model.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2016 09:41:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351053#M18948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-29T09:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351054#M18949</link>
      <description>&lt;P&gt;Hi Sairam&lt;/P&gt;&lt;P&gt;As per the SAP documentation,  smart controls works on metadata and oData.&lt;/P&gt;&lt;P&gt;So Please look for any alternative approach with Custom controls.&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Kalyan &lt;/P&gt;</description>
      <pubDate>Sun, 01 Jan 2017 11:10:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351054#M18949</guid>
      <dc:creator>venkatakalyan_karanam</dc:creator>
      <dc:date>2017-01-01T11:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351055#M18950</link>
      <description>&lt;P&gt;Hi Sairam,&lt;/P&gt;&lt;P&gt;Kalyan is right. But let me add the information that the OData metamodel of SAP UI5 evaluates the app descriptor (manifest.json) in order to know where to find the annotations. THus, if you want to efine your columns et al. in a local annotation file, this annotation file must be registered correctly in the manifest.json.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;	"dataSources": {
			"mainService": {
				"uri": "/sap/opu/odata/sap/SEPMRA_PROD_MAN/",
				"type": "OData",
				"settings": {
					"annotations": [
						"localAnnotations"
					],
					"localUri": "localService/metadata.xml"
				}
			},
			"localAnnotations": {
				"uri": "annotations/annotations.xml",
				"type": "ODataAnnotation",
				"settings": {
					"localUri": "annotations/annotations.xml"
				}
			}
		},
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Mar 2017 08:56:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351055#M18950</guid>
      <dc:creator>stefan_schreck</dc:creator>
      <dc:date>2017-03-13T08:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351056#M18951</link>
      <description>&lt;P&gt;Hi there. I used a Json Model with smart table. My JSON model is named "TableMlstJsonModel" inside of my controller. So you can see in the following how I used smart table with JSON model. You need to define custom list and custom columns:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;smartTable:SmartTable id="__smartTableMlst" entitySet="ProjectHeaderMstSet" tableBindingPath="TableMlstJsonModel&amp;gt;/ProjectHeaderMstSet"
	header="{i18n&amp;gt;tableMlstTitle}" showRowCount="true" tableType="Responsive" showFullScreenButton="false" useVariantManagement="false"
	enableAutoBinding="true" ignoredFields="ProjectDefinition,Method,Refnumber" useExportToExcel="false"
	initiallyVisibleFields="MilestoneNumber,Description,OffsetMilestoneDate,OffsetMilestoneDateUnit"&amp;gt;
	&amp;lt;smartTable:customToolbar&amp;gt;
		&amp;lt;m:OverflowToolbar design="Transparent"&amp;gt;
			&amp;lt;m:ToolbarSpacer/&amp;gt;
			&amp;lt;m:Button type="Transparent" press="onRefreshMlstBtnPress" icon="sap-icon://refresh" tooltip="{i18n&amp;gt;refreshBtnTooltip}"/&amp;gt;
			&amp;lt;m:Button type="Transparent" press="onAddMlstBtnPress" icon="sap-icon://add" tooltip="{i18n&amp;gt;createBtnTooltip}"
				enabled="{objectView&amp;gt;/tableMlstBtnAddEnabledFinal}"/&amp;gt;
			&amp;lt;m:Button type="Transparent" press="onDeleteMlstBtnPress" icon="sap-icon://delete" tooltip="{i18n&amp;gt;deleteBtnTooltip}"
				enabled="{objectView&amp;gt;/tableMlstBtnDelEnabledFinal}"/&amp;gt;
		&amp;lt;/m:OverflowToolbar&amp;gt;
	&amp;lt;/smartTable:customToolbar&amp;gt;
	&amp;lt;m:Table id="tableMlst" mode="MultiSelect" busy="{objectView&amp;gt;/tableMlstBusy}"&amp;gt;
		&amp;lt;m:columns&amp;gt;
			&amp;lt;m:Column&amp;gt;
				&amp;lt;m:customData&amp;gt;
					&amp;lt;core:CustomData key="p13nData" value='\{"columnKey": "MilestoneNumber", "leadingProperty": "MilestoneNumber"}'/&amp;gt;
				&amp;lt;/m:customData&amp;gt;
				&amp;lt;m:Text text="{/#ProjectHeaderMst/MilestoneNumber/@sap:label}"/&amp;gt;
			&amp;lt;/m:Column&amp;gt;
		&amp;lt;/m:columns&amp;gt;
		&amp;lt;m:items&amp;gt;
			&amp;lt;m:ColumnListItem type="Navigation" press="onPress"&amp;gt;
				&amp;lt;m:cells&amp;gt;
					&amp;lt;m:Text text="{path: 'TableMlstJsonModel&amp;gt;MilestoneNumber', formatter: '.formatter.intNumber'}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;Description}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;OffsetMilestoneDate}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;OffsetMilestoneDateUnit}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;Activity}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;ActivityName}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;Aedat}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;Aenam}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;Erdat}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;Ernam}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;MlstSmlnr}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;Network}"/&amp;gt;
					&amp;lt;m:Text text="{TableMlstJsonModel&amp;gt;NetworkName}"/&amp;gt;
				&amp;lt;/m:cells&amp;gt;
			&amp;lt;/m:ColumnListItem&amp;gt;
		&amp;lt;/m:items&amp;gt;
	&amp;lt;/m:Table&amp;gt;
&amp;lt;/smartTable:SmartTable&amp;gt;
&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;But what you see here is not 100% related to the message that you see. The message is regarding the initiallyVisibleFields which is missing in you table definition. I just copied whole code because many people said it is not possible to use smart table with Json model or named models. All of these statements are wrong. You can use it but you need to provide custom list, as I did. &lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 16:40:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351056#M18951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-12-07T16:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351057#M18952</link>
      <description>&lt;P&gt;did u have an annotation file to go along with it? I see your entitySet attribute references something.&lt;/P&gt;&lt;P&gt;With your implementation, do your filter and sort capabilities work? Mine does not seem to..&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 16:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351057#M18952</guid>
      <dc:creator>former_member679019</dc:creator>
      <dc:date>2020-07-22T16:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351058#M18953</link>
      <description>&lt;P&gt;hi sir &lt;/P&gt;&lt;P&gt;can u send me full code..                   &lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 05:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351058#M18953</guid>
      <dc:creator>Rohit_Patil</dc:creator>
      <dc:date>2023-02-16T05:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351059#M18954</link>
      <description>&lt;P&gt;Good suggestion.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 18:42:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351059#M18954</guid>
      <dc:creator>former_member835962</dc:creator>
      <dc:date>2023-04-04T18:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351060#M18955</link>
      <description>&lt;P&gt;Hello Sir, can you please provide code here. controller and xml as I need same configuration in my project&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 12:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351060#M18955</guid>
      <dc:creator>former_member874443</dc:creator>
      <dc:date>2023-07-03T12:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Application with SmartTable and JSONModel binding</title>
      <link>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351061#M18956</link>
      <description>&lt;P&gt;sir please provide me a controller code&lt;/P&gt;</description>
      <pubDate>Mon, 25 Dec 2023 06:00:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/application-with-smarttable-and-jsonmodel-binding/qaa-p/351061#M18956</guid>
      <dc:creator>ahmedjilani0011</dc:creator>
      <dc:date>2023-12-25T06:00:20Z</dc:date>
    </item>
  </channel>
</rss>

