There is an inconsistency in the FilterBuilder when entering spaces vs characters in the FIlterBuilder. THis is a very minor UI issue, nonetheless I report all of them as a result of our QA effort.
REPRO steps
=============
1. Load the test case
2. Click Filter button
3. Create filter Inspector ID contains " " (spaces)
4. Click Add
5. Observe that the validation error icon appears and NaN displays in the value text field
6. Reload the page
7. Repeat steps using filter "ABCD"
8. Observe that the validation error icon appears bu the original text is retained.
REPRO steps
=============
1. Load the test case
2. Click Filter button
3. Create filter Inspector ID contains " " (spaces)
4. Click Add
5. Observe that the validation error icon appears and NaN displays in the value text field
6. Reload the page
7. Repeat steps using filter "ABCD"
8. Observe that the validation error icon appears bu the original text is retained.
Code:
<!DOCTYPE html> <html> <head> <title></title> <style> .diagInfo { font-size: 14px; font-weight: bold; padding: 5px; } </style> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Core.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Foundation.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Containers.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Grids.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Forms.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_DataBinding.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Drawing.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_PluginBridges.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Charts.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script> <script type="text/javascript" > var isomorphicDir="http://localhost:8080/isomorphic/"; // set this to the correct JIRA ticket var JIRA_TICKET = "SNQA-1146"; // test data var data = [ {inspectorID:12345, region:"Northeast", inspections:206, observations:913,lastInspectionDate:new Date(2012, 8, 13), index:52.6 }, {inspectorID:67890, region:"West", inspections:66, observations:2,lastInspectionDate:new Date(2013, 2,2), index:75.3 }, {inspectorID:54321, region:"Northeast", inspections:4, observations:67,lastInspectionDate:new Date(2013,2,3), index:75.3 }, {inspectorID:09876, region:"South", inspections:24, observations:0,lastInspectionDate:new Date(2012,8,31), index:52.6 } ]; // datasource for the grid isc.DataSource.create({ ID: "ds", fields: [ {name:"inspectorID", title:"Inspector ID", type:"integer", showIf:"false" }, // hidden {name:"inspections", type:"integer", title:"Number of Inspections Total"}, {name:"observations", title:"# Observations"}, {name:"region", type:"text", title:"Region/Country"}, {name:"lastInspectionDate", type:"date", title:"Last Inspection"} ], cacheData:data, clientOnly: true }); // once page loads set some diagnostic information, DO NOT CHANGE isc.Page.setEvent("load", function() { document.title = JIRA_TICKET + " (SmartClient version " + isc.versionNumber + ")"; var html = []; html.push("Jira: " + JIRA_TICKET); html.push("SmartClient: " + isc.versionNumber); html.push("Browser: " + navigator.appCodeName + " " + navigator.appName + " " + navigator.appVersion); diagLabel.setContents( html.join("<br>")); }); </script> </head> <body> <script> // ===== DO NOT REMOVE ===== var diagLabel = isc.Label.create({ ID: "diagInfo", width: "100%", styleName: "diagInfo", autoFit: true }); // ===== DO NOT REMOVE ===== // basic grid var grid = isc.ListGrid.create({ dataSource: ds, dataFetchMode : "local", autoFetchData: true, clientOnly: true, position: "relative", width : "100%", align : "center", autoFitData : "vertical", autoFitMaxHeight : 400, alternateRecordStyles : true, canAddFormulaFields : true, canAddSummaryFields : true, canGroupBy : true, canReorderFields : true, showGroupSummary : true, groupByMaxRecords : 5, useAdvancedFieldPicker: true, advancedFieldPickerThreshold: 5, autoDraw: false, badFormulaResultValue: "NA" }); var filter = isc.FilterBuilder.create({ dataSource : ds, topOperatorAppearance : "radio", allowEmpty : true, height : 10 }); var filterDialog = isc.Window.create({ width : 600, height : 350, title : "Filter Grid", canDragReposition : true, canDragResize : true, padding : 10, autoCenter : true, autoDraw : false, items : [ filter, isc.LayoutSpacer.create({ height : 10 }), isc.HLayout.create({ membersMargin : 25, defaultLayoutAlign : "center", align : "center", width : "100%", height : 10, members : [ isc.IButton.create({ title : "Filter", click : function() { grid.filterData(filter.getCriteria()); } }), isc.IButton.create({ title : "Clear Filter", click : function() { filter.clearCriteria(); grid.filterData(filter.getCriteria()); } }) ] }) ] }); // the main page layout - place all other components afetr diagLabel var layout = isc.VLayout.create({ width:"100%", membersMargin: 20, members: [ // ===== DO NOT REMOVE diagLabel diagLabel, // ===== place anty components here grid, isc.IButton.create({ title : "Filter", click : function() { filterDialog.show(); } }) ] }); </script> </body> </html>
Comment