Thanks for that, Did you see the remark you got there today? -----Original Message----- From: Michael Matz [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 29, 2006 8:29 PM To: 'MyFaces Discussion' Subject: RE: t:dataTable with dynamic newspaperColumns
See issue: http://issues.apache.org/jira/browse/TOMAHAWK-728 -----Original Message----- From: Mike Kienenberger [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 4:53 PM To: MyFaces Discussion Subject: Re: t:dataTable with dynamic newspaperColumns The implementation of get/setNewspaperColumns needs to be patched. It looks like this: public int getNewspaperColumns() { return _newspaperColumns; } public void setNewspaperColumns(int newspaperColumns) { this._newspaperColumns = newspaperColumns; } It needs to be rewritten to work like get/setRows so that it first checks a ValueBinding instead of only working with an int. public int getRows() { if (_rows != null) return _rows.intValue(); ValueBinding vb = getValueBinding("rows"); Number v = vb != null ? (Number) vb.getValue(getFacesContext()) : null; return v != null ? v.intValue() : DEFAULT_ROWS; } public void setRows(int rows) { _rows = new Integer(rows); if (rows < 0) throw new IllegalArgumentException("rows: " + rows); } Please open a JIRA issue and attach a patch. Thanks. On 11/28/06, Yaron Spektor <[EMAIL PROTECTED]> wrote: > Hi, > I was wondering if anyone knows why the t:dataTable does not accept a > backing bean value for the newspaperColumns value-binding? > > Where this example works (4 columns): > <t:dataTable newspaperColumns="4" newspaperOrientation="horizontal" > value="#{bean.valueList}" var="index" > > <h:column> > <h:outputText value="#{index}" /> > </h:column> > </t:dataTable> > > But this does not: > > <t:dataTable newspaperColumns="#{bean.numberOfColumns}" > newspaperOrientation="horizontal" value="#{bean.valueList}" var="index" > > > <h:column> > <h:outputText value="#{index}" /> > </h:column> > </t:dataTable> > > Any work around to that? I can not use the t:columns. > > Thanks, >

