JSF <ui:include =“”> commandlink和graphicImage不使用相同的值

时间:2016-04-30 06:04:05

标签: jsf primefaces tomee uiinclude

这让我发疯了。以下ui:composition包含在主页面中,使用ui:include并根据提供的随机配置文件ID列表呈现图像,但是,使用命令链接中的配置文件ID的相同值将使用另一个配置文件的值进行呈现列表中的ID,因此单击图像显示完全不同的配置文件的页面。救命啊!

<h:form>        
<ui:repeat value="#{profilesService.getRandomProfileIds(n)}" var="randomProfileId">
    <p:commandLink title="Profile #{randomProfileId}" action='#{viewProfileView.viewProfile(randomProfileId, null)}'>
        <p:graphicImage title="Profile #{randomProfileId}" id="profileImage" cache="false" style="height:100px;"                        
                            value="/ImgServlet?id=#{imageHelper.getPrimaryProfileImageId(randomProfileId)}&amp;comp"/>
    </p:commandLink> 
    <p:tooltip id="toolTipTrack" for="profileImage" value="#{randomProfileId}" trackMouse="true" />
</ui:repeat>   

真的很感谢你的帮助。我试过调试,但这没有意义。我确定我没有看到明显的。

0 个答案:

没有答案