コード例 #1
0
  /**
   * Creates a search field based on an attribute model
   *
   * @param entityModel the entity model of the entity to search for
   * @param attributeModel the attribute model the attribute model of the property that is bound to
   *     the field
   * @return
   */
  protected Field<?> constructField(EntityModel<T> entityModel, AttributeModel attributeModel) {
    Field<?> field = constructCustomField(entityModel, attributeModel);
    if (field == null) {
      EntityModel<?> em = getFieldEntityModel(attributeModel);
      field = getFieldFactory().constructField(attributeModel, getFieldFilters(), em);
    }

    if (field != null) {
      field.setSizeFull();
    }
    return field;
  }