on 2016 Apr 06 8:26 PM
CatalogOption is an enum. So it cannot be extended. Then, if we want to extend the CategoryHierarchyPopulator using our custom CatalogOption, our new populator cannot extend from CategoryHierarchyPopulator.
This is the current implementation of the CategoryHierarchyPopulator:
@Override
public void populate(final CategoryModel source, final CategoryHierarchyData target,
final Collection<? extends CatalogOption> options, final PageOption page) throws ConversionException
Take a look to third argument. Nothing can extend from CatalogOption. I think it should be a spring bean.
Hi,
You are right , You could not extend this populator with enum other than CatalogOption
,it's really strange they put it like this , Enum is final by design and could not be extended .
an option is to forget about extending and write your own implementation of the interface PageablePopulator<SOURCE, TARGET, OPTION>
and substitute the OPTION
param with your own enum .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
29 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.