
166 Cal.App.4th 255 (2008)
MAHESHKUDVIAR GOGRI, Plaintiff and Appellant,
v.
JACK IN THE BOX INC., Defendant and Respondent.
No. D050838.
Court of Appeals of California, Fourth District, Division One.
August 25, 2008.
*259 Mohajerian Law Corporation, Al Mohajerian, Aaron G. Capps and Michael T. Smith for Plaintiff and Appellant.
Kirby Noonan Lance & Hoge, David J. Noonan, Steven W. Sanchez and Jill E. Randall for Defendant and Respondent.

OPINION
McDONALD, Acting P. J.
Plaintiff Maheshkuimar Gogri appeals a judgment entered after the trial court granted the motion for summary judgment filed by defendant Jack in the Box Inc. (JIB). On appeal, Gogri contends the trial court erred by (1) vacating his voluntary dismissal filed prior to the court's order granting JIB's motion for summary judgment; (2) granting JIB's motion for summary judgment; and (3) awarding attorney fees to JIB. We conclude that because Gogri timely filed his voluntary dismissal, the trial court did not have jurisdiction to decide JIB's motion for summary judgment.

FACTUAL AND PROCEDURAL BACKGROUND
In 1988 Gogri and Chandra Haria became co-owners of a JIB franchise restaurant in San Jose. Gogri is an officer and director of Haria and Gogri Corporation, which now owns four JIB franchise restaurants in California, including the original San Jose restaurant.
In 1995 Gogri, Haria and Adel Farag, pursuant to their partnership agreement, purchased five JIB franchise restaurants in Arizona, including one known as JIB 1165. In 2000 Gogri and Farag, pursuant to a separate partnership agreement, purchased a sixth JIB franchise restaurant in Arizona.
In February 2005, with the term of the franchise agreement for JIB 1165 about to expire, JIB offered to renew the franchise agreement with Gogri, Haria, and Farag on the condition that they each execute a general release in favor of JIB. However, Gogri chose not to execute the general release. Thereafter, JIB entered into a new franchise agreement for JIB 1165 with only Haria and Farag.
*260 Gogri then filed the instant action against JIB. His first amended complaint alleged causes of action for (1) declaratory relief; (2) breach of contract; (3) breach of the implied covenant of good faith and fair dealing; (4) intentional interference with contractual relationship; (5) negligent interference with contractual relationship; (6) intentional interference with prospective economic advantage; (7) negligent interference with prospective economic advantage; (8) unfair business practices in violation of Business and Professions Code section 17200 et seq.; (9) injunctive relief; and (10) violation of the California Franchise Relations Act (Bus. & Prof. Code, § 20000 et seq.).[1] The trial court ultimately sustained, without leave to amend, JIB's demurrers to the fourth, fifth, sixth and seventh causes of action of Gogri's first amended complaint, leaving in effect the first, second, third, eighth, ninth, and 10th causes of action (to which JIB apparently did not demur) in the first amended complaint.[2]
On December 15, 2006, JIB filed a motion for summary judgment, arguing there were no triable issues of material fact regarding the six remaining causes of action and that it was entitled to judgment as a matter of law. On December 18, Gogri filed a motion for summary judgment, arguing there were no triable issues of material fact regarding the six remaining causes of action and that he was entitled to judgment as a matter of law.
On February 22, 2007, Gogri filed a request for dismissal of his complaint without prejudice. The court clerk accepted it and entered the dismissal on that date. On February 23, JIB filed an ex parte application requesting Gogri's voluntary dismissal be vacated, apparently arguing it was untimely filed, and that the court grant JIB's motion for summary judgment. On February 26, an order to show cause (OSC) was issued as to why Gogri's voluntary dismissal should not be set aside. On March 2, the trial court vacated Gogri's voluntary dismissal of the complaint and granted JIB's motion for summary judgment. On April 18, the court entered judgment for JIB on Gogri's complaint. The court subsequently granted JIB's request for an award of $270,810.77 in reasonable attorney fees and costs and amended the judgment to reflect that award. Gogri timely filed a notice of appeal.


*261 DISCUSSION

I

