Mike, Thanks. You suggestions make a lot of sense. I can see how to subclass a datalist. As with adding a layout type - I have not finished scaling the learning curve yet. I don't know when I will be able to get around learning component creation with the project deadline pressing on me right now. I like to participate eventually, as I really enjoyed the open source community.
Anyway subclassing datalist will have to do for me for now. Maybe somebody can pickup the idea and implement it in Myfaces soon? Regards, Yee -----Original Message----- From: Mike Kienenberger [mailto:[EMAIL PROTECTED] Sent: Thursday, 3 November 2005 12:38 AM To: MyFaces Discussion; [EMAIL PROTECTED] Subject: Re: PanelGrid with dynamic amount of items Yee, This would probably make more sense as an additional layout type for dataList, or as a subclass of dataList, since it deals with formatting a list of data in arbitrary ways. However, as with most open source projects, new features are most likely to be implemented by the person who needs the functionality rather than by those who don't. Maybe you could provide a patch implementing this behavior? On 11/2/05, Yee CN <[EMAIL PROTECTED]> wrote: > I like to propose a new component for Myfaces - t:repeater. It will allow a > linear list of objects to be displayed in tabular form. The objects can be > arranged in horizontal orientation. i.e. > > 1 2 3 > 4 5 6 > 7 8 9 > > Or in vertical orientation, i.e. > > 1 4 7 > 2 5 8 > 3 6 9 > > This is a control available in ASP.NET that I find very handy. > > It is a special case for t:columns, and I believe can be implemented on top > of t:columns quite easily. > > Regards, > Yee > > -----Original Message----- > From: Mike Kienenberger [mailto:[EMAIL PROTECTED] > Sent: Thursday, 3 November 2005 12:09 AM > To: MyFaces Discussion > Subject: Re: PanelGrid with dynamic amount of items > > Instead of dataTable, have you considered using t:dataList with > layout=simple? It's probably the best JSF replacement for c:forEach. > > As for t:columns, consider it as a dataTable within a dataTable, only > the data is displayed horizontally rather than vertically. > Internally, it's just a UIData component just like dataTable or > dataList. > > -Mike > > On 11/1/05, Sven Haiges <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > I would like to render a panelGrid with an dynamic amount of items in > > it. The items should be bound to a managed bean variable and based on > > the database result, the display should adapt. > > > > PanelGrid worked fine with a static number of items, but how can I add > > a dynamic number of items. I know there are problems with c:forEach, > > that's probably why the example of my code below also does not work.... > > > > > > Any help is appreciated! > > > > (one sec: I just got the idea to add the components on the server side, > > ok, but isn't there an easy solution that i can just do in my jsp > > page?) > > > > Cheers, > > Sven > > > > <h:panelGrid columns="4" frame="border"> > > > > <c:forEach var='product' > items='#{productSearchBean.queryResults}'> > > <h:outputText styleClass="contentRight" > > value="#{product.orderNumber}"/> <f:verbatim> - </f:verbatim> > > <h:outputText styleClass="contentRight" > > value="#{product.description.titleEN}" rendered="#{view.locale.language > > eq 'en'}" /> > > <h:outputText styleClass="contentRight" > > value="#{product.description.titleDE}" rendered="#{view.locale.language > > eq 'de'}" /> > > <h:outputText styleClass="contentRight" > > value="#{product.description.titleFR}" rendered="#{view.locale.language > > eq 'fr'}" /> > > <h:outputText styleClass="contentRight" > > value="#{product.description.titleES}" rendered="#{view.locale.language > > eq 'es'}" /> > > </c:forEach> > > > > </h:panelGrid> > > --- > > Sven Haiges > > [EMAIL PROTECTED] > > > > TEL +49 89 420 958 993 > > SIP [EMAIL PROTECTED] > > --- > > Sven Haiges > > [EMAIL PROTECTED] > > > > TEL +49 89 420 958 993 > > SIP [EMAIL PROTECTED] > > > >

