首页 \ 问答 \ 在哪里下载java ee

在哪里下载java ee

在哪里下载java ee?我去官网下载java ee ,出来的是glassfish。。。
更新时间:2023-01-11 09:01

最满意答案

这个帮助者有6个重载

  1. @Html.EditorForModel()

    呈现~/Views/Shared/EditorTemplates/TypeName.cshtml模板,其中TypeName是视图模型的确切类型名称。 如果你的视图模型是一个集合(即IEnumerable<TypeName>IList<TypeName>TypeName[] ,...),ASP.NET MVC将自动为集合的每个元素渲染相应的编辑器模板。 您不需要在视图中编写任何循环来实现这一点。 它由框架为您处理。

  2. @Html.EditorForModel("templatename")

    渲染~/Views/Shared/EditorTemplates/templatename.cshtml而不是依靠约定

  3. @Html.EditorForModel(new { Foo = "bar" })

    渲染默认的编辑器模板,但传递一个额外的视图数据,它可以在ViewData["foo"]ViewBag.Foo

  4. @Html.EditorForModel("templatename", new { Foo = "bar" })

    渲染~/Views/Shared/EditorTemplates/templatename.cshtml而不是依赖约定,并将其他视图数据传递给它,以便在ViewData["foo"]ViewBag.Foo

  5. @Html.EditorForModel("templatename", "fieldprefix")

    渲染~/Views/Shared/EditorTemplates/templatename.cshtml而不是依赖约定并修改此模板中的导航上下文,这意味着例如如果您在此内部有@Html.TextBoxFor(x => x.FooBar)调用模板你会得到name="fieldprefix.FooBar"而不是name="FooBar"

  6. @Html.EditorForModel("templatename", "fieldprefix", new { Foo = "bar" })

    渲染~/Views/Shared/EditorTemplates/templatename.cshtml而不是依赖约定并修改此模板中的导航上下文,这意味着例如如果您在此内部有@Html.TextBoxFor(x => x.FooBar)调用你将获得name="fieldprefix.FooBar"而不是name="FooBar" 。 它还传递了一个额外的视图数据,它可以在ViewData["foo"]ViewBag.Foo

备注:模板系统将首先在~/Views/XXX/EditorTemplates中查找模板,其中XXX是为此视图提供服务的控制器的名称,如果未找到它,它将查找~/Views/Shared/EditorTemplates 。 这可以允许更精细地调整模板。 您可以在共享文件夹中拥有默认模板,并且可以基于每个控制器进行覆盖。


There are 6 overloads of this helper:

  1. @Html.EditorForModel()

    Renders the ~/Views/Shared/EditorTemplates/TypeName.cshtml template where TypeName is the exact type name of your view model. If your view model is a collection (i.e. IEnumerable<TypeName>, IList<TypeName>, TypeName[], ...) ASP.NET MVC will automatically render the corresponding editor template for each element of the collection. You don't need to be writing any loops in your views for that to happen. It is handled by the framework for you.

  2. @Html.EditorForModel("templatename")

    Renders ~/Views/Shared/EditorTemplates/templatename.cshtml instead of relying on the convention

  3. @Html.EditorForModel(new { Foo = "bar" })

    Renders the default editor template but passes an additional view data to it that you could use inside with ViewData["foo"] or ViewBag.Foo

  4. @Html.EditorForModel("templatename", new { Foo = "bar" })

    Renders ~/Views/Shared/EditorTemplates/templatename.cshtml instead of relying on the convention and passes an additional view data to it that you could use inside with ViewData["foo"] or ViewBag.Foo

  5. @Html.EditorForModel("templatename", "fieldprefix")

    Renders ~/Views/Shared/EditorTemplates/templatename.cshtml instead of relying on the convention and modifies the navigational context inside this template, meaning that for example if you had an @Html.TextBoxFor(x => x.FooBar) call inside this template you would get name="fieldprefix.FooBar" instead of name="FooBar"

  6. @Html.EditorForModel("templatename", "fieldprefix", new { Foo = "bar" })

    Renders ~/Views/Shared/EditorTemplates/templatename.cshtml instead of relying on the convention and modifies the navigational context inside this template, meaning that for example if you had an @Html.TextBoxFor(x => x.FooBar) call inside this template you would get name="fieldprefix.FooBar" instead of name="FooBar". It also passes an additional view data to it that you could use inside with ViewData["foo"] or ViewBag.Foo

Remark: The templating system will first look for templates in ~/Views/XXX/EditorTemplates where XXX is the name of the controller that served this view and if it doesn't find it will look into ~/Views/Shared/EditorTemplates. This could allow for more fine-grained tweaking of the templates. You could have default templates in the shared folder that could be overridden per controller basis.

相关问答

更多