当我在xhtml页面中使用下一个代码时
<p:repeat value="#{mybeanView.usernames}" var="username" >
<h:outputText value="#{username}" />
</p:repeat>
它记录下一条消息( INFO 和 WARNING )
谁能解释为什么?
以及如何删除(或解决)这些警告?
[WARNING ]
**Unsupported component-family/renderer-type**:
org.primefaces.component/org.primefaces.component.UIRepeatRenderer
[INFO]
SRVE0292I: Servlet Message - [ElizaTourism]:
.**No Renderer found for component** {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /admin/tourism/pushNotification.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_9][Class: org.primefaces.component.tabview.TabView,Id: mainTabView][Class: org.primefaces.component.tabview.Tab,Id: scheduledNotifications][Class: javax.faces.component.html.HtmlForm,Id: scheduledNotificationsForm][Class: org.primefaces.component.datatable.DataTable,Id: scheduledNotificationsTable][Class: org.primefaces.component.column.Column,Id: j_id_4a][Class: org.primefaces.component.repeat.UIRepeat,Id: j_id_4c]} (component-family=org.primefaces.component, renderer-type=org.primefaces.component.UIRepeatRenderer) created from: xxx.xhtml at line 246 and column 79
[WARNING ]
**No Renderer found for component** {Component-Path : [Class:
javax.faces.component.UIViewRoot,ViewId: xxx.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_9][Class: org.primefaces.component.tabview.TabView,Id: mainTabView][Class: org.primefaces.component.tabview.Tab,Id: scheduledNotifications][Class: javax.faces.component.html.HtmlForm,Id: scheduledNotificationsForm][Class: org.primefaces.component.datatable.DataTable,Id: scheduledNotificationsTable][Class: org.primefaces.component.column.Column,Id: j_id_4a][Class: org.primefaces.component.repeat.UIRepeat,Id: j_id_4c]} (component-family=org.primefaces.component, renderer-type=org.primefaces.component.UIRepeatRenderer) created from: xxx.xhtml at line 246 and column 79
1 回答
我想你应该使用
<c:foreach>
JSTL
<c:forEach>
是视图构建时标记(<ui:repeat>
是视图渲染时间标记) .另见:ui:repeat JSF 2.0 cannot render iterate p:row primefaces