Voluntary Dismissals Generally
(1) Code of Civil Procedure section 581[3] allows a plaintiff to voluntarily dismiss, with or without prejudice, all or any part of an action before the "actual commencement of trial." (§ 581, subds. (b)(1), (c).)[4] The California Supreme Court stated: "Apart from certain ... statutory exceptions, a plaintiff's right to a voluntary dismissal [before commencement of trial pursuant to section 581] appears to be absolute. [Citation.] Upon the proper exercise of that right, a trial court would thereafter lack jurisdiction to enter further orders in the dismissed action."[5] (Wells v. Marina City Properties, Inc. (1981) 29 Cal.3d 781, 784 [176 Cal.Rptr. 104, 632 P.2d 217] (Wells).) Alternatively stated, voluntary dismissal of an entire action deprives the court of both subject matter and personal jurisdiction in that case, except for the limited purpose of awarding costs and statutory attorney fees. (Shapell Industries, Inc. v. Superior Court (2005) 132 Cal.App.4th 1101, 1108 [34 Cal.Rptr.3d 149] (Shapell); Harris v. Billings (1993) 16 Cal.App.4th 1396, 1405 [20 Cal.Rptr.2d 718] (Harris).) (2) "An order by a court lacking subject matter jurisdiction is void. [Citation.]" (Kyle v. Carmon (1999) 71 Cal.App.4th 901, 909 [84 Cal.Rptr.2d 303] (Kyle).)
(3) Section 581, subdivision (a)(6), provides: "A trial shall be deemed to actually commence at the beginning of the opening statement or argument of any party or his or her counsel, or if there is no opening statement, then at the time of the administering of the oath or affirmation to the first witness, or the introduction of any evidence." Despite that statutory definition of a trial, the California Supreme Court has construed the phrase "commencement of *262 trial" in section 581 to include "determinations on matters of law which dispose of the entire case, such as some demurrers and pretrial motions. [Citations.]" (Kyle, supra, 71 Cal.App.4th at p. 909, italics added.) Therefore, "commencement of trial" under section 581 is not restricted to only jury or court trials on the merits, but also includes pretrial procedures that effectively dispose of the case. (Mary Morgan, Inc. v. Melzark (1996) 49 Cal.App.4th 765, 769 [57 Cal.Rptr.2d 4]; Wells, supra, 29 Cal.3d at p. 785; Goldtree v. Spreckels (1902) 135 Cal. 666, 672 [67 P. 1091] (Goldtree).) Accordingly, "pretrial procedures not determinative of the case do not preclude voluntary dismissal [under section 581]. [Citations.]" (6 Witkin, Cal. Procedure (4th ed. 1997) Proceedings Without Trial, § 263, p. 682.)
(4) One court recently reviewed numerous section 581 cases and concluded a "mere formality" test applied in determining whether a voluntary dismissal is untimely (i.e., requested on or after a "commencement of trial"). (Franklin Capital Corp. v. Wilson (2007) 148 Cal.App.4th 187, 200-205 [55 Cal.Rptr.3d 424] (Franklin).) A voluntary dismissal is untimely under section 581 if either (1) there has been "a public and formal indication by the trial court of the legal merits of the case," or (2) there has been "some procedural dereliction by the dismissing plaintiff that made dismissal otherwise inevitable." (Franklin, at p. 200.)
Because the trial court's application of section 581 to undisputed facts is a question of law, we apply the independent standard in reviewing on appeal the trial court's determination.[6] (Zapanta v. Universal Care, Inc. (2003) 107 Cal.App.4th 1167, 1171 [132 Cal.Rptr.2d 842] (Zapanta); Groth Bros. Oldsmobile, Inc. v. Gallagher (2002) 97 Cal.App.4th 60, 65 [118 Cal.Rptr.2d 405]; cf. International Engine Parts, Inc. v. Feddersen & Co. (1995) 9 Cal.4th 606, 611 [38 Cal.Rptr.2d 150, 888 P.2d 1279] [application of statute of limitations to undisputed facts is a question of law].)


*263 II

Timeliness of Gogri's Section 581 Voluntary Dismissal
Gogri contends the trial court erred by vacating his section 581 voluntary dismissal filed prior to the court's order granting JIB's motion for summary judgment.

A
JIB filed two demurrers (dated Jan. 20, 2006, and May 26, 2006) to some, but not all, causes of action alleged in Gogri's original and first amended complaint. Following those demurrers, six operative causes of action remained for resolution in Gogri's first amended complaint.
On December 15, 2006, JIB filed a motion for summary judgment, arguing there were no triable issues of material fact regarding the six remaining causes of action, and it was entitled to judgment as a matter of law.[7] On February 2, 2007, Gogri filed his papers in opposition to JIB's motion for summary judgment. On February 9, JIB filed its reply to Gogri's opposition to its motion. On February 13, JIB filed an amended notice of motion, setting the hearing on its motion for summary judgment for February 27 or "as soon thereafter as the matter may be heard." That amended notice noted the trial court would issue a tentative ruling on JIB's motion by 4:00 p.m. "on the date preceding oral argument."
On February 22, Gogri filed a request for dismissal of his complaint without prejudice. The court clerk accepted it and entered the dismissal on that date. On February 23, JIB filed an ex parte application requesting Gogri's voluntary dismissal be vacated, apparently arguing it was untimely filed and the court should grant JIB's motion for summary judgment.
On February 26, an OSC was issued to determine whether Gogri's voluntary dismissal should be set aside. The OSC set a hearing for March 2 or "as soon thereafter as the matter may be heard."
Also on February 26, JIB filed a second amended notice of motion, setting the hearing on its motion for summary judgment for March 2 or "as soon thereafter as the matter may be heard." That second amended notice noted the trial court would issue a tentative ruling on JIB's motion by 4:00 p.m. "on the *264 date preceding oral argument." On March 1, the trial court issued its tentative ruling granting JIB's motion for summary judgment.
On March 2, the trial court conducted a hearing on the OSC and JIB's motion for summary judgment. Addressing the OSC first, the trial court stated its tentative ruling was to set aside Gogri's dismissal. After hearing arguments of counsel, the court explained that when Gogri requested the dismissal of his complaint, "the writing [was] on the wall, that ... it is about to be an unfavorable decision for [Gogri on JIB's motion for summary judgment]." The court also noted it considered the fact that it had sustained JIB's demurrers to some of Gogri's causes of action before he requested the voluntary dismissal of his complaint. The court then set aside Gogri's voluntary dismissal. Thereafter, the court heard arguments on, and then granted, JIB's motion for summary judgment.

