on 08-26-2015 12:52 PM
Hi,
I have added the following code in commercefacades-beans.xml , new entry = standing
<bean class="de.hybris.platform.commercefacades.product.data.ReviewData">
<property name="id" type="String"/>
<property name="headline" type="String"/>
<property name="comment" type="String"/>
<property name="rating" type="Double"/>
<property name="date" type="java.util.Date"/>
<property name="alias" type="String"/>
<property name="standing" type="String"/>
<property name="principal" type="de.hybris.platform.commercefacades.user.data.PrincipalData"/>
</bean>
I also made the following entry in customerreview-items.xml
<attribute type="java.lang.String" qualifier="standing">
<description>
Standing will be decided based upon the no of reviews.
</description>
<modifiers initial="true" optional="false" />
<persistence type="property" />
</attribute>
After running hybrisserver, i initialized the system.
The new column was created in customerReview Table.
I added a new review and inserted some value in STANDING column.
When i try to view the review, all other columns gets displayed except STANDING. It displays this column as null.
I have used the following syntax in reviewsTab.jsp -> ${review.standing}
What have i missed here?
Hi Hrishikesh,
Populators are used to populate Data Objects (Copies data from model to data Objects). In your case, CustomerReviewPopulator is used to copy data from from CustomerReviewModel to ReviewData object. So to display the extra property you've added, you need to extend the CustomerReviewPopulator and inside populate method ,copy value from model to data object.
PS: We should never make changes directly in platform code, we should make changes in our custom created extensions only.
Thanks, Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
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.