Revision 44270 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/export/swing/impl/panels/SelectFilterPanel.java
SelectFilterPanel.java | ||
---|---|---|
18 | 18 |
import org.gvsig.export.swing.spi.ExportPanel; |
19 | 19 |
import org.gvsig.export.swing.spi.ExportPanelValidationException; |
20 | 20 |
import org.gvsig.export.swing.spi.ExportPanelsManager; |
21 |
import org.gvsig.expressionevaluator.Expression; |
|
22 |
import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator; |
|
23 |
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator; |
|
24 |
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager; |
|
25 |
import org.gvsig.expressionevaluator.swing.ExpressionPickerController; |
|
21 | 26 |
import org.gvsig.fmap.dal.DALLocator; |
22 | 27 |
import org.gvsig.fmap.dal.DataManager; |
28 |
import org.gvsig.fmap.dal.exception.DataException; |
|
23 | 29 |
import org.gvsig.fmap.dal.exception.InitializeException; |
30 |
import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable; |
|
31 |
import org.gvsig.fmap.dal.feature.Feature; |
|
32 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
33 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
|
34 |
import org.gvsig.fmap.dal.swing.DataSwingManager; |
|
35 |
import org.gvsig.fmap.dal.swing.expressionevaluator.FeatureStoreElement; |
|
24 | 36 |
import org.gvsig.tools.ToolsLocator; |
25 | 37 |
import org.gvsig.tools.dynobject.DynObject; |
26 | 38 |
import org.gvsig.tools.dynobject.DynObjectManager; |
... | ... | |
38 | 50 |
*/ |
39 | 51 |
public class SelectFilterPanel |
40 | 52 |
extends SelectFilterPanelView |
41 |
implements ExportPanel |
|
42 |
{ |
|
53 |
implements ExportPanel { |
|
43 | 54 |
|
44 | 55 |
private static final Logger LOG = LoggerFactory.getLogger(SelectFilterPanel.class); |
45 |
|
|
56 |
|
|
46 | 57 |
private final ExportParameters parameters; |
47 | 58 |
private final JExportProcessPanel processPanel; |
48 |
|
|
59 |
private ExpressionPickerController pickerExpression; |
|
60 |
|
|
49 | 61 |
public SelectFilterPanel( |
50 | 62 |
JExportProcessPanel processPanel, |
51 | 63 |
ExportParameters parameters |
52 |
) {
|
|
64 |
) { |
|
53 | 65 |
this.processPanel = processPanel; |
54 | 66 |
this.parameters = parameters; |
55 | 67 |
this.initComponents(); |
... | ... | |
59 | 71 |
public String getIdPanel() { |
60 | 72 |
return ExportPanelsManager.PANEL_SELECT_FILTER; |
61 | 73 |
} |
62 |
|
|
74 |
|
|
63 | 75 |
@Override |
64 | 76 |
public String getTitlePanel() { |
65 | 77 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
... | ... | |
74 | 86 |
|
75 | 87 |
@Override |
76 | 88 |
public void enterPanel() { |
77 |
|
|
89 |
if (this.parameters.getFilterExpresion()!=null) { |
|
90 |
this.pickerExpression.set(this.parameters.getFilterExpresion()); |
|
91 |
} |
|
78 | 92 |
} |
79 | 93 |
|
80 | 94 |
@Override |
... | ... | |
85 | 99 |
@Override |
86 | 100 |
public void nextPanel() { |
87 | 101 |
this.parameters.setFilterExpresion(this.getFilterExpresion()); |
88 |
if( this.isFullLayerSelected() ) {
|
|
102 |
if (this.isFullLayerSelected()) {
|
|
89 | 103 |
this.parameters.setFeaturesToUse(ExportParameters.USE_ALL_FEATURES); |
90 |
} else if( this.isPersonalizedFilterSelected() ) {
|
|
104 |
} else if (this.isPersonalizedFilterSelected()) {
|
|
91 | 105 |
this.parameters.setFeaturesToUse(ExportParameters.USE_FILTERED_FEATURES); |
92 | 106 |
} else { |
93 | 107 |
this.parameters.setFeaturesToUse(ExportParameters.USE_SELECTED_FEATURES); |
... | ... | |
98 | 112 |
public JComponent asJComponent() { |
99 | 113 |
return this; |
100 | 114 |
} |
101 |
|
|
115 |
|
|
102 | 116 |
private void initComponents() { |
117 |
// init picker |
|
118 |
|
|
103 | 119 |
ExportManager manager = ExportLocator.getManager(); |
104 |
|
|
120 |
|
|
105 | 121 |
DefaultListModel model = new DefaultListModel(); |
106 | 122 |
List<ExportManager.ExportFilter> filters = manager.getFilters(); |
107 | 123 |
for (ExportFilter filter : filters) { |
108 |
model.addElement(new ListElement(filter.getName(),filter.getExpression())); |
|
124 |
model.addElement(new ListElement(filter.getName(), filter.getExpression()));
|
|
109 | 125 |
} |
110 |
this.lstFilters.setModel(model); |
|
111 |
this.lstFilters.addListSelectionListener(new ListSelectionListener() { |
|
112 |
@Override |
|
113 |
public void valueChanged(ListSelectionEvent lse) { |
|
114 |
doSelectFilter(); |
|
115 |
} |
|
116 |
}); |
|
117 |
|
|
126 |
|
|
118 | 127 |
ActionListener changeOptionAction = new ActionListener() { |
119 | 128 |
@Override |
120 | 129 |
public void actionPerformed(ActionEvent e) { |
... | ... | |
124 | 133 |
this.rdbAllRows.addActionListener(changeOptionAction); |
125 | 134 |
this.rdbFilteredRows.addActionListener(changeOptionAction); |
126 | 135 |
this.rdbSelectedRows.addActionListener(changeOptionAction); |
127 |
this.rdoUseNewExpresion.addActionListener(changeOptionAction); |
|
128 |
this.rdoUseSavedExpresion.addActionListener(changeOptionAction); |
|
129 |
|
|
130 |
this.butTest.addActionListener(new ActionListener() { |
|
131 |
@Override |
|
132 |
public void actionPerformed(ActionEvent e) { |
|
133 |
doTest(); |
|
134 |
} |
|
135 |
}); |
|
136 |
// this.rdoUseNewExpresion.addActionListener(changeOptionAction);
|
|
137 |
// this.rdoUseSavedExpresion.addActionListener(changeOptionAction);
|
|
138 |
// |
|
139 |
// this.butTest.addActionListener(new ActionListener() {
|
|
140 |
// @Override
|
|
141 |
// public void actionPerformed(ActionEvent e) {
|
|
142 |
// doTest();
|
|
143 |
// }
|
|
144 |
// });
|
|
136 | 145 |
this.rdbAllRows.setSelected(true); |
137 | 146 |
doChangeOption(); |
138 |
this.butFilterDialog.addActionListener(new ActionListener() { |
|
139 |
@Override |
|
140 |
public void actionPerformed(ActionEvent e) { |
|
141 |
doShowFilterDialog(); |
|
147 |
// this.butFilterDialog.addActionListener(new ActionListener() { |
|
148 |
// @Override |
|
149 |
// public void actionPerformed(ActionEvent e) { |
|
150 |
// doShowFilterDialog(); |
|
151 |
// } |
|
152 |
// }); |
|
153 |
ExpressionEvaluatorSwingManager expManager = ExpressionEvaluatorSwingLocator.getManager(); |
|
154 |
// this.pickerExpression = expManager.createExpressionPickerController(this.txtPicker, this.btnPickerExp); |
|
155 |
this.pickerExpression = expManager.createExpressionPickerController(txtPicker, btnPickerExp, btnPickerBook, btnPickerHis); |
|
156 |
FeatureStore store = this.parameters.getSourceFeatureStore(); |
|
157 |
if (store != null) { |
|
158 |
DataSwingManager swm = DALSwingLocator.getSwingManager(); |
|
159 |
FeatureStoreElement expStore = swm.createFeatureStoreElement(); |
|
160 |
expStore.setFeatureStore(store); |
|
161 |
expStore.setName(store.getName()); |
|
162 |
this.pickerExpression.addElement(expStore); |
|
163 |
Feature sampleFeature = null; |
|
164 |
try { |
|
165 |
sampleFeature = store.getFeatureSelection().first(); |
|
166 |
if (sampleFeature == null) { |
|
167 |
sampleFeature = store.first(); |
|
168 |
} |
|
169 |
} catch (DataException ex) { |
|
142 | 170 |
} |
143 |
}); |
|
171 |
if (sampleFeature != null) { |
|
172 |
FeatureSymbolTable featureSymbolTable = DALLocator.getDataManager().createFeatureSymbolTable(); |
|
173 |
featureSymbolTable.setFeature(sampleFeature); |
|
174 |
this.pickerExpression.setPreviewSymbolTable(featureSymbolTable.createParent()); |
|
175 |
} |
|
176 |
} |
|
144 | 177 |
this.translate(); |
145 | 178 |
} |
146 | 179 |
|
147 | 180 |
private void translate() { |
148 | 181 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
149 |
|
|
182 |
|
|
150 | 183 |
this.rdbAllRows.setText(i18nManager.getTranslation("_Todos_los_registros")); |
151 | 184 |
this.rdbSelectedRows.setText(i18nManager.getTranslation("_Los_registros_seleccionados")); |
152 | 185 |
this.rdbFilteredRows.setText(i18nManager.getTranslation("_Los_registros_que_cumplan_el_critrio_seleccionado")); |
153 |
this.lblName.setText(i18nManager.getTranslation("_Nombre_de_la_expresion_opcinal")); |
|
154 |
this.lblExpresion.setText(i18nManager.getTranslation("_Expresion")); |
|
155 |
this.txtName.setToolTipText(i18nManager.getTranslation("_Type_here_the_name_of_the_expression_if_you_want_to_save_it_otherwise_leave_it_blank")); |
|
156 |
this.butTest.setText(i18nManager.getTranslation("_Test")); |
|
186 |
// this.lblName.setText(i18nManager.getTranslation("_Nombre_de_la_expresion_opcinal"));
|
|
187 |
// this.lblExpresion.setText(i18nManager.getTranslation("_Expresion"));
|
|
188 |
// this.txtName.setToolTipText(i18nManager.getTranslation("_Type_here_the_name_of_the_expression_if_you_want_to_save_it_otherwise_leave_it_blank"));
|
|
189 |
// this.butTest.setText(i18nManager.getTranslation("_Test"));
|
|
157 | 190 |
this.lblHeader.setText(i18nManager.getTranslation("_Indique_que_registros_desea_exportar")); |
158 |
this.rdoUseSavedExpresion.setText(i18nManager.getTranslation("_Usar_una_expresion_guardada")); |
|
159 |
this.rdoUseNewExpresion.setText(i18nManager.getTranslation("_Nueva_expresion")); |
|
160 |
this.butFilterDialog.setText(i18nManager.getTranslation("_Filtro")); |
|
161 |
}
|
|
162 |
|
|
191 |
// this.rdoUseSavedExpresion.setText(i18nManager.getTranslation("_Usar_una_expresion_guardada"));
|
|
192 |
// this.rdoUseNewExpresion.setText(i18nManager.getTranslation("_Nueva_expresion"));
|
|
193 |
// this.butFilterDialog.setText(i18nManager.getTranslation("_Filtro"));
|
|
194 |
} |
|
195 |
|
|
163 | 196 |
private void doShowFilterDialog() { |
164 |
|
|
197 |
|
|
165 | 198 |
} |
166 | 199 |
|
167 |
protected void doSelectFilter() { |
|
168 |
ExportFilter item = (ExportFilter) ListElement.getSelected(this.lstFilters); |
|
169 |
if( item!=null ) { |
|
170 |
this.txtExpresion.setText(item.getExpression()); |
|
171 |
this.txtName.setText(item.getName()); |
|
172 |
} |
|
173 |
} |
|
174 |
|
|
175 | 200 |
private static class Data implements EvaluatorData { |
201 |
|
|
176 | 202 |
private final DynObject data; |
177 |
|
|
203 |
|
|
178 | 204 |
public Data(DynObject data) { |
179 | 205 |
this.data = data; |
180 | 206 |
} |
207 |
|
|
181 | 208 |
@Override |
182 | 209 |
public Object getDataValue(String name) { |
183 |
if( this.data.getDynClass().getDynField(name)!=null ) {
|
|
210 |
if (this.data.getDynClass().getDynField(name) != null) {
|
|
184 | 211 |
return this.data.getDynValue(name); |
185 | 212 |
} |
186 |
if( "defaultgeometry".equalsIgnoreCase(name) ) {
|
|
213 |
if ("defaultgeometry".equalsIgnoreCase(name)) {
|
|
187 | 214 |
// FIXME: deberia crear una geometris de agun tipo |
188 | 215 |
return null; |
189 | 216 |
} |
190 |
throw new RuntimeException("Identifier '"+name+"'not defined.");
|
|
217 |
throw new RuntimeException("Identifier '" + name + "'not defined.");
|
|
191 | 218 |
} |
192 | 219 |
|
193 | 220 |
@Override |
... | ... | |
207 | 234 |
|
208 | 235 |
@Override |
209 | 236 |
public boolean hasDataValue(String name) { |
210 |
if( "defaultgeometry".equalsIgnoreCase(name) ) {
|
|
237 |
if ("defaultgeometry".equalsIgnoreCase(name)) {
|
|
211 | 238 |
return true; |
212 | 239 |
} |
213 |
return this.data.hasDynValue(name);
|
|
240 |
return this.data.hasDynValue(name); |
|
214 | 241 |
} |
215 | 242 |
|
216 | 243 |
@Override |
... | ... | |
218 | 245 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
219 | 246 |
} |
220 | 247 |
} |
221 |
|
|
248 |
|
|
222 | 249 |
protected void doTest() { |
223 | 250 |
try { |
224 | 251 |
this.checkPanel(false); |
... | ... | |
231 | 258 |
} catch (ExportPanelValidationException ex) { |
232 | 259 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
233 | 260 |
JOptionPane.showMessageDialog(this, |
234 |
ex.getMessage(),
|
|
261 |
ex.getMessage(), |
|
235 | 262 |
i18nManager.getTranslation("_Warning"), |
236 | 263 |
JOptionPane.WARNING_MESSAGE |
237 | 264 |
); |
238 | 265 |
} |
239 | 266 |
} |
240 |
|
|
241 |
protected void doChangeOption(){ |
|
242 |
if( this.rdbFilteredRows.isSelected() ) { |
|
243 |
this.rdoUseNewExpresion.setEnabled(true); |
|
244 |
this.rdoUseSavedExpresion.setEnabled(true); |
|
245 |
|
|
246 |
if( this.rdoUseSavedExpresion.isSelected() ) { |
|
247 |
this.lstFilters.setEnabled(true); |
|
248 |
this.txtName.setEnabled(false); |
|
249 |
this.txtExpresion.setEnabled(false); |
|
250 |
this.butTest.setEnabled(false); |
|
251 |
this.butFilterDialog.setEnabled(false); |
|
252 |
} else { |
|
253 |
this.rdoUseNewExpresion.setSelected(false); |
|
254 |
|
|
255 |
this.lstFilters.setEnabled(false); |
|
256 |
this.txtName.setEnabled(true); |
|
257 |
this.txtExpresion.setEnabled(true); |
|
258 |
this.butTest.setEnabled(true); |
|
259 |
this.butFilterDialog.setEnabled(true); |
|
260 |
} |
|
261 | 267 |
|
262 |
} else if( this.rdbSelectedRows.isSelected() ) { |
|
263 |
this.lstFilters.setEnabled(false); |
|
264 |
this.txtName.setEnabled(false); |
|
265 |
this.txtExpresion.setEnabled(false); |
|
266 |
this.butTest.setEnabled(false); |
|
267 |
this.butFilterDialog.setEnabled(false); |
|
268 |
this.rdoUseNewExpresion.setEnabled(false); |
|
269 |
this.rdoUseSavedExpresion.setEnabled(false); |
|
268 |
protected void doChangeOption() { |
|
269 |
// if( this.rdbFilteredRows.isSelected() ) { |
|
270 |
// this.rdoUseNewExpresion.setEnabled(true); |
|
271 |
// this.rdoUseSavedExpresion.setEnabled(true); |
|
272 |
// |
|
273 |
// if( this.rdoUseSavedExpresion.isSelected() ) { |
|
274 |
// this.lstFilters.setEnabled(true); |
|
275 |
// this.txtName.setEnabled(false); |
|
276 |
// this.txtExpresion.setEnabled(false); |
|
277 |
// this.butTest.setEnabled(false); |
|
278 |
// this.butFilterDialog.setEnabled(false); |
|
279 |
// } else { |
|
280 |
// this.rdoUseNewExpresion.setSelected(false); |
|
281 |
// |
|
282 |
// this.lstFilters.setEnabled(false); |
|
283 |
// this.txtName.setEnabled(true); |
|
284 |
// this.txtExpresion.setEnabled(true); |
|
285 |
// this.butTest.setEnabled(true); |
|
286 |
// this.butFilterDialog.setEnabled(true); |
|
287 |
// } |
|
288 |
// |
|
289 |
// } else if( this.rdbSelectedRows.isSelected() ) { |
|
290 |
// this.lstFilters.setEnabled(false); |
|
291 |
// this.txtName.setEnabled(false); |
|
292 |
// this.txtExpresion.setEnabled(false); |
|
293 |
// this.butTest.setEnabled(false); |
|
294 |
// this.butFilterDialog.setEnabled(false); |
|
295 |
// this.rdoUseNewExpresion.setEnabled(false); |
|
296 |
// this.rdoUseSavedExpresion.setEnabled(false); |
|
297 |
// |
|
298 |
// } else { |
|
299 |
// this.rdbAllRows.setSelected(true); |
|
300 |
// |
|
301 |
// this.lstFilters.setEnabled(false); |
|
302 |
// this.txtName.setEnabled(false); |
|
303 |
// this.txtExpresion.setEnabled(false); |
|
304 |
// this.butTest.setEnabled(false); |
|
305 |
// this.butFilterDialog.setEnabled(false); |
|
306 |
// this.rdoUseNewExpresion.setEnabled(false); |
|
307 |
// this.rdoUseSavedExpresion.setEnabled(false); |
|
308 |
// |
|
309 |
// } |
|
310 |
} |
|
270 | 311 |
|
271 |
} else { |
|
272 |
this.rdbAllRows.setSelected(true); |
|
273 |
|
|
274 |
this.lstFilters.setEnabled(false); |
|
275 |
this.txtName.setEnabled(false); |
|
276 |
this.txtExpresion.setEnabled(false); |
|
277 |
this.butTest.setEnabled(false); |
|
278 |
this.butFilterDialog.setEnabled(false); |
|
279 |
this.rdoUseNewExpresion.setEnabled(false); |
|
280 |
this.rdoUseSavedExpresion.setEnabled(false); |
|
281 |
|
|
282 |
} |
|
283 |
} |
|
284 |
|
|
285 | 312 |
public boolean isFullLayerSelected() { |
286 | 313 |
return this.rdbAllRows.isSelected(); |
287 | 314 |
} |
... | ... | |
294 | 321 |
return this.rdbFilteredRows.isSelected(); |
295 | 322 |
} |
296 | 323 |
|
297 |
public void checkPanel(boolean save) throws ExportPanelValidationException {
|
|
298 |
if( this.rdbFilteredRows.isSelected() ) {
|
|
324 |
public void checkPanel(boolean save) throws ExportPanelValidationException { |
|
325 |
if (this.rdbFilteredRows.isSelected()) {
|
|
299 | 326 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
300 |
String expresion = this.getFilterExpresion(); |
|
301 |
if( expresion == null ) {
|
|
327 |
|
|
328 |
if (this.pickerExpression.isEmpty()) {
|
|
302 | 329 |
throw new ExportPanelValidationException( |
303 | 330 |
i18nManager.getTranslation("_The_expresion_is_empty_Check_other_option_or_enter_a_expresion") |
304 | 331 |
); |
305 | 332 |
} |
306 |
Evaluator filter = this.getFilter(); |
|
307 |
if( filter == null ) { |
|
333 |
|
|
334 |
// Evaluator filter = this.getFilter(); |
|
335 |
if (!this.pickerExpression.isValid()) { |
|
308 | 336 |
throw new ExportPanelValidationException( |
309 | 337 |
i18nManager.getTranslation("_Problems_compiling_the_expesion_Check_the_sintax_Remember_use_SQL_expresion_sintax") |
310 | 338 |
); |
311 | 339 |
} |
312 |
DynObjectManager dynobjmanager = ToolsLocator.getDynObjectManager(); |
|
313 |
try { |
|
314 |
DynObject values = dynobjmanager.createDynObject(this.parameters.getSourceFeatureType()); |
|
315 |
filter.evaluate(new Data(values)); |
|
316 |
} catch (EvaluatorException ex) { |
|
317 |
throw new ExportPanelValidationException( |
|
318 |
i18nManager.getTranslation("_Check_the_sintax_Remember_use_SQL_expresion_sintax") |
|
319 |
+ "\n" |
|
320 |
+ ex.getCause().getMessage() |
|
321 |
); |
|
322 |
} catch (Exception ex) { |
|
323 |
LOG.warn("Can't test expresion",ex); |
|
324 |
throw new ExportPanelValidationException( |
|
325 |
i18nManager.getTranslation("_Problems_to_create_a_data_set_to_test_the_expresion_See_register_for_more_information") |
|
326 |
); |
|
327 |
} |
|
328 |
if( save ) { |
|
329 |
String filterName = this.getFilterName(); |
|
330 |
if( filterName!=null ) { |
|
331 |
ExportManager manager = ExportLocator.getManager(); |
|
332 |
manager.addFilter(filterName, expresion); |
|
333 |
} |
|
334 |
} |
|
340 |
// DynObjectManager dynobjmanager = ToolsLocator.getDynObjectManager(); |
|
341 |
// |
|
342 |
// try { |
|
343 |
// DynObject values = dynobjmanager.createDynObject(this.parameters.getSourceFeatureType()); |
|
344 |
// filter.evaluate(new Data(values)); |
|
345 |
// } catch (EvaluatorException ex) { |
|
346 |
// throw new ExportPanelValidationException( |
|
347 |
// i18nManager.getTranslation("_Check_the_sintax_Remember_use_SQL_expresion_sintax") |
|
348 |
// + "\n" |
|
349 |
// + ex.getCause().getMessage() |
|
350 |
// ); |
|
351 |
// } catch (Exception ex) { |
|
352 |
// LOG.warn("Can't test expresion", ex); |
|
353 |
// throw new ExportPanelValidationException( |
|
354 |
// i18nManager.getTranslation("_Problems_to_create_a_data_set_to_test_the_expresion_See_register_for_more_information") |
|
355 |
// ); |
|
356 |
// } |
|
335 | 357 |
} |
336 | 358 |
} |
337 | 359 |
|
338 | 360 |
private Evaluator getFilter() { |
339 |
String filter = this.getFilterExpresion();
|
|
340 |
if( filter == null ) {
|
|
361 |
Expression filter = this.getFilterExpresion();
|
|
362 |
if (filter == null) {
|
|
341 | 363 |
return null; |
342 | 364 |
} |
343 | 365 |
DataManager datamanager = DALLocator.getDataManager(); |
344 | 366 |
try { |
345 |
Evaluator evaluator = datamanager.createExpresion(filter);
|
|
367 |
Evaluator evaluator = datamanager.createFilter(filter);
|
|
346 | 368 |
return evaluator; |
347 | 369 |
} catch (InitializeException ex) { |
348 |
// Error de sintaxis en la expresion ??? |
|
349 | 370 |
return null; |
350 | 371 |
} |
351 | 372 |
} |
352 | 373 |
|
353 |
public String getFilterExpresion() { |
|
354 |
String s = this.txtExpresion.getText(); |
|
355 |
if( StringUtils.isBlank(s) ) { |
|
374 |
public Expression getFilterExpresion() { |
|
375 |
if (this.pickerExpression.isValid()) { |
|
376 |
Expression exp = this.pickerExpression.get(); |
|
377 |
return exp; |
|
378 |
} else { |
|
356 | 379 |
return null; |
357 | 380 |
} |
358 |
return s.trim(); |
|
359 | 381 |
} |
360 | 382 |
|
361 |
public String getFilterName() { |
|
362 |
String s = this.txtName.getText(); |
|
363 |
if( StringUtils.isBlank(s) ) { |
|
364 |
return null; |
|
365 |
} |
|
366 |
return s.trim(); |
|
367 |
} |
|
368 |
|
|
369 |
|
|
370 | 383 |
} |
Also available in: Unified diff