code: private void updateFields() {
  		if (featureInfo != null) {
  			// Create a header field for each attribute definition:
  			List<ListGridField> fields = new ArrayList<ListGridField>();
  			if (idInTable) {
  				ListGridField gridField = new ListGridField(ID_NAME, "ID");
  				gridField.setAlign(Alignment.LEFT);
  				gridField.setCanEdit(false);
  				fields.add(gridField);
  			}
  
  			for (AttributeInfo attributeInfo : featureInfo.getAttributes()) {
  				if (!attributeInfo.isHidden() && (attributeInfo.isIdentifying() || allAttributesDisplayed)) {
  					fields.add(createAttributeGridField(attributeInfo));
  				}
  			}
  			setFields(fields.toArray(new ListGridField[fields.size()]));
  			setCanResizeFields(true);
  		}
  	}
docs: Actually create or update the fields.