Page 1 of 1

AdminPresentationMergeOverride annotation example

Posted: Mon Apr 06, 2015 2:58 am
by ktalati
Hello,

I'm using Broadleaf version 3.1.

According to my requirements, I need to extend CategoryImpl with new admin section.

So i have created new entity named "ExtendedCategoryImpl" which extends, CategoryImpl and I have done appropriate entires in database to view that entity in my BLC admin portal.

So for now i'm able to see my new module with new section named "ExtendedCategorySection". I'm successfully able to create new entries from this section and able to view those entries.

Now, I want to filter out some data from Default Parent Category lookup. For this i have written my own custom persistence handler but when I'm clicking on lookup label. I got call on server side on my custom persistence handler and when i'm trying to debug that persistencePackage it shows me ceilingEntity as "CategoryImpl" instead of "ExtendedCategoryImpl" :( :( :(

To resolve this i had looked into CategoryImpl class and i came to know that i need to override this annotation "@AdminPresentationToOneLookup()" with my custom criteria.

But when i'm trying to override same with "AdminPresentationMergeOverrides" annotation. It is now working properly.

I have tried to findout some scenarios which overrides this but didnt get anyone on google.

can you please guide me how can i override this annotation for lookup ? or How can i filter out parent category lookup data ?

with this post i'm attaching some code snippets.

Please please please help me out !!!

Code: Select all

@AdminPresentationMergeOverrides({
        @AdminPresentationMergeOverride(name = "defaultParentCategory", mergeEntries = {
                @AdminPresentationMergeEntry(propertyType = PropertyType.AdminPresentationToOneLookup.CUSTOMCRITERIA, stringArrayOverrideValue = {"abc"})
        })
})


Code: Select all

<bean id="blCustomPersistenceHandlers" class="org.springframework.beans.factory.config.ListFactoryBean" scope="prototype">
        <property name="sourceList">
            <list>
                <bean class="com.xaton.admin.server.service.handler.ExtendedCategoryCustomPersistenceHandler" />
            </list>
        </property>
    </bean>


Please Please Please help me ....

Thanks in advance :)

Re: AdminPresentationMergeOverride annotation example

Posted: Fri Apr 10, 2015 6:57 am
by ktalati
No one had implemented this kind of functionality ??

Please Please help me !!!!

Thanks & Regards,
Kishan