Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeEclipse
languagejava
linenumberstrue
    public Set<String> productsListRowStyleResolver(final Entity product) {
        final Set<String> entityStyles = Sets.newHashSet();
        final String materialType = product.getStringField(ProductFields.GLOBAL_TYPE_OF_MATERIAL);

        if ("04waste".equals(materialType)) {
            entityStyles.add(GridComponentRowStyle.CSS_RED_BGBACKGROUND);
        }

        if (StringUtils.isBlank(product.getStringField(ProductFields.EAN))) {
            entityStyles.add(GridComponentRowStyle.CSS_BOLD_FONT);
        }
        return entityStyles;
    }