Skip to Content
Former Member
May 03, 2018 at 03:29 PM

Get element inside a table on controller


Hello I am trying to get an element on controller function. Easy task right? I am having problems to deal with it.

XML Code:

<Table id="tableLlaves" growingScrollToLoad="true" growing="true" items="{modelDefault>/DetalleStockDuplicadosSet}" headerText="Llaves (*)">
	<Column width="100px" minScreenWidth="Tablet" demandPopin="true"> 
			<Label text="Tipo Llave"/>
	<Column width="100px" minScreenWidth="Tablet" demandPopin="true"> 
			<Label text="Confirmar"/>
		<Text text="{modelDefault>Descripcion}"/>
		<CheckBox id="checkBox" selected="{modelDefault>Confirmada}" enabled="{path: 'modelDefault>/enabled', formatter: '.checkBox'}" select="onCheck"/>

JS Function:

checkBox: function (oItem) {
	//var o = s.getSource();
	//var t = s.getMetadata().getName();
	if(oItem) {
		//var o = oItem.getSource();
		var a = oItem.getBindingContext();
		return false;
	return this.getView().getModel("modelDefault").getProperty("/enabled");

The method getSource is not working either getBindingContext.

Somebody knows some way to get the checkbox which I do click on?