Judgment. ??? After trial of the issues the court shall determine who has the right of possession to and the value of the property and shall render judgment in the alternative for the delivery thereof to the party entitled to the same, or for its value in case delivery cannot be made, and also for such damages as either party may prove, with costs. (9a)