ui:param ... and caching

I have the following thing:

<ui:param name="randomVideo" value="#{bean.randomVideo}" />
<a href="#{randomVideo.link}">#{randomVideo.text}</a>

Because <ui:param> does not cache the variable, Bean.getRandomVideo() is called twice, and the worst part is that the .text and .link are from different videos. I have already tried <c:set and <f:param. They both do not set the variable, maybe because I'm with facelets (JSF2).

Any ideas?

RichFaces presentation

This is a lecture I presented that is part of the JavaEE course.

The presentation was prepared by Radoslav Ivanov.

Exercises: RichFacesJSF1.2 project for eclipse
Installation: eclipse -> import -> existing project into workspace -> archive -> finish

Richfaces installation instructions for Eclipse in the presentation (ppt).