That is a good point; I think there is a spatial check for equality used 
for "the_geom". For information on the difference between equals and 
equals see this page:
- http://docs.codehaus.org/display/GEOTDOC/02+Geometry+Relationships

I am more concerned with the interger case; can you give some specific 
examples? The "converter" stuff
used to prep the data for the equality check tries to adapt the data to 
the same type before checking. So 1 = "1" should
work out as true.

Jody
PS. Confluence is really slow today

Gabriella Turek wrote:
> I have some code that allows a user to select an attribute value from a list,
> and I run a filter on it so that only that item is displayed.
> The code reads:
>    private void showSelectedValues(Object[] selValues)
>    {
>      int nvals = selValues.length;
>      String attName = selAttribute.getLocalName();
>      FeatureSource fs = ml.getFeatureSource();
>      Vector filters = new Vector(nvals);
>      Class cls = selAttribute.getBinding();
>      System.out.println(cls.getName());
>      for (int i = 0; i < nvals; i++)
>      {
>        PropertyIsEqualTo ef = ff.equals(ff2.property(attName),  
> ff.literal(selValues[i])); //ff==FilterFactory, ff2 == FilterFactory2
>        filters.add(ef);
>      }
>      ml.setQuery(new DefaultQuery("",ff.or(filters))); //ml == maplayer
>      mp.setReset(true);// mp == mappane
>      mp.repaint();
> }
>
> This will not work when the attribute is "the_geom" (i.e. the binding is
> of the type com.vividsolutions.jts.geom.*) and it often fails when the  
> binding is an Integer, thought I can't see any rhyme or reason in it.
> Gaby
>
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to