Reputation: 918
Everything inside f:view <f:view rendered="#{p.statusmsg!=null}">
,<f:view rendered="#{p.picstatus!=null}">
and <f:view rendered="#{p.videostatus!=null}">
is getting executed whether the value of statusmsg,picstatus or videostatus is null or not
1)getMoreStatusUpdate.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head></h:head>
<h:body>
<div id="content">
<h:form>
<ui:repeat var="p" value="#{statusBean.moreStatusList}">
<f:view rendered="#{p.statusmsg!=null}">
//Status content
</f:view>
<f:view rendered="#{p.picstatus != null}">
//Picture Status Content
</f:view>
<f:view rendered="#{p.videostatus != null}">
//Video Status Content
</f:view>
</ui:repeat>
</h:form>
</div>
</h:body>
Upvotes: 0
Views: 1793
Reputation: 1108537
The <f:view>
doesn't have a rendered
attribute.
This attribute is only supported on UIComponent
based tags, which is all tags of the h:
library and a few of the ui:
library including <ui:fragment>
.
Just replace <f:view>
by <ui:fragment>
.
Upvotes: 4