Announcement

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

    Bug: CellEditValueFormatter is not Called, if ListGrid contains RecordComponents

    Hello,

    I've found a bug in the 3.1d enterprise edition (2012/10/11).
    If a ListGrid contains a ListGridField which renders RecordComponents, the CellEditValueFormatter of all other ListGridFields is no longer invoked.

    Here is a short example to reproduce the behaviour:
    Code:
    	public void onModuleLoad() {
    		final ListGrid lg = new ListGrid(){
    			@Override
    			protected Canvas createRecordComponent(ListGridRecord record, Integer colNum) {
    				if (colNum == 1){
    					ImgButton btn = new ImgButton();
    					btn.setHeight(16);
    					btn.setWidth(16);
    					return btn;
    				}
    				return null;
    			}
    		};
    
    		ListGridField f1 = new ListGridField("f1");
    		f1.setEditValueFormatter(new CellEditValueFormatter() {
    			int i = 0;
    			@Override
    			public Object format(Object value, ListGridRecord record, int rowNum, int colNum) {
    				return i++;
    			}
    		});
    
    		ListGridField f2 = new ListGridField("actions");
    		f2.setCanEdit(false);
    
    		lg.setFields(f1, f2);
    		lg.setShowRecordComponents(true);
    		lg.setShowRecordComponentsByCell(true);
    
    		lg.setCanEdit(true);
    		lg.addData(new Record());
    		lg.draw();
    	}
    If you click in the "f1" field there is nothing updated. As soon as you hide the "actions" field the "f1" field is updated via the CellEditValueFormatter.

    #2
    We've made a change to address this issue

    Regards
    Isomorphic Software

    Comment

    Working...
    X