Skip to Content

How to mandate a field and pre-populate in SAPUI5 XML view

I am trying to mandate a field and pre-populate value. This is what I am trying but the pre-populating with value CAM is not working ..please let me know what mistake I am doing.


<sap.ui.layout.form:label>

                      <Label class="sapUiSmallMarginTop"

                        text="{accountingInfoModel>name}" 

                        required="{= ${accountingInfoModel>name} === 'Att./Absence type' ? true : false }" 

                        valueStateText="{CAM}">

                        <layoutData>

                          <sap.ui.layout:ResponsiveFlowLayoutData

                            weight="1"></sap.ui.layout:ResponsiveFlowLayoutData>

                        </layoutData>

                      </Label>

                    </sap.ui.layout.form:label>
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 02, 2017 at 01:36 PM

    Hi,

    Use 'Name' property of input box to make it mandatory field along with 'Required' property of Label .

    Add comment
    10|10000 characters needed characters exceeded