@Override
  public List<CollectableField> getCollectableFields() throws CommonBusinessException {
    log.debug("getCollectableFields");

    Collection<EntityMetaDataVO> entites = new ArrayList<EntityMetaDataVO>();
    for (EntityMetaDataVO eMeta : MetaDataClientProvider.getInstance().getAllEntities()) {
      if (!includeSystemEntities && eMeta.getId() < 0) {
        continue;
      }
      if (includeEntitiesWithoutMenu || (eMeta.getLocaleResourceIdForMenuPath() != null)) {
        if (bWithStatemodel && eMeta.isStateModel()) {
          entites.add(eMeta);
        } else {
          if (bWithoutStatemodel && !eMeta.isStateModel()) {
            entites.add(eMeta);
          }
        }
      }
    }

    final List<CollectableField> result =
        CollectionUtils.transform(
            entites,
            new Transformer<EntityMetaDataVO, CollectableField>() {
              @Override
              public CollectableField transform(EntityMetaDataVO eMeta) {
                String label = SpringLocaleDelegate.getInstance().getLabelFromMetaDataVO(eMeta);
                return makeCollectableField(eMeta, label);
              }
            });

    Collections.sort(result);

    return result;
  }
  private void fillEntityCombobox() {
    Collection<EntityMetaDataVO> colMasterdata =
        MetaDataClientProvider.getInstance().getAllEntities();
    List<EntityMetaDataVO> lstMasterdata = new ArrayList<EntityMetaDataVO>(colMasterdata);
    Collections.sort(
        lstMasterdata,
        new Comparator<EntityMetaDataVO>() {

          @Override
          public int compare(EntityMetaDataVO o1, EntityMetaDataVO o2) {
            return o1.toString().compareTo(o2.toString());
          }
        });
    cbxEntity.addItem("");
    for (EntityMetaDataVO vo : lstMasterdata) {
      if (!vo.getEntity().startsWith("general")) cbxEntity.addItem(vo);
    }
  }
 public String getField() {
   EntityMetaDataVO md = MetaDataClientProvider.getInstance().getEntity(field.getEntityName());
   return "#{" + md.getNuclet() + "." + md.getEntity() + "." + field.getName() + "}";
 }
 protected CollectableField makeCollectableField(EntityMetaDataVO eMeta, String label) {
   return new LocalizedCollectableValueField(eMeta.getEntity(), label);
 }