Skip to Content

Set propertie to view control

Hi this is very simple question but i have some time trying to send the value Good one propertie of a NumericContent

This is my control on the view:

<NumericContent id="estado" value=""  valueColor="" width="auto" class="sapUiSmallMargin" />

and this is how i send my propertie:

	    	        if (oData.number >= 5 ) {
	    	        	var Good = new sap.m.ValueColor.Good;

and this is the error:
sap.m.ValueColor.Good is not a constructor
if i send just this valor.setValueColor(Good);

still getting and error but something that it's string always i send just value but this time dependig of the value i need to change the properties

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 12, 2018 at 07:26 PM
    valor.setValueColor(sap.m.ValueColor.Good); valor.setValueColor("Good"); 
    sap.m.ValueColor add this in your controller dependency

    Add comment
    10|10000 characters needed characters exceeded