
75 N.W.2d 717 (1956)
162 Neb. 330
John H. JOHNSON and Lida Johnson, husband and wife, Appellants,
v.
Herbert E. RUHL and Frances Ruhl, husband and wife, Appellees.
No. 33905.
Supreme Court of Nebraska.
March 30, 1956.
*719 Richard O. Johnson, H. B. Muffly, Lincoln, for appellants.
Cline, Williams, Wright & Johnson, Lincoln, for appellees.
Heard before SIMMONS, C. J., and CARTER, MESSMORE, YEAGER, CHAPPELL, WENKE and BOSLAUGH, JJ.
BOSLAUGH, Justice.
A general demurrer of appellees to the petition of appellants was sustained. They elected not to plead further. A judgment of dismissal of the case was rendered by the district court. This appeal is from that judgment.
A general demurrer tests the substantive legal rights of the parties upon admitted facts including proper and reasonable inferences of law and fact which may be drawn from the facts which are pleaded. Central Nebraska Public Power & Irr. Dist. v. Walston, 140 Neb. 190, 299 N.W. 609; Kinney Loan & Finance Co. v. Sumner, 159 Neb. 57, 65 N.W.2d 240.
The following is the substance of the petition:
The parties made a contract in writing on October 10, 1947, by the terms of which appellees, the owners of the premises and the appurtenances described, sold and appellants bought the property therein designated for the sum of $38,000. The purchase price was required to be paid by appellants to appellees $12,000 when the contract was executed and $26,000 with interest at 5 per cent per annum in 132 installments of $256.46 each, payable on the 10th day of October 1947, and on the 10th day of each month thereafter until and including October 10, 1958. A copy of the contract was attached to and made a part of the petition. The total principal and interest paid by appellants because of the contract to June 10, 1949, was $17,385.46. The contract was performed by appellants to that date.
The facts concerning the commencement, pleadings, proceedings, findings, and judgment in an ejectment action brought by appellees against appellants in the district court on September 2, 1949, were stated. The court found in that case that appellants had paid $12,000 and the monthly installments required to and including the one due June 10, 1949, on the purchase price of the property; that appellants were entitled to a credit on the purchase price of $989 damages because of misrepresentations made by appellees as to the condition of the property at the time it was sold and bought as alleged in the cross-petition of appellants; that there was due and unpaid to June 1950 on the purchase price and $105.89 for insurance a total of $2,194.41. The court ordered that if appellants failed to pay for 60 days the amount found due appellees or failed to pay delinquent taxes on the property appellees would be entitled to immediate possession of it. The findings and decree were rendered by the district court on June 1, 1950. Appellees made application to the district court for a writ of assistance to put them in possession of the property. Appellants on November 7, 1950, surrendered the premises to appellees and they have since had the possession and use of them to the exclusion of appellants who have since received nothing from the property.
Appellants appealed from the findings and judgment of the district court of June *720 1, 1950. It was found by this court that this allowance to the appellants on the purchase price of the property by the trial court was not contested by appellees and that the effect of the credit was that at the time appellees sought to terminate the contract and brought the ejectment action on September 2, 1949, appellants were entitled to a credit on the purchase price in excess of the delinquencies pleaded. The judgment of the district court was reversed and the cause was remanded for further proceedings consistent with the opinion. Ruhl v. Johnson, 154 Neb. 810, 49 N.W.2d 687.
The district court thereafter upon consideration of the opinion of this court and the mandate found that at the time the ejectment case was brought on September 2, 1949, appellants were not in default in their performance of the contract because of the credit of $989 due them from appellees; and that appellees were not then entitled to cancel the contract and because thereof the petition of appellees in the ejectment case should be dismissed. The district court then adjudged that the $989 should be and that it was credited on the purchase price of the property as stated in the contract of October 10, 1947, and that the petition and cause of action of appellees should be and they were dismissed and the costs were taxed to appellees.
The prayer of the petition is: That an account be taken of the receipts and profits of the premises received by appellees during the time they have been in the possession of the premises and that appellants have judgment therefor; that an account be taken of the personal property on the premises from the time appellants vacated and surrendered them and that they have judgment for all personal property sold, disposed of, or destroyed since appellees took possession of the property; and that judgment be rendered against appellees for $5,000 as damages sustained by appellants because of the wrongful withholding of the premises by appellees from appellants and for costs of suit and general equitable relief.
The correctness of the action of the trial court in sustaining the demurrer of appellees to the petition of appellants is challenged by them on the basis that the phrase "cause of action" does not mean the formal statement of facts set forth in the petition but the subject matter upon which the appellants ground their right to relief against appellees. The doctrine to which appellants refer is correctly stated by them. Myers v. Moore, 78 Neb. 448, 110 N.W. 989; Zelen v. Domestic Industries, 131 Neb. 123, 267 N.W. 352. However, it is not significant or helpful in deciding the matter at issue in this case. A cause of action and the pleading of a cause of action are separable and distinguishable. Appellants are required by the code of civil procedure to make in their petition a statement of facts constituting the cause of action upon which they seek relief in ordinary and concise language. Section 25-804, R.R.S. 1943.
In Ferson v. Armour & Co., 109 Neb. 648, 192 N.W. 125, this court declared: "The rules of pleading require a plaintiff in a civil suit to insert in the petition `a statement of the facts constituting the cause of action, in ordinary and concise language, and without repetition.'"
The word "facts" as used in the code means a narrative of the events, acts, and things done or omitted which show a legal liability of the defendant to the plaintiff. A petition is sufficient if from the statement of facts the law entitled plaintiff to recover thereon. Rhoads v. Columbia Fire Underwriters Agency, 128 Neb. 710, 260 N.W. 174. It is unimportant how meritorious a cause of action a litigant may have. It cannot avail him anything if he fails to properly state in his petition concerning it sufficient actionable facts. A petition which fails to plead actionable facts is vulnerable to a general demurrer. Section 25-806, R.R.S.1943; First State Bank of North Bend v. Kastle, 118 Neb. 630, 225 N.W. 776
Pleadings in a civil action are indispensable. Their purpose is to frame the issues upon which the cause is to be tried and to advise the adversary what he is called upon to meet. Appellants cannot *721 prevail on this appeal unless they have pleaded in their petition sufficient actionable facts to entitle them to legal relief against appellees.
The allegations of the petition are that appellants performed the exactions of the contract obligatory upon them to and including June 10, 1949. They do not assert any payment by them on the purchase price or the interest thereon after that date. They were given a credit thereon of $989 by the findings and adjudication of the district court. The credit allowed them was sufficient, disregarding any accrued interest, to satisfy the installments due including the one which matured on September 10, 1949, and a part but not all of the installment due October 10, 1949. The petition sets forth no fact tending to show that appellants have not been in default of all the amounts required to be paid by the contract since November 1949. The amount past due and unpaid on the contract on November 7, 1950, when possession of the property, the subject of the contract, was surrendered by appellants to appellees, was in excess of $2,500. The record compels acceptance of this conclusion. So far as the petition discloses there has not been paid or offered to be paid by appellants any part of this or any part of the amounts which have since that date become due on the contract.
The contract contains these provisions: "First parties (appellees) agree to give second parties (appellants) immediate possession of * * * said premises * * *. It is agreed that time is of the essence in this contract and that in event second parties shall default in making any of the payments provided herein * * * that first parties may at their option terminate this contract * * * and in such event all sums which have been paid by second parties shall be considered to have been paid by second parties as rent for the use and occupancy of the above described premises. * * * Second parties further agree that if they should default in making the payments required hereunder or in carrying out any of the obligations provided by the terms of this agreement, they will place the first parties in peaceable possession of said premises * * *."
The quoted provisions of the contract are valid and enforceable. It is stated in Gilbert v. Union Pacific R. R. Co., 79 Neb. 160, 112 N.W. 359: "Where a contract for the sale of real estate provides that time and punctuality are material and essential ingredients in the contract, and that nonpayment of an installment of the purchase price shall forfeit the purchaser's rights therein, and that the vendor shall thereupon have the right to take possession of the property, such default of itself operates as a forfeiture * * *." See, also, Dodge v. Galusha, 151 Neb. 753, 39 N.W.2d 539; Abbas v. Demont, 152 Neb. 77, 40 N.W.2d 265; Kear v. Hausmann, 152 Neb. 512, 41 N.W.2d 850; Johnson v. Norton, 152 Neb. 714, 42 N.W.2d 622.
Appellees were entitled to the possession of the property, the subject of the contract, on November 7, 1950, and appellants were obigated by the terms of the contract to place appellees in the peaceable possession thereof as appellants did on that date.
It is competent for an executory contract for the sale and purchase of real estate to stipulate for the investiture of the vendor with the right of possession of the premises which includes the right to the rents and profits thereof in the event of default by the vendee. If the vendor peaceably obtains possession of the premises after default of the vendee he may hold such possession as against him until the purchase price of the premises is fully satisfied. Generally a vendor in possession by virtue of a stipulation therefor in the event of default is required to account for the rents and profits received or for the reasonable rental value of the premises but such an accounting should be had in a suit to foreclose the contract as a mortgage or in an action to redeem. See, Felino v. K. S. Newcomb Lumber Co., 64 Neb. 335, 89 N.W. 755, 97 Am.St.Rep. 646; Pettit v. Louis, 88 Neb. 496, 129 N.W. 1005, 34 L.R. A.,N.S., 356; Penn Mutual Life Ins. Co. v.
*722 Katz, 139 Neb. 501, 297 N.W. 899; Hanks v. Northwestern State Bank, 143 Neb. 204, 9 N.W.2d 175; Annotation, 115 A.L.R. 339. The decisions just referred to involved real estate mortgages containing provisions for possession of the property affected by the mortgagee in the event of default by the mortgagor but the principles applied therein are equally applicable to an executory land contract containing similar provisions for right of possession by the vendor upon default of the vendee. Appellants do not seek to redeem the property from their defaults. They express no such desire or ability. They have not alleged facts sufficient to constitute a cause of action or any legal basis for an accounting for rents and profits of the property involved herein while it has been in the possession of appellees.
It is an unusual coincidence that the petition makes no allegations concerning personal property but the prayer of the petition asks for an accounting of the personal property on the premises from the time possession thereof was surrendered to appellees and "a judgment for all such personal property sold, disposed of or destroyed." It is not charged in the petition that there was any property sold, disposed of, or destroyed or any other facts that would permit or justify the relief sought in this regard.
Appellants ask for a judgment for $5,000 for damages sustained by them because of wrongful withholding of the premises from them by appellees. It is said by appellants that this court determined that they were not in default of performing their contract on September 2, 1949, and that it follows that they were not in default on November 7, 1950, when they upon demand of appellees surrendered possession of the premises to appellees and hence appellants brought this action for restitution of the premises to them. They were not legally entitled to possession of the property, the subject of the contract, at the time this case was instituted because of any facts averred in the petition. It is deducible from the petition that appellees then had and were entitled to continue to have possession of the property because of the defaults of appellants above referred to and discussed. In State ex rel. Hayden v. Horton, 70 Neb. 334, 97 N.W. 434, 436, on rehearing, 70 Neb. 343, 99 N.W. 501, the court stated: "In Gould v. McFall, 118 Pa. 455, 12 A. 336, it was said: `Restitution is not a mere right; it is ex gratia, resting in the exercise of a sound discretion; and the court will not order it where the justice of the case does not call for it * * *.'" See, also, Atlantic Coast Line R. R. Co. v. State of Florida, 295 U.S. 301, 55 S.Ct. 713, 79 L.Ed. 1451.
Appellants could not therefore in any event recover damages because appellees have since November 1950 detained the premises from appellants. The right of recovery of damages for unlawful detention of property depends upon the right of possession thereof in the plaintiff during the period for which the recovery is asked and that his adversary has illegally withheld the possession thereof. Hanks v. Northwestern State Bank, supra [143 Neb. 204, 9 N.W.2d 176], is conclusive of this: "When a party seeks to recover damages for the unlawful detention of property he must establish his right to the possession thereof during the period for which he seeks to recover and that the party against whom he seeks to recover unlawfully withheld such possession."
The petition of appellants does not state facts sufficient to entitle them to any relief in this case. The demurrer of appellees to the petition was properly sustained.
The judgment of the district court should be and it is affirmed.
Affirmed.
