Skip to Content

Creating Entities and update Entities whit a shitch.

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.

save1.png (4.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 07 at 10:46 PM
    state="{path:'ACTIVO', formatter:'.switchStatus'}"
    
    when formatter is used, it becomes oneway binding. it will not receive data from UI
    Add comment
    10|10000 characters needed characters exceeded