开发者

Spark Mvc2 RC layout issue

I got Application.spark and home.spark views.

If layout has:

<span><use content="view" /></span>

And home has:

#RenderPartial("partial")

And partial has:

<div>test</div>    

Then rendered output will be:

<div>test</div><span></span>

Any ideas what's wrong?

Using this spark version with updated System.Web.Mvc assembly.


It seems开发者_开发百科 that

#Html.RenderPartial(...)

Makes problems.


------ Test started: Assembly: Spark.Web.Mvc2.Tests.dll ------

TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.FuturesRenderActionCanRunThroughItsProcess' not executed: Futures assembly Microsoft.Web.Mvc not referenced by ASP.NET MVC 2 preview build

TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn' failed: Expected: "hello" But was: <hello> D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(245,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.HtmlHelperWorksOnItsOwn()

TestCase 'Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect' failed: Looking for

two

Expected: greater than or equal to 0 But was: -1 D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(155,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.ContainsInOrder(String content, String[] values) D:\Resources\CodeLibraries\Spark\subdigital-spark-b1ee7ee\src\Spark.Web.Mvc2.Tests\SparkViewFactoryTester.cs(347,0): at Spark.Web.Mvc.Tests.SparkViewFactoryTester.RenderPartialOrderCorrect()

68 passed, 2 failed, 1 skipped, took 67,59 seconds (NUnit 2.4).

This test fails

    [Test]
    public void RenderPartialOrderCorrect()
    {

        FindViewAndRender("renderpartial-ordercorrect", "ajax");
        //mocks.VerifyAll();

        var content = output.ToString();
        ContainsInOrder(content,
                        "<p>one</p>",
                        "<p>two</p>",
                        "<p>three</p>");
    }


Temporary adding viewContextWrapper seems like a solution.


Yap... it's cool now. Including intellisense.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