[英]ATG-Endeca Record Filter
请参阅下面来自endeca的jsp_ref数据。 所以我的问题是,是否有可能在运行时使用recordFilter从记录中获取/获取dispName的值?
在渲染产品显示页面期间,如何获取属性名称值。 注意:我不能使用endeca机械手方法。
dispName = record.getProperty("sku.displayName")
StockStatus = record.getProperty("product.stockStatuses");
sku.baseUrl: atgrep:/ProductCatalog_production/sku/017229136779
sku.creationDate: 1485194500638
sku.displayName: LG M95 BT HEADSET BL
sku.endDate: 32506394714894
sku.margin: 0.000000
product.stockStatuses: 1000:Out of Stock
product.stockStatuses: 100411:Out of Stock
product.stockStatuses: 100412:Out of Stock
if(null != xxxxPage && !((String) xxxxPage ).isEmpty()){
PropertyConstraint propContraint = new PropertyConstraint(EndecaConstants.ITEM_SALE_FLAG,EndecaConstants.CONST_1);
return propContraint.toString();
}
PropertyConstraint propContraint = new PropertyConstraint(EndecaConstants.ITEM_SALE_FLAG,EndecaConstants.CONST_1);
return propContraint.toString();
如果已通过在NavigationStateBuilder组件中添加记录过滤器来启用它们,则可以使用endeca属性进行过滤。 Record.getattributes应该为您提供索引属性/尺寸和对应值的映射。
我们正在谈论两个不同的方面。 1.记录过滤。 可以将其视为一个sql查询,该查询根据值的组合过滤行。 为此,我们使用PropertyContraints。 因此,在您的示例中,您可以告诉endeca,给我提供ITEM_SALE_FLAG作为CONST_1的记录。 传递此属性约束以使用MdexResource查询和处理它,您将获得一个记录列表,其中包含与该约束匹配的所有记录。 2.记录财产。 在询问记录列表时,您可以指定是要每个记录的所有属性还是仅选择其中一些。 如果要选择,可以使用setSelection(PropertyList)或不进行设置。 无论哪种情况,都可以使用record.getProperties()检索每个记录上的属性。 这是示例代码。 https://docs.oracle.com/cd/E29584_01/webhelp/mdex_basicDev/src/cbdv_erecs_props_display.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.