How to Bring Child Object's Property to Selection ListView?
Posted: Mon Apr 14, 2014 3:44 am
I have a Deal object that contains a list of DealProduct objects. DealProduct contains a Deal and a Product object. The UI should allow users to select product from product list.
The products in the list view (grid view) does not contain any defaultSku properties such as name. What do I need to do to bring default sku's properties to selection list view?
Note: I've extended AdminBasicOperationsController's showSelectCollectionItem to handle customCriteria so the list can be filtered based on the customCriteria. Should I do something in this method to bring defaultSku to the view?
Thank you in advance!
-Charlie
Code: Select all
@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}, targetEntity = Product.class)
@JoinColumn(name = "PRODUCT_ID")
@AdminPresentation(friendlyName = "DealProduct_Product", order = 2, prominent = true, gridOrder = 2)
@AdminPresentationToOneLookup(customCriteria = SELECT_PRODUCT)
protected Product product;
The products in the list view (grid view) does not contain any defaultSku properties such as name. What do I need to do to bring default sku's properties to selection list view?
Note: I've extended AdminBasicOperationsController's showSelectCollectionItem to handle customCriteria so the list can be filtered based on the customCriteria. Should I do something in this method to bring defaultSku to the view?
Thank you in advance!
-Charlie