ported js and php examples to onApplyClick for filter and onItemClick for table