Two men charged with an alleged attack on off-duty police will be kept in custody after one of the officers was nearly killed in the melee.