Made _getPickData more generic by supporting ordening
As such, renamed it to _getData.
Also use a more robust way to represent the filter in case it
contains entities.
Patch by: Sverre Rabbelier
2008-11-19Public Domain.NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.