Skip to Content

Set propertie to view control

Apr 12 at 07:09 PM


avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you! Jun Wu

I forgot to add that sap.m.ValueColor :D