Revision 8746 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSFilterPanel.java

View differences:

WFSFilterPanel.java
209 209
						try {
210 210
							// Convert the string to ISO 8859_1 codification
211 211
							String text = URLEncoder.encode(valor.toString(), "8859_1");
212
							
213
							// Change '  (%27 code) to '' for the SQL parser.
214
							text = text.replaceAll("\\%27", "\\'\\'");
212 215

  
213 216
							// Sets the string between apostrophes
214 217
							putSymbol("'" + text + "'");
......
225 228
		
226 229
		// Listener for a branch of the tree selection
227 230
		getFieldsJTree().addTreeSelectionListener(new TreeSelectionListener() {
228

  
231
			/*
232
			 *  (non-Javadoc)
233
			 * @see javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent)
234
			 */
229 235
			public void valueChanged(TreeSelectionEvent e) {
230
				// TODO Auto-generated method stub
231 236
				if (!panelAsATabForWFSLayersLoad) {
232 237
					DataReturnedOfDataLoadingFromActiveView data = DataLoadingFromActiveView.getDefaultExpressionDataSource();
233 238
		
......
237 242
						fillValuesByPath(currentPath);
238 243
					}
239 244
				}
240
			}
241
			
245
			}			
242 246
		});
243 247
	}
248
	
249
	/**
250
	 * If there is a field selected, show its new values
251
	 */
252
	public void updateFieldValues() {
253
		if (currentPath != null) {
254
			DataReturnedOfDataLoadingFromActiveView data = DataLoadingFromActiveView.getDefaultExpressionDataSource();
255
			
256
			if ((data != null) && (data.getData() != null)) {
257
				setModel(data.getData());				
258
				fillValuesByPath(currentPath);
259
			}
260
		}
261
	}
244 262

  
245 263
	/**
246 264
	 * Sets the value of the inner attribute: 'panelAsATabForWFSLayersLoad'
......
305 323
			switch (element.getEntityType().getType()) {
306 324
				case IXMLType.SIMPLE:
307 325
					
308
					if(element.getParentElement().getParentElement() == null){
309
					
326
					if(element.getParentElement().getParentElement() == null) {					
310 327
						// Find the selected field and try to obtein values related
311 328
						for (int i = 0; i < model.getFieldCount(); i++) {					
312 329
							String name = model.getFieldName(i);
......
315 332
							if (name.equals(element.getName())) {						
316 333
								for (int j = 0; j < model.getRowCount(); j++) {					
317 334
									Value value = model.getFieldValue(j, i);
318
						
335
									
319 336
									if (value instanceof NullValue)
320 337
									    continue;
321 338
									

Also available in: Unified diff