cancel
Showing results for 
Search instead for 
Did you mean: 

how can i set formatter in Smartform, smartField. formatter not work!

Former Member
0 Kudos

hello,

I am currently converting a Simpleform into Smartform. In the Simpleform I had used formatter like this:

<ObjectStatus 
         text="{
         path: 'appointments>rest',
         formatter: '.formatter.restText'
         }"/>
<Label text="Duration" />
<ObjectStatus
       text="{
        parts:[
            {path: 'appointments>starttime'}, 
            {path: 'appointments>endtime'}
             ],
         formatter: '.formatter.dateFormatter'
}"/>

and in the smartform i have the formatter into the SmartFiled like this:

<smartForm:GroupElement>
    <smartField:SmartField 
    extLabel="Dauer"
    value="{
    parts:[
        {path: 'appointments>starttime'}, 
        {path: 'appointments>endtime'}
        ],
    formatter: '.formatter.dateFormatter'
    }" 
/>
<smartForm:GroupElement>
     <smartField:SmartField 
     textLabel="Abbrechenbar"
      value="{
      path: 'appointments>flag',
       formatter: '.formatter.statusText'
      }" />
</smartForm:GroupElement>

in the Simpleform works the formatter perfectly, but in the smartform it does not work,

and in api I can not find a correct solution!

https://sapui5.hana.ondemand.com/#docs/api/symbols/sap.ui.comp.smartfield.SmartField.html#getConfigu...

https://sapui5.hana.ondemand.com/explored.html#/entity/sap.ui.comp.smartform.SmartForm/about

Accepted Solutions (1)

Accepted Solutions (1)

former_member228602
Contributor
0 Kudos

Hello ,

Smart field does not support formatters . Since Smart field is closely bound to ODataModel. The necessary transformation needs to be done on the Server.

Thanks and Regards.

Veera

Answers (1)

Answers (1)

Former Member
0 Kudos

hello,

i use the other form with the entries, that need a formatter. And lets the css design as smartform