cancel
Showing results for 
Search instead for 
Did you mean: 

SAP.M.TAB:LE in sapui5

arindam_samanta
Participant
0 Kudos

Hi Experts,

I am trying to make one table in SAPUI5 for mobile apps. My screen will look like below:

After pressing button it will display table. I am writng XML view code. Table code is like that:


<Table id="myTable" items="{/ProductSet}">

                                  <columns>

                                          <Column>

                                                  <Label text="Product ID"></Label>

                                          </Column>

                                          <Column>

                                                  <Label text="Product Name"></Label>

                                          </Column>

                                  </columns>

                                  <items>

                                          <ColumnListItem>

                                                  <cells>

                                                          <Text text="{ProductID}"></Text>

                                                          <Text text="{Name}"></Text>

                                                  </cells>

                                          </ColumnListItem>

                                  </items>

                          </Table>

But it is showing below error.

Uncaught Error: failed to load 'sap.m.Table' from resources/sap/m/Table.js: 404 - Resource could not be found!


Kindly give solution.


Any possible solution would be accepted gratefully.


Regards,

Arindam Samanta

Accepted Solutions (0)

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos

Have you included sap.m as namespace?


<core:View xmlns="sap.m" xmlns:core="sap.ui.core">

-<Page>

-<content>
-<Table id="mytable">
-<columns>

</columns>

</Table>

</content>

-<footer>

</footer>

</Page>

</core:View>


Regards,

Chandra

arindam_samanta
Participant
0 Kudos

Hi Chandrashekhar,

I have added the below namespaces already:

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"  xmlns:l="sap.ui.layout" controllerName="plantvendorapp.PlantVendor" xmlns:html="http://www.w3.org/1999/xhtml">

in my code.

But still facing same issue.

Regards,

Arindam.

pfefferf
Active Contributor
0 Kudos

Hi, is your bootstrap tag ok (do you have included the sap.m lib?)?

E.g.

<script id="sap-ui-bootstrap"
src="/sap/public/bc/ui5_ui5/1/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal">
</script>
arindam_samanta
Participant
0 Kudos

I have added that library also. I found the problem & trying to solve it. I am adding <text> in the table for cell.

Regards,

Arindam Samnta.

Former Member
0 Kudos

Hi Arindam i got same problem Table.js 404 not found.

Have you solved the problem.?

if yes can you provide me solution.

Regards,

Rajesh Roy

arindam_samanta
Participant
0 Kudos

Hi Rajesh,

It is related to version of Eclipse. Explore java script resources in project explorer pane.Check sap.m is available or not. For me I think it was not. One more thing, additionally I have added one folder resources in my project. This folder contains some extra things.

Like that way,I am thinking, solved this thing.

Thanks & Regards,

Arindam.

Former Member
0 Kudos

Hi Arindam,

Thanks for reply, i solved this issue by replacing the client resource src with server resource src i.e

resources/sap-ui-core.js by

https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js .

Regards,

Rajesh Roy