Page 1 of 1

Extending Customercare module in Admin

Posted: Tue Feb 12, 2013 8:04 am
by bhavani
Hi,

I need to add one more tab in CustomerCare module in admin.. For this i've done the following things,

1. created the customerCareModule.gwt.xml in resources/admin folder.
2. entry added in gwt / mycompanyAdmin.gwt.xml like this <inherits name="com.mycompany.admin.customerCareModule" />
3. The customercare module created , and the corresponding presenter, display and view are created..

In Module i used the below code ,

setSection(
"FEEDBACK",
"feedback",
"com.mycompany.admin.client.view.customer.FeedbackView",
"feedbackPresenter",
"com.mycompany.admin.client.presenter.customer.FeedbackPresenter",
customerPermissions
);

While runnig the ant task, it doesn't throw any errors and in admin no changes are reflected..
Am i missing anything like xml configuration.. or somethis else..??
Kindly help me on this to solve this issue....
Thanks in advance!!

Re: Extending Customercare module in Admin

Posted: Tue Feb 12, 2013 9:44 am
by phillipuniverse
Which version of Broadleaf?

Re: Extending Customercare module in Admin

Posted: Tue Feb 12, 2013 11:52 pm
by bhavani
Hi Phillip,

I've used the DemoSite-2.0.2-GA version...

Re: Extending Customercare module in Admin

Posted: Wed Feb 13, 2013 7:43 am
by bhavani
Hi Philip,

The issue solved, now menu is created under customer care module..
But i'm facing some other issue..while opening the admin->customercare , its show the following error..i've attached the image, check it..

my file structure,

1. datasource factory created.
2. feedbak view , feedback display and feedback presenter created.

In datasource factory class, i used
public void createDataSource(String name, OperationTypes operationTypes, Object[] additionalItems, AsyncCallback<DataSource> cb) {
if (dataSource == null) {
operationTypes = new OperationTypes(OperationType.BASIC, OperationType.BASIC, OperationType.BASIC, OperationType.BASIC, OperationType.BASIC);
//Add our custom getFulfillmentFees non-persistent property to the persistence perspective
PersistencePerspective persistencePerspective = new PersistencePerspective(operationTypes, new String[]{"getName"}, new ForeignKey[]{});
DataSourceModule[] modules = new DataSourceModule[]{
new BasicClientEntityModule("com.mycompany.controller.feedback.Feedback", persistencePerspective, AppServices.DYNAMIC_ENTITY)
};
dataSource = new ListGridDataSource(name, persistencePerspective, AppServices.DYNAMIC_ENTITY, modules);
dataSource.buildFields(null, false, cb);
} else {
if (cb != null) {
cb.onSuccess(dataSource);
}
}
}


Then in presenter class,
@Override
public void setup() {
getPresenterSequenceSetupManager().addOrReplaceItem(new PresenterSetupItem("feedbackDS", new FeedbackListDataSourceFactory(), new AsyncCallbackAdapter() {
@Override
public void onSetupSuccess(DataSource top) {
setupDisplayItems(top);
((ListGridDataSource) top).setupGridFields(new String[]{"name", "email", "msg"}, new Boolean[]{true, true, true});
}
}));
}


I don't know, how to proceed here after...I didn't have idea on these technology...kindly help me on this..
Thanks in advance!!