admin管理员组文章数量:1400762
Hi i have a smart table like below
<VBox id="myid">
<smartTable:SmartTable id="smartTable_ResponsiveTable" entitySet = "Employee" enableAutoBinding="true"
tableType="ResponsiveTable" initialise="onSmartTableInit" editable="false" useVariantManagement="false"
useTablePersonalisation="true" header="Employees" showRowCount="true" useExportToExcel="true" />
</VBox>
my odata service is like below:
<workspace>
<atom:title>Default</atom:title>
<collection href="TablePersonalization">
<atom:title>TablePersonalization</atom:title>
</collection>
<collection href="Employee">
<atom:title>Employee</atom:title>
</collection>
<collection href="Collections">
<atom:title>Collections</atom:title>
</collection>
</workspace>
my smart table is there in second view which is has a navigation from the first view. when ever i move to the second view we are binding the total view with a different path like below.
this.getView().bindElement(bindingPath);
bindingPath = "/Collections('12345')"
here in my case, i am trying to bind the path "Employee", which is a parent navigation at root level.
iam confused about entitySet and tableBindingPath
metadata of oData is as follows.
<EntityType Name="EmployeeType">
<Key>
<PropertyRef Name="EMP_ID"/>
</Key>
<Property Name="EMP_ID" Type="Edm.String" Nullable="false" MaxLength="1024"/>
<Property Name="NAME" Type="Edm.String" Nullable="false" MaxLength="1024"/>
<Property Name="ADDR" Type="Edm.String" Nullable="false" MaxLength="1024"/>
<Property Name="SAL" Type="Edm.String" Nullable="false" MaxLength="1024"/>
</EntityType>
my DB table is as follows:-
entity Employee {
key EMP_ID : String(1024) not null; // Identifier of the Column
NAME : String(1024) not null;
ADDR : String(1024) not null;
SAL : String(1024) not null;
};
my odata is as follows.
"MY_SCHEMA"."my.db.models::CollectionModel.Employee" as "Employee";
i confused about the mapping here. what does the entitySet expects, is it table name or entityType name in metadata and what about the table binding path. Can any body answere this.
Hi i have a smart table like below
<VBox id="myid">
<smartTable:SmartTable id="smartTable_ResponsiveTable" entitySet = "Employee" enableAutoBinding="true"
tableType="ResponsiveTable" initialise="onSmartTableInit" editable="false" useVariantManagement="false"
useTablePersonalisation="true" header="Employees" showRowCount="true" useExportToExcel="true" />
</VBox>
my odata service is like below:
<workspace>
<atom:title>Default</atom:title>
<collection href="TablePersonalization">
<atom:title>TablePersonalization</atom:title>
</collection>
<collection href="Employee">
<atom:title>Employee</atom:title>
</collection>
<collection href="Collections">
<atom:title>Collections</atom:title>
</collection>
</workspace>
my smart table is there in second view which is has a navigation from the first view. when ever i move to the second view we are binding the total view with a different path like below.
this.getView().bindElement(bindingPath);
bindingPath = "/Collections('12345')"
here in my case, i am trying to bind the path "Employee", which is a parent navigation at root level.
iam confused about entitySet and tableBindingPath
metadata of oData is as follows.
<EntityType Name="EmployeeType">
<Key>
<PropertyRef Name="EMP_ID"/>
</Key>
<Property Name="EMP_ID" Type="Edm.String" Nullable="false" MaxLength="1024"/>
<Property Name="NAME" Type="Edm.String" Nullable="false" MaxLength="1024"/>
<Property Name="ADDR" Type="Edm.String" Nullable="false" MaxLength="1024"/>
<Property Name="SAL" Type="Edm.String" Nullable="false" MaxLength="1024"/>
</EntityType>
my DB table is as follows:-
entity Employee {
key EMP_ID : String(1024) not null; // Identifier of the Column
NAME : String(1024) not null;
ADDR : String(1024) not null;
SAL : String(1024) not null;
};
my odata is as follows.
"MY_SCHEMA"."my.db.models::CollectionModel.Employee" as "Employee";
i confused about the mapping here. what does the entitySet expects, is it table name or entityType name in metadata and what about the table binding path. Can any body answere this.
Share Improve this question asked Aug 18, 2015 at 9:10 saran kumarsaran kumar 792 gold badges3 silver badges8 bronze badges2 Answers
Reset to default 3
The entitySet expects the name of your Entity in Service. This is mainly required so that in the settings button all the fields in your entity will e up.
TableBindingPath - this is to bind the data. For example you could be binding the table to association to a Parent in which case you specify the association name.
This Reference should probably help.
Kindly note, if you do not specify the tableBindingPath and set the enableAutoBinding flag to true then system will table will automatically call getEntitySet on entitySet specified.
Hope this helps.
Thanks and Regards,
Veera
I found the below regarding SmartTable.
Check the version of the sapui5 you are using, in my case i am using sapui5 1.28.5, in which smart table is not working, then i changed the version of the sapui5 to 1.30 it started working.
本文标签: javascriptSAPUI5 How to Bind smart tableStack Overflow
版权声明:本文标题:javascript - SAPUI5: How to Bind smart table - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744280449a2598624.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论