<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic query on ShapefileFeatureTable in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/query-on-shapefilefeaturetable/m-p/61404#M190</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I use arcgis sdk for java(10.2.4).And I wanna to query the&amp;nbsp;ShapefileFeatureTable as folows making it able to return the specified&amp;nbsp;field .But the results seems to return all the field not only the&amp;nbsp;&lt;SPAN&gt;the &lt;/SPAN&gt;&lt;SPAN&gt;specified&amp;nbsp;field.&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;private final String[] ATTR_NAMES =&lt;BR /&gt; new String[] {"NAME_0", "NAME_1", "NAME_2"};&lt;/P&gt;&lt;P&gt;QueryParameters query = new QueryParameters();&lt;BR /&gt; query.setOutFields(ATTR_NAMES);&lt;/P&gt;&lt;P&gt;shapefileTable_sw.queryFeatures(query,callback);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;callback&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;CallbackListener&amp;lt;FeatureResult&amp;gt; callback=new CallbackListener&amp;lt;FeatureResult&amp;gt;() {&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public void onError(Throwable e) {&lt;BR /&gt; // JOptionPane.showMessageDialog(contentPane, wrap("Error: "+e.getLocalizedMessage()), "", JOptionPane.ERROR_MESSAGE);&lt;BR /&gt; System.out.println("QUERY ERROR");&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;@Override&lt;/P&gt;&lt;P&gt;public void onCallback(FeatureResult objs) {&lt;BR /&gt; for (Object objFeature : objs) {&lt;BR /&gt; Feature feature = (Feature) objFeature;&lt;BR /&gt; //System.out.println(feature.getAttributes());&lt;BR /&gt; createPopView(feature);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Does the shapefile feature table not support the seOutFields function? Or there is somthing wrong with my code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2017 19:59:16 GMT</pubDate>
    <dc:creator>zhenzeng</dc:creator>
    <dc:date>2017-02-15T19:59:16Z</dc:date>
    <item>
      <title>query on ShapefileFeatureTable</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/query-on-shapefilefeaturetable/m-p/61404#M190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I use arcgis sdk for java(10.2.4).And I wanna to query the&amp;nbsp;ShapefileFeatureTable as folows making it able to return the specified&amp;nbsp;field .But the results seems to return all the field not only the&amp;nbsp;&lt;SPAN&gt;the &lt;/SPAN&gt;&lt;SPAN&gt;specified&amp;nbsp;field.&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;private final String[] ATTR_NAMES =&lt;BR /&gt; new String[] {"NAME_0", "NAME_1", "NAME_2"};&lt;/P&gt;&lt;P&gt;QueryParameters query = new QueryParameters();&lt;BR /&gt; query.setOutFields(ATTR_NAMES);&lt;/P&gt;&lt;P&gt;shapefileTable_sw.queryFeatures(query,callback);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;callback&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;CallbackListener&amp;lt;FeatureResult&amp;gt; callback=new CallbackListener&amp;lt;FeatureResult&amp;gt;() {&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public void onError(Throwable e) {&lt;BR /&gt; // JOptionPane.showMessageDialog(contentPane, wrap("Error: "+e.getLocalizedMessage()), "", JOptionPane.ERROR_MESSAGE);&lt;BR /&gt; System.out.println("QUERY ERROR");&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;@Override&lt;/P&gt;&lt;P&gt;public void onCallback(FeatureResult objs) {&lt;BR /&gt; for (Object objFeature : objs) {&lt;BR /&gt; Feature feature = (Feature) objFeature;&lt;BR /&gt; //System.out.println(feature.getAttributes());&lt;BR /&gt; createPopView(feature);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Does the shapefile feature table not support the seOutFields function? Or there is somthing wrong with my code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 19:59:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/query-on-shapefilefeaturetable/m-p/61404#M190</guid>
      <dc:creator>zhenzeng</dc:creator>
      <dc:date>2017-02-15T19:59:16Z</dc:date>
    </item>
  </channel>
</rss>

