Re-implement old ecml page handle to generate generic code