cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to perform create/edit/delete operation in SAPUI5 CRUD Application

Former Member
0 Kudos

Hi Experts,

I have created a sapui5 CRUD application following the below link as a reference.

https://www.youtube.com/watch?v=wA_lK93PDU4#t=936.452018

I am able to create a new ticket but unable to save the same.

Further I am not able to perform edit and delete operations also.

Below are the exceptions I am encountering:

1. Cannot read property 'getBindingContextPath' of undefined on clicking the delete button.

2. Uncaught TypeError: oTable.getSelectedIndex is not a function on clicking the edit button.

3. Uncaught [object][object] on creating a new ticket and clicking the save button. Also the server responded with 405 error in POST method.

Please provide your suggestions as to where I could have gone wrong.

Thanks,

Srinivasan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I have narrowed down to the place where I am getting the error. I my Product.controller,js I have a code "OData.request(requestObj, function() )" which shows an error "OData is undefined".

Any suggestions on resolving it would be helpful.

junwu
Active Contributor
0 Kudos

you can use jquery or odatamodel to send the ajax request. don't use that odata

do some google....

junwu
Active Contributor
0 Kudos

code please

Former Member
0 Kudos

Hi Jun,

Attached code files for reference.

Regards,
Srinivasan

Former Member
0 Kudos

Hi Jun,

Hope you could provide any suggestions for the same.

Thanks,

Srinivasan

junwu
Active Contributor
0 Kudos

not able to find this getBindingContextPath in your code.

Former Member
0 Kudos

Hi Jun,

On following some block I had edited the code from var selected = oTable.getSelectedIndex();

to var selected = oTable.getBindingContextPath();

Still facing the same issue.

I am not sure if this is the correct method. I have attached the original code from a reference scn blog.

Regards,

Srinivasan

junwu
Active Contributor
0 Kudos

your code looks ok....

Former Member
0 Kudos

Yeah on exploring few blogs I seem to be ok with the code. But still I am not able to perform these CRUD operations.

Former Member
0 Kudos

Any suggestions from your side Jun. It would be very helpful.

junwu
Active Contributor
0 Kudos

just move on, no need to waste time...

Former Member
0 Kudos

Have you tried to replicate the same scenario using SAPUI5 CRUD Master Detail template?

In that CRUD Application I am again unable to create a new ticket. Futher to it the changes done for a particular ticket is not persistent.

The changes are not saved when I navigate to another screen and the visit the edited ticket.

Any information regarding this from your side?

junwu
Active Contributor
0 Kudos

what error you have this time?

Former Member
0 Kudos

While creating a new ticket and giving the mandatory details -> saving it I get the below error.

Sorry, a technical error occurred! Please try again later.


Is this because something is wrong with my application or a bug in the template.