0

f:view 内のすべて<f:view rendered="#{p.statusmsg!=null}"><f:view rendered="#{p.picstatus!=null}">実行<f:view rendered="#{p.videostatus!=null}">され、 statusmsg、picstatus または videostatus の値が null であるかどうかに関係なく実行されます。

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>
4

1 に答える 1

4

には属性が<f:view> ありません。rendered

この属性は、ベースのタグでのみサポートされUIComponentます。これは、ライブラリのすべてのタグと、を含むいくつかのh:ライブラリのタグです。ui:<ui:fragment>

に置き換えるだけ<f:view>です<ui:fragment>

以下も参照してください。

于 2013-03-03T14:05:23.193 に答える