cancel
Showing results for 
Search instead for 
Did you mean: 

Set propertie to view control

naotoxxx
Participant
0 Kudos

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;
	    	        	valor.setValueColor(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

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos
valor.setValueColor(sap.m.ValueColor.Good); valor.setValueColor("Good"); 
sap.m.ValueColor add this in your controller dependency

naotoxxx
Participant
0 Kudos

Thank you! Jun Wu

I forgot to add that sap.m.ValueColor 😄

Answers (0)