myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zdeněk Sochor <>
Subject Re: datatable and groupBy enhancements
Date Mon, 21 May 2007 11:46:44 GMT
  i don't think either of suggestions are right.

Sugesstion 1 has disadvatage:
if you change one property of children in group, which is not defined as 
groupByValue or
taken in account when computing value of checking value,
you don't get whole group as changed.

Suggestion 2 has disadvantage:
equals() method returns only TWO results - true/false,
while comparator returns THREE results - -1, 0, 1.
By using equals() method you can't do sorting on objects :(


Martin Marinschek napsal(a):
> No, sounds good to me.
> regards,
> Martin
> On 5/21/07, Mario Ivankovits <> wrote:
>> Hi!
>> I'd like to make the following two enhancements to the tomahawk
>> datatable/column:
>> 1) add a new attribute "groupByValue" to the column
>> This allows to configure a valueBinding to be used as value to check if
>> there is a group change instead of scanning the children.
>> The old behavior still works, but has the disadvantages that it doesn't
>> not work if you embed the values in an panelGrid/panelGroup or any other
>> container.
>> Say you'll print the customer name in the groupBy column. The
>> groupByValue will be the id of the customer but the column content is a
>> panelGrid rendering the name/address etc.
>> 2) use objects instead of StringBuffer to create the compare string
>> The current implementation uses a StringBuffer to collect all the
>> children values. This means it has to lookup the converter to convert
>> the object to a string.
>> I'd like to change this to use a list of objects and compare them object
>> by object using .equals(), avoiding the need to use a converter.
>> Though, this might be an incompatible change as a converter might return
>> the same string for different object values and where there was no group
>> change in the past, now it will.
>> However, I think this case is very unlikely.
>> What do you think?
>> Any objections?
>> Ciao,
>> Mario

View raw message