Revision 46358

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/SearchConditionFieldController.java
1057 1057
        JsonObjectBuilder fieldBuilder = Json.createObjectBuilder();
1058 1058

  
1059 1059
        JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
1060
        for (FeatureAttributeDescriptor featureAttributeDescriptor : this.getCurrentField().getPath()) {
1060
        FeatureAttributeDescriptor[] path = this.getCurrentField().getPath();
1061
        for (int i = 0; i < path.length; i++) {
1062
            FeatureAttributeDescriptor featureAttributeDescriptor = path[i];
1061 1063
            JsonArrayBuilder pathArray = Json.createArrayBuilder();
1062 1064

  
1063 1065
            //first value: name field
1064 1066
            String fieldName = featureAttributeDescriptor.getName();
1065 1067
            pathArray.add(fieldName);
1066 1068
            //second value: name store
1067
            String storeName = featureAttributeDescriptor.getFeatureType().getStore().getName();
1068
            pathArray.add(storeName);
1069

  
1069
            if(i==0){
1070
                pathArray.add(this.store.getName());
1071
            } else {
1072
                FeatureType featureType = featureAttributeDescriptor.getFeatureType();
1073
                String storeName = featureType.getStore().getName();
1074
                pathArray.add(storeName);
1075
            }
1070 1076
            arrayBuilder.add(pathArray.build());
1071 1077
        }
1072 1078
        String relational = this.getRelationalOperator();

Also available in: Unified diff