You have to create eventListener attached to OptionDialog, not every single Option and then check value of event.index property:
$.filterDialog.addEventListener('click', function(event) {
switch (event.index) {
case 0:
alert('Date added selected')
break;
case 1:
alert('Rating - hight selected')
break;
case 2:
alert('Rating - low selected')
break;
}
});
Also remember to set OptionDialog.cancel property and Titanium SDK will handle Cancel button automatically. In your case you can add it to <OptionDialog>
:
<OptionDialog id="filterDialog" title="Filter" cancel="3">