I agree

- Philipp Bärfuss




On 15.10.2009, at 09:47, Bert Leunis wrote:

Hello all,

I think I spotted a different approach for two of the collecAllChildren methods in the info.magnolia.cms.util.ContentUtil class. The methods collect nodes recursively.

1.  collectAllChildren(List nodes, Content node, ContentFilter filter)

In this method the first level of children is collected with the filter. For the next level of children not only the nodes that match the filter are taken into account, but the children of ALL nodes of the first level. So children that match the filter, but who’s parents do not, are indeed found.

2.  collectAllChildren(List nodes, Content node, ItemType[] types)

In this method however, only children that have parents that match one of the ItemTypes in the array are found. For example: if I am looking for all nodes of type B and C, but they some of them have a parent of type A, they will not be found.

This seems inconsistent to me, and I think the first way matches the expected functionality the best. Do you agree?

Bye, Bert



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to