To the best of my knowledge, New Jersey is a Common Law state - that is, its legal system works to the same model as English Law. Its criminal courts operate on the basis that accused people are innocent until proven guilty. It also means that accused people have the right to present a defence to an charge.
In this instance the judge refused to allow the defence the opportunity to present its case. This surely must be declared a mistrial.