I've got nearly a full day into trying to create a standalone test case around this one, but I'm not able to reproduce it outside of my application. Seems then that there's clearly something wrong on my end, but I could use a tip on what I should possibly be looking for.
The short of it is that I have a ListGrid (actually an extension of ListGrid) which, among other things, turns on the advanced field picker. To eliminate that from the equation, I switched out the subclass for one that looks like this:
For whatever reason, highlighting has to be set up on a DataArrivedHandler (I'm still trying to understand why that is as well), like so:
If I load the grid, click on the columns chooser, and then the "Highlights" button (or edit highlights via a custom menu option), the first thing I notice is that only one of my hilites is present on the filterBuilder. Sometimes it's the first, sometimes the last, depending on which Hilites I return from the array. Click "save" and I can see that something somewhere seems to get stuck in some infinite loop because the canvas count just runs wild until I shut down the browser. This accompanied by the following log output:
It seems like if I remove any 3 of the Hilites from the buildHilites array, my problem just goes away (though I still see just the one in the filterBuilder). See inline comments for the various permutations I've tried. I don't know what else to try at this point - does this make any sense at all?
Tested with Firefox 19.2 and IE 9 on SmartClient Version: v8.3p_2013-02-27/PowerEdition Deployment (built 2013-02-27).
The short of it is that I have a ListGrid (actually an extension of ListGrid) which, among other things, turns on the advanced field picker. To eliminate that from the equation, I switched out the subclass for one that looks like this:
Code:
class MyListGrid extends ListGrid {
public MyListGrid() {
setAttribute("useAdvancedFieldPicker", true, false);
setAttribute("advancedFieldPickerThreshold", 1, false);
}
}
For whatever reason, highlighting has to be set up on a DataArrivedHandler (I'm still trying to understand why that is as well), like so:
Code:
...
grid.setHilites(buildHighlights());
...
private Hilite[] buildHilites() {
Hilite unitsHilite = new Hilite();
AdvancedCriteria unitsHiliteCriteria = new AdvancedCriteria(
OperatorId.OR, new Criterion[] {
new Criterion(ProductionDelivery.TOTAL_UNITS,
OperatorId.NOT_EQUAL_FIELD, ProductionDelivery.UNITS_SCHEDULED),
new AdvancedCriteria(OperatorId.AND, new Criterion[] {
new Criterion(ProductionDelivery.UNITS_SCHEDULED,
OperatorId.NOT_EQUAL_FIELD, ProductionDelivery.WHOLE_LOTS_UNITS_SCHEDULED),
new Criterion(ProductionDelivery.UNITS_SCHEDULED, OperatorId.GREATER_THAN, 0),
new Criterion(ProductionDelivery.UNITS_SCHEDULED, OperatorId.NOT_NULL),
new Criterion(ProductionDelivery.PACK_DETAILS, OperatorId.NOT_NULL)
}),
});
unitsHilite.setCriteria(unitsHiliteCriteria);
unitsHilite.setFieldName(ProductionDelivery.TOTAL_UNITS);
unitsHilite.setCssText("background-color:#FFFF99;");
Hilite costHilite = new Hilite();
costHilite.setCriteria(new AdvancedCriteria(
new Criterion(ProductionDelivery.VENDOR_COST,
OperatorId.NOT_EQUAL_FIELD, ProductionDelivery.VENDOR_COST_MAX)));
costHilite.setFieldName(ProductionDelivery.VENDOR_COST);
costHilite.setCssText("color:red;");
Hilite modeHilite = new Hilite();
modeHilite.setCriteria(new AdvancedCriteria(
new Criterion(ProductionDelivery.TRANSPORT_MODE_ID,
OperatorId.NOT_EQUAL_FIELD, ProductionDelivery.TRANSPORT_MODE_ID_MAX)));
modeHilite.setFieldName(ProductionDelivery.TRANSPORT_MODE_ID);
modeHilite.setCssText("color:red;");
Hilite termsHilite = new Hilite();
termsHilite.setCriteria(new AdvancedCriteria(
new Criterion(ProductionDelivery.SHIP_TERM_ID,
OperatorId.NOT_EQUAL_FIELD, ProductionDelivery.SHIP_TERM_ID_MAX)));
termsHilite.setFieldName(ProductionDelivery.SHIP_TERM_ID);
termsHilite.setCssText("color:red;");
Hilite allHilite = new Hilite();
allHilite.setCriteria(new AdvancedCriteria(ProductionDelivery.COST_OVERRIDES,
OperatorId.EQUALS, ProductionDelivery.COST_OVERRIDES_ALL));
allHilite.setFieldName(ProductionDelivery.COST_OVERRIDES);
allHilite.setCssText("background-color:red;");
Hilite someHilite = new Hilite();
someHilite.setCriteria(new AdvancedCriteria(ProductionDelivery.COST_OVERRIDES,
OperatorId.EQUALS, ProductionDelivery.COST_OVERRIDES_SOME));
someHilite.setFieldName(ProductionDelivery.COST_OVERRIDES);
someHilite.setCssText("background-color:yellow;");
/*
* These pass, but editor shows only units or termsHilite
*/
//return new Hilite[] { unitsHilite, costHilite, modelHilite };
//return new Hilite[] { unitsHilite, costHilite, termsHilite };
//return new Hilite[] { modeHilite, termsHilite, someHilite};
//return new Hilite[] { modeHilite, termsHilite, allHilite };
//return new Hilite[] { unitsHilite, costHilite, modelHilite };
//return new Hilite[] { unitsHilite, costHilite, termsHilite };
/*
* These all fail
*/
//return new Hilite[] { unitsHilite, costHilite, modeHilite, termsHilite };
//return new Hilite[] { modeHilite, termsHilite, someHilite, allHilite };
//return new Hilite[] { unitsHilite, modeHilite, termsHilite, allHilite, someHilite };
//return new Hilite[] { unitsHilite, costHilite, modeHilite, termsHilite, allHilite };
return new Hilite[] { unitsHilite, costHilite, modeHilite, termsHilite, allHilite, someHilite }; }
Code:
Auto allocation of tab-indices has reached native browser ceiling - tab-order cannot be guaranteed for widgets on this page.
Tested with Firefox 19.2 and IE 9 on SmartClient Version: v8.3p_2013-02-27/PowerEdition Deployment (built 2013-02-27).
Comment