Okay; I have not tried that technique before. I usually listen to
workbench selection and see if the current selection adapts to a layer
(and then use the layer.getFilter() method).

A raster layer or mapgraphic will not have a schema; a schema is only
for vector layers.
Jody

On Fri, May 15, 2009 at 7:45 AM, Milan Dinic <[email protected]> wrote:
> Hi,
>
> context menu option is not my goal, i need to get selection without
> extra clicking on tools on menu items.
> I've managed to catch selection event by creating class that
> implements the ISelectionListener, and by adding instance of this
> class to the selection service.
>
> My next problem occurred while using
> GetSelectedFeaturesFromLayer
> (http://www.koders.com/java/fidF3B10E04E5583C0120063667A798B0E4FBC4599B.aspx?s=FeatureExportTask)
> I'm getting null for the layer.getSchema()
>
> Query query = new
> DefaultQuery(layer.getSchema().getName().getLocalPart(),
> layer.getFilter(), new String[0]);
>
> any idea when (why) layer might be without scheme?
>
> Thanks,
> Milan
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to