Re: Something similar to Struts nested:iterate tag?

2006-04-04 Thread Bjørn T Johansen
On Mon, 3 Apr 2006 22:44:04 -0700
Craig McClanahan [EMAIL PROTECTED] wrote:

 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/


I.e. using just one cell in a datatable is not a solution
I'll have a look at that Repeater then... Thx... :)


BTJ


Re: Something similar to Struts nested:iterate tag?

2006-04-04 Thread Mike Kienenberger
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?

I don't know what a nested:iterate tag is, but you might take a look
at Tomahawk's dataList.   This component iterates over a list of data,
and (in simple mode) outputs no html itself.  In effect, it's the
customized renderer for the UIData component that encapsulates
iteration for the standard table component except that it doesn't use
column tags.


Re: Something similar to Struts nested:iterate tag?

2006-04-04 Thread Matthias Wessendorf
Right, dataList is similar to that what you requested.

Under [1] you'll find an example of that component

[1] http://www.irian.at/myfaces/dataList.jsf

On 4/4/06, Mike Kienenberger [EMAIL PROTECTED] wrote:
 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?

 I don't know what a nested:iterate tag is, but you might take a look
 at Tomahawk's dataList.   This component iterates over a list of data,
 and (in simple mode) outputs no html itself.  In effect, it's the
 customized renderer for the UIData component that encapsulates
 iteration for the standard table component except that it doesn't use
 column tags.



--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com


Re: Something similar to Struts nested:iterate tag?

2006-04-03 Thread Bjørn T Johansen
Anyone?

On Sun, 2 Apr 2006 18:29:04 +0200
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?
 
 
 Regards,
 
 BTJ
 


Re: Something similar to Struts nested:iterate tag?

2006-04-03 Thread Craig McClanahan
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 htmlcomponents? 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,BTJCraig[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---