Apache Wicket 8.x Reference Guide
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 13.2. The ListView Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the parent markup as if it was its own. 13.2. The ListView Component As its name suggests, component org.apache.wicket.markup.html.list.ListView is designed to display a given list of objects which which can be provided as a standard Java List or as a model containing the concrete List. ListView iterates over the list and creates a child component of type org.apache.wicket.markup.html.list.ListItem0 码力 | 350 页 | 9.95 MB | 1 年前3Apache Wicket 7.x Reference Guide
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 13.2. The ListView Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the parent markup as if it was its own. 13.2. The ListView Component As its name suggests, component org.apache.wicket.markup.html.list.ListView is designed to display a given list of objects which which can be provided as a standard Java List or as a model containing the concrete List. ListView iterates over the list and creates a child component of type org.apache.wicket.markup.html.list.ListItem0 码力 | 346 页 | 10.00 MB | 1 年前3Apache Wicket 10.x Reference Guide
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 13.2. The ListView Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the parent markup as if it was its own. 13.2. The ListView Component As its name suggests, component org.apache.wicket.markup.html.list.ListView is designed to display a given list of objects which which can be provided as a standard Java List or as a model containing the concrete List. ListView iterates over the list and creates a child component of type org.apache.wicket.markup.html.list.ListItem0 码力 | 336 页 | 7.16 MB | 1 年前3Apache Wicket 9.x Reference Guide
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 13.2. The ListView Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the parent markup as if it was its own. 13.2. The ListView Component As its name suggests, component org.apache.wicket.markup.html.list.ListView is designed to display a given list of objects which which can be provided as a standard Java List or as a model containing the concrete List. ListView iterates over the list and creates a child component of type org.apache.wicket.markup.html.list.ListItem0 码力 | 335 页 | 7.15 MB | 1 年前3Django 官方教程翻译项目
import generic 7. 8. from .models import Choice, Question 9. 10. 11. class IndexView(generic.ListView): 12. template_name = 'polls/index.html' 13. context_object_name = 'latest_question_list' 'polls/results.html' 28. 29. 30. def vote(request, question_id): 31. ... # 像上面一样保存 我们在这里使用两个通用视图: ListView 和 DetailView。这两个视图分别抽象“显示一个对象 列表”和“显示一个特定类型对象的详细信息页面”这两种概念。 每个通用视图需要知道它将作用于哪个模型。 这由 model 属性提供。 这确保results视图和detail 视图在渲染时具有不同的外观,即使它们在后台都是同一个 DetailView。 类似地,ListView 使用一个叫做 “/ _detail.html” 的默认模板; 我们使用 template_name 来告诉 ListView 使用已经存在的 “polls/index.html” 模板。 在之前的教程中,提供模板文件时都带有一个包含 0 码力 | 103 页 | 1.86 MB | 1 年前3Django 1.8.x Documentation
from django.views import generic from .models import Choice, Question class IndexView(generic.ListView): template_name = 'polls/index.html' context_object_name = 'latest_question_list' def html' def vote(request, question_id): ... # same as above We’re using two generic views here: ListView and DetailView. Respectively, those two views abstract the concepts of “display a list of objects” DetailView behind the scenes. Similarly, the ListView generic view uses a default template called/ _list.html; we use template_name to tell ListView to use our existing "polls/index.html" 0 码力 | 2454 页 | 2.85 MB | 1 年前3Django 3.0.x Documentation
extensions Django’s default logging configuration Pagination The Paginator class Example Paginating a ListView Using Paginator in a view function Security in Django Cross site scripting (XSS) protection Cross from django.views import generic from .models import Choice, Question class IndexView(generic.ListView): template_name = 'polls/index.html' context_object_name = 'latest_question_list' def question_id): ... # same as above, no changes needed. We’re using two generic views here: ListView and DetailView. Respectively, those two views abstract the concepts of “display a list of objects”0 码力 | 3085 页 | 2.95 MB | 1 年前3Django 4.2.x Documentation
Security implications Configuring logging Pagination The Paginator class Example Paginating a ListView Using Paginator in a view function Security in Django Cross site scripting (XSS) protection Cross from django.views import generic from .models import Choice, Question class IndexView(generic.ListView): template_name = "polls/index.html" context_object_name = "latest_question_list" def question_id): ... # same as above, no changes needed. We’re using two generic views here: ListView and DetailView. Respectively, those two views abstract the concepts of “display a list of objects”0 码力 | 3305 页 | 3.16 MB | 1 年前3Django 4.1.x Documentation
Security implications Configuring logging Pagination The Paginator class Example Paginating a ListView Using Paginator in a view function Security in Django Cross site scripting (XSS) protection Cross from django.views import generic from .models import Choice, Question class IndexView(generic.ListView): template_name = 'polls/index.html' context_object_name = 'latest_question_list' def question_id): ... # same as above, no changes needed. We’re using two generic views here: ListView and DetailView. Respectively, those two views abstract the concepts of “display a list of objects”0 码力 | 3240 页 | 3.13 MB | 1 年前3Django 4.0.x Documentation
Security implications Configuring logging Pagination The Paginator class Example Paginating a ListView Using Paginator in a view function Security in Django Cross site scripting (XSS) protection Cross from django.views import generic from .models import Choice, Question class IndexView(generic.ListView): template_name = 'polls/index.html' context_object_name = 'latest_question_list' def question_id): ... # same as above, no changes needed. We’re using two generic views here: ListView and DetailView. Respectively, those two views abstract the concepts of “display a list of objects”0 码力 | 3184 页 | 3.14 MB | 1 年前3
共 63 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7