UI5- CheckBox

lightUI5- CheckBox

 

 


3 check boxed with different properties set for each.

1


2


Adding the ValueState property.

3


4


Associating a change event to the check box.

5


6


7


8


9


10


Code Snippet:
// Instantiate a check box
oCheckBox1 = new sap.ui.commons.CheckBox({
text: “Share in Facebook”,
//checked: true,
valueState : sap.ui.core.ValueState.Error,
change: function() {if(oCheckBox1.getChecked())
{alert(‘yes’)}
else
{alert(‘no’)}
}
}).placeAt(“content”);

oCheckBox2 = new sap.ui.commons.CheckBox({
text: “Share in Twitter”,
//editable: false,
valueState : sap.ui.core.ValueState.Warning
}).placeAt(“content”);

oCheckBox2 = new sap.ui.commons.CheckBox({
text: “Share in LinkedIn”,
enabled: false
}).placeAt(“content”);


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s