List <List<Map<String,String>>> featureTypeFeatures = FastList.newInstance();
try {
Delegator delegator = product.getDelegator();
Map<String,String> fields = UtilMisc.toMap("productId", product.getString("productId"), "productFeatureApplTypeId", "SELECTABLE_FEATURE");
List<String> order = UtilMisc.toList("productFeatureTypeId", "sequenceNum");
List<GenericValue> features = delegator.findByAndCache("ProductFeatureAndAppl", fields, order);
List<GenericValue> featuresSorted = EntityUtil.orderBy(features, order);
String oldType = null;
List<Map<String,String>> featureList = FastList.newInstance();
for (GenericValue productFeatureAppl: featuresSorted) {
if (oldType == null || !oldType.equals(productFeatureAppl.getString("productFeatureTypeId"))) {