[udig-devel] filter selection problem

Andrea Antonello andrea.antonello at gmail.com
Wed Oct 10 10:06:55 PDT 2007


Hi, I'm running into a strange problem with programmatic selection on a
layer:

I create a fid filter adding the fids of the needed features:

FidFilter fidFilter =
FilterFactoryFinder.createFilterFactory().createFidFilter();

add the needed fids:

fidFilter.addFid(feature.getID());

and afterwards as copied from the selection tool the following renders
the selected features:

MapCommand command =
getContext().getSelectionFactory().createSelectCommand(basinLayer,
fidFilter);

getContext().sendASyncCommand(command);
selecting = false;
shapeCommand.setValid(false);
getContext().getViewportPane().repaint();


This works like a charms, apart of the situation in which I add jsut a
single feature. In that case the feature gets selected in the table
view, but not rendered inside the map window.

Any idea about what that could be? I can't find a reason...

Thanks,
Andrea


More information about the udig-devel mailing list