cancel
Showing results for 
Search instead for 
Did you mean: 

oData submitChanges and routing problems

0 Kudos
128

Hey Experts!

I want to refresh my oData Model after i set new properties. In this case i wrote this logic into a messageBox component and this does not work.

I am able to set the property but the oModel.submitChanges function is not refreshing my oModel which is set before.

Here you can see my function where i set the property of this oDataModel and want to try refresh it.

The reason why i want to do this is, when i route on my destiny page then the oModel is not refreshed and i have then a outdated Model after route on it.

Here can you see my code:

Thanks a lot!

Best regards,
Danilo

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

don't have the full picture,

can you put your navigation code in success function?

Answers (1)

Answers (1)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Danilo,

It looks like you are routing to another page right after submitting your changes.  If you have one-way binding but you have already loaded a view then the refresh you have triggered in the callback would not update the view.  If you are using one-way binding on your model then you would want to execute the navigation in your callback function after you have refreshed the model.

Regards,

Ryan Crosby