Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    "Auto allocation of tab-indices has reached native browser ceiling" on grid hilite

    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:

    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 };	}
    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:

    Code:
    Auto allocation of tab-indices has reached native browser ceiling - tab-order cannot be guaranteed for widgets on this page.
    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).

    #2
    The runaway Canvas count suggests that possibly some event handler is firing where you either create some UI components or call framework methods (like editHilites()) that would cause UI components to be created, and this somehow loops back to the same event. So you could temporarily shut off all the event handlers and see if that fixes the runaway issue. In particular, you didn't show the final actions taken in DataArrived, but it would be easy to test whether that's involved in the loop.

    If you enable the "draws" log category, you might be able to see what kinds of Canvases are being created.

    Also, do you have autoFit enabled? There was a way this could end up in an infinite loop which was recently fixed. This doesn't sound like the same thing, but updating to the latest couldn't hurt.

    Comment


      #3
      Originally posted by Isomorphic View Post
      Also, do you have autoFit enabled? There was a way this could end up in an infinite loop which was recently fixed. This doesn't sound like the same thing, but updating to the latest couldn't hurt.
      You know, I tried with yesterday's build pretty early on yesterday with no change. Tried again just now with today's build and it seems to be sorted out, whatever it was. (Including the filter builder's mysteriously missing criteria)
      Last edited by bbruyn; 13 Mar 2013, 13:42.

      Comment

      Working...
      X