On 4/2/06, Bjørn T Johansen <[EMAIL PROTECTED]> wrote:
Does there exist something similar to <nested:iterate> tag in myfaces/jsf?
Or should one use a datatable with just one row and and one column and populate this cell with html
components? Or is there another way?

IIRC, the ADF Faces library has a component that is analogous to the JSTL <c:forEach> tag, which could be used for this type of thing (but avoids the JSP/JSF interoperability problems in JSF 1.0 /1.1 that are cured in JSF 1.2).

Another approach would be to create a customized renderer for the UIData component that encapsulates iteration for the standard table component.  The JSF RI download[1], available under a CDDL license, includes some demo components and renderers ... one of which is a "Repeater" that is a renderer designed to be subclassed and specialized ... you override a protected method to do whatever you want at the beginning and end of each row, as well as the beginning and end of each column.  The default implementation behaves like the standard renderer (it emits <tr> around each row and <td> around each column), but this can be easily customized for your particular use case.

The advantage of this approach is you get to focus on tweaking just the markup, without having to get inside all the complexity of the UIData component itself.  Trust me, you'll be *much* happier not to have to do that :-).

Regards,

BTJ

Craig

[1] https://javaserverfaces.dev.java.net/

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

[EMAIL PROTECTED]
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

Reply via email to