Hi,
I’m trying to read a radio group item’s label using the CAF Javascript API but it doesn’t seem to work.
I created a new portlet having only the radio group control and the below javascript on the Change Client-Side event.
var radioGroupModel = CAF.model("#{caf:cid('radio')}");
var itemIndex = radioGroupModel.indexOf('value2');
var item = radioGroupModel.get(itemIndex);
var itemModel = CAF.model(item);
alert(itemModel.getLabel() + ': ' + itemModel.getValue());
The alert prints the following:
label2
As anyone ever faced with this problem?
Thanks
Bruno