B
Gogri asserts the trial court erred by vacating his section 581 voluntary dismissal of his complaint because it was filed before the court issued its tentative ruling on JIB's motion for summary judgment. Furthermore, citing Franklin, Gogri argues that at the time he filed his section 581 voluntary dismissal, there had not been any "public and formal indication" by the court regarding the merits of his case, and he had not committed any "procedural dereliction" that rendered a judgment against him inevitable or a mere formality. (Franklin, supra, 148 Cal.App.4th at p. 200.)
(5) Based on our independent consideration of the undisputed facts relevant to Gogri's section 581 voluntary dismissal of his complaint, we conclude his voluntary dismissal was timely filed under section 581 and therefore the trial court erred by vacating his dismissal and did not have jurisdiction to grant JIB's motion for summary judgment. Absent special circumstances that make an adverse judgment inevitable, a plaintiff's section 581 voluntary dismissal of an action is timely when, as in this case, it is filed before the trial court issues a tentative ruling granting the defendant's motion for summary judgment. In Zapanta, supra, 107 Cal.App.4th 1167, the plaintiffs filed a section 581 voluntary dismissal one day before their opposition to the defendants' motion for summary judgment was due. (107 Cal.App.4th at p. 1169.) Zapanta concluded the voluntary dismissal was timely filed and distinguished its facts from other cases, stating: "[N]one of the cases cited by respondents is dispositive. At the time appellants filed their [section 581] request for dismissal, the opposition to the summary judgment *265 motion was not past due, no hearing on the motion had been held and no tentative ruling or other decision tantamount to an adjudication had been made in respondents' favor. In other words, the case had not yet reached a stage where a final disposition was a mere formality." (Zapanta, supra, 107 Cal.App.4th at pp. 1173-1174, italics added.) Zapanta noted: "The purpose behind the right of a plaintiff to voluntarily dismiss a case under ... section 581 `is to allow a plaintiff a certain amount of freedom of action within the limits prescribed by the code.' [Citation.]" (Id. at p. 1174.)
In Mossanen v. Monfared (2000) 77 Cal.App.4th 1402 [92 Cal.Rptf.2d 459], the plaintiffs filed a section 581 voluntary dismissal after the defendants filed a motion for summary judgment but before the trial court ruled on the motion. (Mossanen, at pp. 1406-1407.) The trial court granted the defendants' request to vacate the dismissal and then granted their motion for summary judgment. (Id. at p. 1408.) On appeal, Mossanen concluded the trial court erred in vacating the plaintiffs' dismissal and granting the defendants' motion for summary judgment. (Id. at p. 1410.)
Similarly, in Tire Distributors, supra, 132 Cal.App.4th 538, the court held that a plaintiff's section 581 voluntary dismissal was timely even though it was filed just one day before the scheduled hearing on the defendant's motion for summary judgment. (Tire Distributors, at pp. 541-542, 547.) Although the plaintiff had not filed separate papers opposing a defendant's motion, the court nevertheless concluded the plaintiff's dismissal was timely because the plaintiff believed in good faith that defendant would be dismissed as part of a comprehensive settlement agreement with the other defendants. (Id. at pp. 541, 546-547.) Accordingly, Tire Distributors distinguished its facts from those in Cravens v. State Bd. of Equalization (1997) 52 Cal.App.4th 253 [60 Cal.Rptr.2d 436] (Cravens), which we discuss below.[8] (Tire Distributors, supra, 132 Cal.App.4th at p. 547.)
In Cal-Vada Aircraft, Inc. v. Superior Court (1986) 179 Cal.App.3d 435 [224 Cal.Rptr. 809] (Cal-Vada), the plaintiff (U.S. Fire Insurance Co.) filed an action for declaratory relief against the defendant (Cal-Vada). (Id. at p. 439.) The defendant, in turn, filed a cross-complaint against the plaintiff and another cross-defendant (Bussey). (Ibid.) The plaintiff filed a motion for summary judgment. (Ibid.) However, the trial court granted only summary *266 adjudication for the plaintiff on some, but not all, of the issues, concluding there remained a triable issue of material fact. (Ibid.) Prior to the commencement of trial on that remaining issue, the defendant filed a section 581 voluntary dismissal of its cross-complaint as to only cross-defendant Bussey. (Cal-Vada, at pp. 439-440.) The trial court set aside the dismissal and thereafter denied the defendant's motion for reconsideration, concluding its ruling on the plaintiff's motion for summary judgment constituted the commencement of the trial under section 581. (Cal-Vada, at p. 440.) The defendant then filed a petition for an alternative writ. (Ibid.) Cal-Vada phrased its question: "[W]hether a hearing on a motion for summary judgment followed by an order of summary adjudication on some, but not all, of the issues raised in a complaint is a `trial,' barring a plaintiff from filing a voluntary dismissal under section 581...." (Ibid., fn. omitted.) After reviewing three California Supreme Court cases involving demurrers, Cal-Vada concluded: "It is now clear it is the sustaining of a demurrer that brings the case to final disposition which constitutes commencement of the trial of law." (Id. at p. 443.) Cal-Vada noted that "while the [California Supreme Court] has not construed the nature of partial summary adjudications in context with the voluntary dismissal statute [i.e., section 581], it has held plaintiffs are barred from dismissal when a question of law which leads to the final determination, i.e., which will effectively dispose of the case, has been heard and determined accordingly." (Id. at p. 444, italics added.) Cal-Vada distinguished its facts from other cases involving summary judgments, stating: "A partial summary adjudication ... is unlike summary judgment precisely because it does not resolve all the issues in the case." (Id. at p. 445.) Accordingly, Cal-Vada concluded that for purposes of a section 581 voluntary dismissal "trial does not commence with the summary adjudication" of issues. (179 Cal.App.3d at p. 447.) Cal-Vada stated: "[A]s the summary adjudication statute contemplates, such proceedings do not constitute the `trial' which brings the action to the stage where final disposition can be made; they are not a trial of a question of law barring a plaintiff from voluntarily dismissing his action or a party to the action under section 581.... Unlike a summary judgment, the rights of the parties have not been determined here, and the matter must proceed to trial for that to occur. [¶] ... The trial court's resulting summary adjudication is in essence a denial of summary judgment, because a significant trial issue remained which, the court concluded, could not `be resolved by summary judgment.' Thus, the hearing on the motion did not result in the determination of the parties' rights and the matter had not gone to `trial.'" (Cal-Vada, supra, 179 Cal.App.3d at pp. 447-448.) Cal-Vada therefore concluded the defendant had a statutory right to dismiss its cross-complaint, depriving the trial court of further jurisdiction to act. (Id. at p. 448.) Accordingly, the court granted the writ petition. (Ibid.)
*267 In contrast, certain summary judgment cases that have held section 581 voluntary dismissals to be untimely filed involved either prior tentative rulings or other special circumstances making judgment for the defendant inevitable. (Mary Morgan, Inc. v. Melzark, supra, 49 Cal.App.4th at pp. 768-772 [plaintiff's voluntary dismissal untimely when filed after tentative ruling granting defendant's motion for summary judgment and after the hearing is continued]; Cravens, supra, 52 Cal.App.4th at pp. 255-257 [because plaintiff failed to timely file papers opposing the defendants' motion for summary judgment, judgment for defendants became a formality and therefore plaintiff's § 581 voluntary dismissal filed thereafter was untimely]; Sweat v. Hollister (1995) 37 Cal.App.4th 603, 614-615 [43 Cal.Rptr.2d 399] [§ 581 voluntary dismissal was untimely when filed after trial court issued a final, telephonic order granting the defendant's motion for summary judgment even though oral argument had not yet been heard], disapproved on another ground by Santisas v. Goodin (1998) 17 Cal.4th 599, 609 [71 Cal.Rptr.2d 830, 951 P.2d 399].) In Cravens, the court concluded that because the plaintiff failed to timely file papers opposing the defendants' motion for summary judgment, "[a]t that point, entry of summary judgment in favor of [the defendants] became a formality which [the plaintiff] could not avoid by the stratagem of filing a last minute request for dismissal without prejudice." (Cravens, supra, at p. 257.)
(6) In this case, Gogri filed his request for voluntary dismissal of his complaint on February 22, 2007. Although his dismissal was filed after JIB filed its motion for summary judgment and after Gogri filed his papers opposing that motion, his dismissal was filed before the trial court issued its tentative ruling on JIB's motion on March 1. Therefore, at the time Gogri filed his section 581 voluntary dismissal, there had yet to be any "public and formal indication" by the court regarding the merits of his case, and he had not committed any "procedural dereliction" (e.g., failure to timely oppose JIB's motion for summary judgment) that would have rendered a judgment against him inevitable or a mere formality.[9] (Franklin, supra, 148 Cal.App.4th at p. 200; cf. Cravens, supra, 52 Cal.App.4th at pp. 255-257.)
Alternatively stated, at the time Gogri filed his section 581 voluntary dismissal, the trial court had not yet made any decision or taken any other action that effectively disposed of the entire case (i.e., any action that was tantamount to, or would inevitably lead to, judgment for JIB). (Zapanta, supra, 107 Cal.App.4th at pp. 1173-1174; Cal-Vada, supra, 179 Cal.App.3d at pp. 443, 447; Cf. Kyle, supra, 71 Cal.App.4th at pp. 908-917 [plaintiff's § 581 *268 voluntary dismissal was timely when filed before the trial court ruled on the defendant's anti-SLAPP (strategic lawsuit against public participation) motion, which potentially would dispose of the entire case].) Accordingly, we conclude the trial court erred by vacating Gogri's section 581 voluntary dismissal of his complaint, and after that voluntary dismissal it did not have jurisdiction to grant JIB's motion for summary judgment. Because Gogri's timely section 581 voluntary dismissal deprived the trial court of further jurisdiction (except for the limited purpose of awarding costs and statutory attorney fees), the court's order granting JIB's motion for summary judgment and its subsequent judgment for JIB are both void. (Zapanta, supra, 107 Cal.App.4th at p. 1174; Shapell, supra, 132 Cal.App.4th at p. 1108; Harris, supra, 16 Cal.App.4th at p. 1405; Kyle, supra, 71 Cal.App.4th at p. 909.)

C
JIB contends Gogri's section 581 voluntary dismissal was untimely because summary judgment for JIB was inevitable at the time the dismissal was filed. JIB argues: "Gogri's factually devoid interrogatory responses plus his factually devoid deposition testimony established that, as a matter of law, Gogri had no evidence to support his case." However, because JIB does not provide any citation to the record on appeal showing Gogri did not have any evidence that arguably supported his case, we decline to accept JIB's conclusory assertion that summary judgment for JIB was inevitable at the time Gogri filed his voluntary dismissal. Similarly, JIB argues that because Gogri did not submit any admissible evidence in opposition to its motion for summary judgment, Gogri in effect did not file opposition papers to its motion, thereby making judgment for JIB inevitable. (Cf. Cravens, supra, 52 Cal.App.4th at pp. 255-257.) However, JIB again does not support its factual premise with any citation to the record. Rather, the record shows Gogri submitted evidence in opposition to JIB's motion for summary judgment and in support of his own motion for summary judgment, which evidence, on its face, is not wholly inadmissible.[10] In reply to Gogri's opposition papers, JIB did not object to all of Gogri's evidence. Rather, the record on appeal shows JIB objected, as inadmissible evidence, to only certain portions of Gogri's declaration submitted in support of his opposition to its motion for summary judgment.
*269 Furthermore, in ruling on JIB's motion, the trial court did not sustain JIB's objections to Gogri's declaration or, for that matter, any other evidence submitted by Gogri. We are not persuaded by JIB's appellate assertion that all of Gogri's evidence was inadmissible. In any event, JIB does not cite, and we have not found, any case holding that, for purposes of section 581 voluntary dismissals, a plaintiff's failure to file admissible evidence in opposition to a defendant's motion for summary judgment is equivalent to a failure to file any opposing papers. (Cf. Cravens, supra, 52 Cal.App.4th at pp. 255-257.) On this record, we decline to adopt JIB's proposed expansion of existing section 581 principles.[11]

D
(7) JIB alternatively contends that because the trial court granted its demurrers to some, but not all, of Gogri's causes of action before he filed his section 581 voluntary dismissal of his complaint, Gogri's dismissal was untimely filed. Citing Goldtree, supra, 135 Cal. 666, JIB argues the trial court's determination of its demurrers to some, but not all, of Gogri's causes of action constituted the commencement of a trial for purposes of section 581. Based on our review of section 581 case law, we conclude a trial is commenced for section 581 purposes when there is a determination of legal and/or factual issues that effectively disposes of the entire case. However, a determination on only some, but not all, of the causes of action alleged in a complaint does not effectively dispose of the entire case for purposes of section 581 voluntary dismissals. As noted above, Cal-Vada concluded that for purposes of a section 581 voluntary dismissal, "trial does not commence with the summary adjudication" of issues. (Cal-Vada, supra, 179 Cal.App.3d at p. 447.) Following summary adjudication of some, but not all, causes of action alleged in a complaint, there remain issues to be decided at trial and therefore summary adjudication does not constitute the commencement of trial for section 581 purposes. (Cal-Vada, at p. 447.) We discern no reason why that same reasoning should not apply to a trial court's ruling on a defendant's demurrers to some, but not all, causes of action alleged in the *270 plaintiff's complaint. Accordingly, the fact that the trial court in this case sustained JIB's demurrers to some, but not all, of Gogri's causes of action did not preclude him from thereafter timely filing a section 581 voluntary dismissal of his complaint. (Cal-Vada, at p. 447.)
Goldtree, cited by JIB, appears at first glance to support JIB's assertion. However, a close review of that case shows the "holding" on which JIB relies is dicta and unnecessary to the court's disposition. In Goldtree, the plaintiff's complaint alleged three causes of action. (Goldtree, supra, 135 Cal. at p. 667.) The defendant generally demurred to each cause of action. (Ibid.) The trial court sustained the demurrer as to two of the causes of action, but overruled it as to the third cause of action. (Ibid.) Thereafter, the trial court denied the plaintiff's oral request to dismiss the entire action, stating that a trial had already been had on two of the causes of action. (Ibid.) Nevertheless, the plaintiff later filed a voluntary dismissal of the action with the court clerk. (Ibid.) When that action was brought to the trial court's attention, the court ordered that the entry of dismissal be set aside and canceled. (Ibid.) The plaintiff then moved to dismiss, without prejudice, the third cause of action, which motion the court granted. (Id. at pp. 667-668.) On dismissal of the third cause of action, the defendant moved for judgment in his favor on the two remaining causes of action to which his demurrer had been sustained. (Id. at p. 668.) The court granted that motion and entered judgment for the defendant. (Ibid.) The plaintiff appealed both the order canceling the entry of his dismissal and the judgment on the demurrer. (Ibid.)
In determining whether the trial court erred by canceling the plaintiff's section 581 dismissal, Goldtree reviewed various nonsection 581 cases that discussed the effect of general demurrers. (Goldtree, supra, 135 Cal. at pp. 668-672.) Goldtree quoted language from Alley v. Nott (1884) 111 U.S. 472 [28 L.Ed. 491, 4 S.Ct. 495], in which the United States Supreme Court observed: "`[A general] demurrer to a complaint ... raises an issue which, when tried, will finally dispose of the case as stated in the complaint on its merits.... The trial of such an issue is the trial of the cause as a cause .... [I]f final judgment is entered on the [general] demurrer, it will be a final determination of the rights of the parties.... Under such circumstances, the trial of an issue raised by a demurrer which involves the merits of the action is, in our opinion, a trial of the action....'" (Goldtree, at p. 670, quoting Alley, at pp. 475-476.) In Goldtree, the California Supreme Court also cited its prior language in Tregambo v. Comanche M. and M. Co. (1881) 57 Cal. 501 that a determination of legal issues may be considered a trial and then stated: "We cannot see why it is not true ... [that] a general demurrer ... goes *271 directly to the determination of the rights of the parties and all rights involved in the complaint." (Goldtree, supra, at pp. 670-671, italics added.) After discussing cases from other jurisdictions, Goldtree adopted, as "a correct statement of the law as applied to" section 581, the principle that when a general demurrer is sustained with leave to amend, there has not yet been a conclusive determination of the litigation on its merits and therefore the order sustaining the demurrer lacks the quality of finality for a trial under section 581. (Goldtree, at p. 672.) Considering the question of a "trial" for purposes of section 581, Goldtree stated: "In our opinion [section 581] cannot be restricted in its meaning to trials of the merits after answer, for there may be such a trial on a general demurrer to the complaint as will effectually dispose of the case where the plaintiff has properly alleged all the facts which constitute his cause of action. If the demurrer is sustained, he stands on his pleading and submits to judgment on the demurrer, and, if not satisfied, has his remedy by appeal. In such a case, we think, there would be a trial within the meaning of [section 581], and the judgment would cut off the right of dismissal, unless it was first set aside or leave given to amend." (Goldtree, supra, 135 Cal. at pp. 672-673, italics added.) Without discussing the fact that in its case the trial court sustained the defendant's demurrer as to only two of the three causes of action alleged by the plaintiff, Goldtree then summarily concluded: "The clerk had no authority, therefore, to enter the dismissal, and being void the court rightly set it aside." (Id. at p. 673.)
Goldtree then addressed the plaintiff's contention that the trial court erred by sustaining the defendant's demurrer as to two of his three causes of action. (Goldtree, supra, 135 Cal. at p. 673.) Citing a case decided on the same day, Goldtree concluded: "Each of the first two counts of the complaint stated a cause of action, and the demurrer should have been overruled." (Ibid.) In its disposition of the appeal, Goldtree stated the order canceling the entry of dismissal was affirmed and the judgment for the defendant on the demurrer was reversed. (Ibid.)
Based on our review of Goldtree, it appears the Goldtree court reversed the sequence of its discussion of the two questions from the sequence necessary to dispose of the case. Had the court first addressed the demurrer question (i.e., the trial court's ruling sustaining the defendant's demurrer as to two of the three causes of action), it would not have had to address the section 581 question. Alternatively stated, had Goldtree first addressed and decided the trial court erred by sustaining, in part, the defendant's demurrer, Goldtree could have reversed that ruling and the resulting judgment based solely on that error, without addressing the trial court's subsequent order vacating the *272 plaintiff's section 581 voluntary dismissal. Because reversal of the trial court's ruling sustaining, in part, the defendant's demurrer to the plaintiff's causes of action would have effectively reversed all subsequent orders, including its order vacating the plaintiff's voluntary dismissal, Goldtree's discussion of that subsequent decision by the trial court was unnecessary to its decision.[12]
(8) "Only statements necessary to the decision are binding precedents...." (Western Landscape Construction v. Bank of America (1997) 58 Cal.App.4th 57, 61 [67 Cal.Rptr.2d 868].) "The doctrine of precedent, or stare decisis, extends only to the ratio decidendi of a decision, not to supplementary or explanatory comments which might be included in an opinion. To determine the precedential value of a statement in an opinion, the language of that statement must be compared with the facts of the case and the issues raised." (Ibid.) Considering the procedural background in Goldtree, we conclude Goldtree's discussion of the section 581 issue was unnecessary to its disposition of the appeal. Therefore, we are not bound by Goldtree's dicta in discussing and deciding the section 581 issue. (Western Landscape, at p. 61; Auto Equity Sales, Inc. v. Superior Court (1962) 57 Cal.2d 450, 456 [20 Cal.Rptr. 321, 369 P.2d 937].) (9) Furthermore, although we generally consider California Supreme Court dicta to be persuasive (Hubbard v. Superior Court (1997) 66 Cal.App.4th 1163, 1169 [78 Cal.Rptr.2d 819]), Goldtree's discussion of case law involving general demurrers that dispose of an entire case did not logically support its implicit conclusion that the trial court's ruling sustaining two of the three causes of action effectively disposed of the entire case and therefore constituted a trial for purposes of a subsequent section 581 voluntary dismissal. Because Goldtree's dicta regarding the section 581 issue does not, in our opinion, "reflect[] compelling logic," we decline to follow it.[13] (Hubbard v. Superior Court, supra, 66 Cal.App.4th at p. 1169.)
*273 Furthermore, not only was Goldtree's determination of the section 581 issue unnecessary to its disposition of the appeal, we also believe the California Supreme Court has, in effect, implicitly overruled that dicta. In Wells, the court subsequently stated, in parenthetical dicta, that a section 581 "right of voluntary dismissal, which is not barred until expiration of plaintiff's time to amend after the sustaining of the demurrer, would ... not be impaired prior to a decision sustaining the demurrer." (Wells, supra, 29 Cal.3d at pp. 789-790.) It is implicit within Wells's discussion that the court was referring to a decision sustaining a general demurrer to an entire complaint or action, and not (as in Goldtree) only to some, but not all, causes of action alleged in the complaint. We believe Wells set forth, albeit in dicta, the general principle that a section 581 voluntary dismissal is timely when filed before a decision sustaining a general demurrer to an entire complaint. In fact, citing Wells, the California Supreme Court subsequently stated: "[P]laintiffs had the right to dismiss the complaint without prejudice before any decision on the demurrer to the first amended complaint." (Christensen v. Dewor Developments (1983) 33 Cal.3d 778, 785 [191 Cal.Rptr. 8, 661 P.2d 1088].) Therefore, we believe it is implicit within Wells's dicta that a section 581 voluntary dismissal is likewise timely when filed after a decision sustaining a general demurrer only in part, leaving one or more causes of action for trial. (Cf. Cal-Vada, supra, 179 Cal.App.3d at p. 447 [regarding summary adjudication of some, but not all, causes of action].)
We conclude Goldtree does not require us to decide that Gogri's section 581 voluntary dismissal was untimely filed. The trial court's order sustaining JIB's demurrers to some, but not all, of Gogri's causes of action did not constitute a "commencement of trial" under section 581 that would preclude Gogri from subsequently filing a voluntary dismissal of his entire complaint.

III

Remaining Contentions
Because we have decided this appeal on the ground set forth above, we need not, and do not, address Gogri's substantive contention regarding the trial court's order granting JIB's motion for summary judgment. When Gogri timely filed his section 581 voluntary dismissal of his complaint without prejudice, he deprived the trial court of further jurisdiction in the matter (except, possibly, for the limited purpose of awarding costs and statutory attorney fees, as discussed below). (Zapanta, supra, 107 Cal.App.4th at p. 1174; Shapell, supra, 132 Cal.App.4th at p. 1108; Harris, supra, 16 *274 Cal.App.4th at p. 1405; Kyle, supra, 71 Cal.App.4th at p. 909.) Because the trial court did not have jurisdiction to decide the parties' summary judgment motions and grant JIB's motion for summary judgment or enter judgment for JIB, its order granting JIB's motion for summary judgment and judgment for JIB is void.
(10) Gogri also contends the trial court erred by awarding attorney fees to JIB because it had no jurisdiction to do so after he filed his section 581 voluntary dismissal of his complaint without prejudice. To the extent the trial court awarded JIB attorney fees incurred in defending against Gogri's contract causes of action, we agree. The trial court had no authority to award JIB Civil Code section 1717 attorney fees on Gogri's contract causes of action. (Civ. Code, § 1717, subd. (b)(2) ["Where an action has been voluntarily dismissed ..., there shall be no prevailing party for purposes of this section."]; Santisas v. Goodin, supra, 17 Cal.4th at pp. 614-619, 622 [contractual attorney fees may be recoverable by defendant in voluntary pretrial dismissal cases for defense of tort, but not contract, causes of action]; Rosen v. Robert P. Warmington Co. (1988) 201 Cal.App.3d 939, 941-944 [247 Cal.Rptr. 635] [following plaintiff's § 581 voluntary dismissal with prejudice of entire action, defendant was not entitled to award of Civ. Code, § 1717 attorney fees as prevailing party].) Santisas stated: "Under [Civil Code] section 1717, the seller defendants are not `part[ies] prevailing on the contract' because that section specifies that there is no party prevailing on the contract when, as here, the plaintiffs have voluntarily dismissed the action, and therefore defendants may not recover the attorney fees they incurred in the defense of the contract claim. But this conclusion does not affect the seller defendants' right to recover as costs the attorney fees they incurred in defense of the tort claims. Because [Civil Code] section 1717 does not apply to those claims [citations], it does not bar recovery of attorney fees that were incurred in litigation of those claims and that are otherwise recoverable as a matter of contract law." (Santisas, supra, at p. 619.) Therefore, under Santisas, JIB could recover, at most, those attorney fees incurred in defending against Gogri's noncontract (e.g., tort or statutory) causes of action.
Because the amount of the fees incurred by JIB in defending against Gogri's contract and noncontract causes of action are not plainly shown in the record on appeal and the trial court awarded JIB attorney fees in defending against all of Gogri's causes of action, the court's order awarding attorney fees to JIB must be reversed and remanded for further proceedings (e.g., an amended request by JIB for an award of attorney fees in defending against Gogri's noncontract causes of action and a determination by the trial court of what, if any, attorney fees JIB should be awarded).


*275 DISPOSITION
The judgment is reversed and the matter is remanded with directions that the trial court enter a new order vacating its order setting aside Gogri's voluntary dismissal and to conduct further proceedings consistent with this opinion.
McIntyre, J., and O'Rourke, J., concurred.
NOTES
[1]  Although the record on appeal filed by the parties unfortunately does not contain a copy of the original complaint filed by Gogri, the judgment entered in this case reflects that the eighth and ninth causes of action originally alleged fraud and racketeering, but, after JIB's demurrers to those causes of action were sustained without leave to amend, were replaced in Gogri's first amended complaint by the causes of action described above.
[2]  The record on appeal filed by the parties does not contain copies of JIB's demurrers. However, because the judgment entered in this case discusses JIB's demurrers and the trial court's disposition, and the record contains copies of the court's tentative rulings, dated January 20, 2006, and May 26, 2006, sustaining JIB's demurrers to those causes of action, we assume for purposes of this appeal that JIB demurred to certain causes of action alleged in the original and first amended complaints.
[3]  All further statutory references are to the Code of Civil Procedure unless otherwise specified.
[4]  Section 581 provides in relevant part: "(b) An action may be dismissed in any of the following instances: [¶] (1) With or without prejudice, upon written request of the plaintiff to the clerk, filed with papers in the case, or by oral or written request to the court at any time before the actual commencement of trial, upon payment of the costs, if any. [¶]... [¶] (c) A plaintiff may dismiss his or her complaint, or any cause of action asserted in it, in its entirety, or as to any defendant or defendants, with or without prejudice prior to the actual commencement of trial." (Italics added.)
[5]  "A section 581 dismissal `is available to [a] plaintiff as a matter of right and is accomplished by filing with the clerk a written request therefor. If in proper form, the dismissal is effective immediately.' [Citation.]" (S. B. Beach Properties v. Berti (2006) 39 Cal.4th 374, 380 [46 Cal.Rptr.3d 380, 138 P.3d 713].)
[6]  Tire Distributors, Inc. v. Cobrae (2005) 132 Cal.App.4th 538, 544 [33 Cal.Rptr.3d 761] (Tire Distributors), concluded that a trial court's determination whether section 581 applies generally should be reviewed on appeal for abuse of discretion. However, to the extent its conclusion applies to a trial court's application of section 581 to undisputed facts, we believe it is inconsistent with established appellate principles to apply an abuse of discretion standard in reviewing a trial court's determination of a question of law (i.e., application of a statute to undisputed facts). Because a plaintiff generally has an absolute right under section 581 to voluntarily dismiss an action before commencement of trial (Wells, supra, 29 Cal.3d at p. 784), which dismissal, if timely, deprives the trial court of jurisdiction in the case (ibid.), the independent standard, and not the abuse of discretion standard, should apply in reviewing on appeal a trial court's determination of the question of law whether section 581 applies to undisputed facts. (Because neither party asserts the relevant facts on this question are disputed, we do not address whether the substantial evidence or abuse of discretion standard would apply in reviewing a trial court's application of section 581 to disputed facts.)
[7]  As noted above, on December 18, 2006, Gogri also filed his own motion for summary judgment.
[8]  To the extent Tire Distributors concludes the timeliness of a section 581 voluntary dismissal "depends on the plaintiff's motivation and intent in dismissing his complaint" (Tire Distributors, supra, 132 Cal.App.4th at p. 546), we believe that an objective, not a subjective, standard should apply in determining the timeliness of a section 581 voluntary dismissal.
[9]  Although we do not adopt Franklin's description of its "mere formality" test as the exclusive test for determining the timeliness of a section 581 voluntary dismissal, we believe it is a sufficiently accurate "rule of thumb" for application of section 581 to the undisputed facts in this case.
[10]  The record on appeal appears to be incomplete. JIB's reply to Gogri's opposition includes its reply to his separate statement in response to its separate statement of undisputed material facts in support of its motion. Although JIB refers to Gogri's separate statement, the record on appeal apparently does not include that separate statement or the evidence Gogri cited. Similarly, although the record on appeal includes JIB's response to Gogri's additional undisputed facts submitted in opposition to its motion for summary judgment, the record apparently does not include his additional undisputed facts or the evidence Gogri cited. However, based on our review of JIB's reply and response to Gogri's opposition, we infer that Gogri did submit evidence in opposition to JIB's motion for summary judgment.
[11]  To the extent JIB argues Gogri's section 581 voluntary dismissal should be deemed untimely because it was a last-minute tactic "designed to wipe the slate clean of all his discovery abuses" and to avoid an inevitable summary judgment against him, we conclude, based on our adopted "objective" standard for determining the timeliness of a section 581 voluntary dismissal, that Gogri's subjective reasons for his dismissal are not determinative, if relevant at all. Furthermore, JIB has not shown that summary judgment for JIB was, in fact, inevitable for purposes of section 581. Considering the extensive summary judgment papers filed by both parties, we cannot conclude that, prior to the trial court's tentative ruling, it was inevitable the court would grant JIB's motion and enter judgment for JIB. Alternatively stated, at the time Gogri filed his section 581 dismissal, it was not a mere formality, based on any "procedural dereliction" by Gogri or otherwise, that judgment would be entered for JIB. (Franklin, supra, 148 Cal.App.4th at pp. 200, 204.)
[12]  Furthermore, we note that had the trial court correctly overruled the defendant's demurrer, the plaintiff presumably never would have had any reason to file a section 581 voluntary dismissal. Therefore, had the trial court not erred by sustaining, in part, the defendant's demurrer, it never would have had occasion to decide whether to vacate the plaintiff's dismissal. Therefore, Goldtree's discussion of the section 581 voluntary dismissal issue was dicta as unnecessary to its disposition.
[13]  However, in so doing, we do not disagree with Goldtree's apparent conclusion that a general demurrer to an entire complaint, if sustained without leave to amend, constitutes a final disposition of the entire case and therefore a "trial" for section 581 purposes. We part with Goldtree when it summarily applies that general principle to facts involving a ruling sustaining a demurrer only in part, leaving a cause of action yet to be tried. In those circumstances, we believe a "trial," or effective disposition of the entire case, has not been conducted for section 581 purposes.
