Skip to Content
0

Smart Table Responsive with input fields

Jul 26, 2017 at 06:48 PM

119

avatar image

Hello,

I have a smart table responsive table type. I have items with individual items to bind data to my smart table. In my smart table, the first two columns are editable, for that i am using sap.m.Input control.]

My issue: When i edit my text and switch to display mode, i see the displayed text.

When i switch back to edit, i see not the original text but the one i edited.

I am trying to reset my edited changes back to what was before.

http://veui5infra.dhcp.wdf.sap.corp:8080/snippix/#22868

I have attached a similar snippix. If you edit ALFKI to ALFKI2, Then switch to display mode, you will see ALFKI. But when you switch back to edit, you will see ALFKI2, not ALFKI. I tried rebinding the table, but this does not work.


Any ideas appreciated. Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member
Jul 29, 2017 at 06:10 AM
0

Hi Abhishek

By default, oData model is one way binding. You need to see it to two way binding

				oModel = new sap.ui.model.odata.v2.ODataModel(sURL, {
					json: true
				});				
				oModel.setDefaultBindingMode("TwoWay");
				oView = this.getView();
				oView.setModel(oModel);

Thanks

-D

Share
10 |10000 characters needed characters left characters exceeded