Judgment.???After a trial of the issues the court shall find in whom is the right of possession 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 the value in case delivery cannot be made, and also for such damages as either party may prove, and for costs.