Hi experts, I need your help please.
I created an app whit CRUD Master-Detail template.
When I create a entry only fields Input add object in property mChangedEntities but when the input replacement by switch dont add nothing.
This is my form in CreateEntity.view.xml
<Label text="Código" required="true"/> <Input name="CODRECH" id="CODRECH_id" enabled="{= ${viewModel>/mode} === 'edit'? false: true}" value="{ path: 'CODRECH', type: 'sap.ui.model.odata.type.String' , constraints:{ maxLength:2, nullable:false } }"/> <Label text="Descripción" required="false"/> <Input name="DESCRIPCION" value="{ path: 'DESCRIPCION'}"/> <Label text="Activo"/> <Switch name="ACTIVO" id="activo" state="{path:'ACTIVO', formatter:'.switchStatus'}" />
How i can add value a property 'ACTIVO'. When create an update one entry ?
Please! Thanks.
state="{path:'ACTIVO', formatter:'.switchStatus'}" when formatter is used, it becomes oneway binding. it will not receive data from UI
You already have an active moderator alert for this content.
make it bool
or
https://blogs.sap.com/2016/09/16/custom-data-types-in-sapui5/
not an easy route.
Add comment