Skip to Content
1
Jun 08, 2012 at 01:03 PM

sapui5 OData Model Binding Mode support

608 Views

I am wondering if in future releases of sapui5 whether Two Way binding be supported for OData Model Binding.

In the currently available version of the UI Development Kit for HTML5 the following modes are supported

Model One Way Two Way One Time Resource Model - - X JSON Model X X X XML Model X X X OData Model X - X

  • One Way —> The model implementation supports one way binding which means from model to view (value changes in the model will update all corresponding bindings and the view).
  • Two Way —> The model implementation supports two way binding which means from model to view and from view to model (value changes in the model and in the view will update all corresponding bindings and the view, respective model).
  • One Time —> The model implementation supports one time binding which means from model to view once.

Will "Two Way" binding be supported for OData Model?

If the answer is yes, will we be able to use the SAPData Annotations to change the default bind behaviour of individual controls?

I am thinking this could be done either by property

eg editable = sap:updatable

or by formatter or mode

// propertyname, formatter function, binding mode

// bindValue(sPath, fnFormatter?, sMode?)

oText.bindValue("firstName",null, sap.ui.model.BindingMode.OneWay)

Cheers

JSP