0

This is driving me crazy. The following ui:composition is included in the main page using ui:include and renders images based on the List of random profile IDs provided however, using the same value of the profile ID in the command link is being rendered with the value of another profile ID from the list so clicking on an image a page displaying a completely different profile. Help!

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

Would really appreciate you help. I've tried debugging but this just doesnt make sense. I'm sure i'm not seeing the obvious.

Ectomorph
  • 94
  • 10

0 Answers0