2 Replies Latest reply on Jun 20, 2007 6:45 AM by gothmog

    jsf iteration and seam scopes

      Hi,

      I've looked hard but can't find a simple way to iterate over some html in a jsf page (say using jsf facelets) using a backing object stored in a seam (say) conversation scope.

      I have custom html so I can't use standard components and I want to avoid the overhead of writing my own component, the html is very simple, I just want simple iteration in a jsf - seam integrated page.

      Will using the JSTL tag <c:foreach> be able to find an object in seam conversation scope? and if not how does one solve iteration over custom html without writing a component in jsf - seam integration?

      Thanks

      Troy

        • 1. Re: jsf iteration and seam scopes
          sammy8306

          Uhm, I guess:

          <ui:repeat value="#{el-expr-to-conversational-object}" var="itervar">
           .. do stuff with itervar ..
          </ui:repeat>
          


          Where the ui namespace should point to the Facelets tag library. This way, everything nested inside the repeat is... well, repeated, bringing the current element of the collection you are iterating over in scope for each iteration.

          Is this what you're looking for?

          • 2. Re: jsf iteration and seam scopes

            Yep, thanks, really easy when you know!!