Need to add new Tab in Admin 3.0

Forum for questions and issues related to 3.0 migration.

Those wishing to upgrade should start by looking at the migration documents published on the Broadleaf Commerce documentation site.

Moderator: jocanas

rodcefet
Newbie
Newbie
Posts: 3
Joined: Thu Oct 24, 2013 2:25 pm

Need to add new Tab in Admin 3.0

Postby rodcefet » Fri Oct 25, 2013 7:53 am

I need to add a new module to control my payment types in broadleaf Admin.
I did the way down, but I noticed that in this way are the new settings module to version 2.2. Can you help me, we already have some documentation in version 3.0

public void onModuleLoad() {
addConstants(GWT.<i18nConstants>create(PaymentMessages.class));
setModuleKey("BLCMerchandising");

List<String> paymentPermissions = new ArrayList<String>();
paymentPermissions.add("PERMISSION_CREATE_PAYMENT_CONFIG");
paymentPermissions.add("PERMISSION_UPDATE_PAYMENT_CONFIG");
paymentPermissions.add("PERMISSION_DELETE_PAYMENT_CONFIG");
paymentPermissions.add("PERMISSION_READ_PAYMENT_CONFIG");
setSection(
BLCMain.getMessageManager().getString("paymentMainTitle"),
"paymentLocations",
"org.broadleafcommerce.inventory.admin.client.view.PaymentView",
"paymentLocationPresenter",
"org.broadleafcommerce.inventory.admin.client.view.PaymentPresenter",
paymentPermissions
);

registerModule();
}

Thak you :)

jasoneasterday
Beginner
Beginner
Posts: 19
Joined: Tue Jun 04, 2013 6:59 am

Re: Need to add new Tab in Admin 3.0

Postby jasoneasterday » Fri Oct 25, 2013 1:16 pm

Here's how i created a tab for NewProducts and NewProductsImpl

Code: Select all

    @OneToMany(fetch = FetchType.LAZY, targetEntity = NewSkuPricingImpl.class, mappedBy="sku")
    @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "blStandardElements")
    @BatchSize(size = 50)
    @AdminPresentationCollection(friendlyName = "New Pricing", manyToField = "sku",
       currencyCodeField="value",tab = "Special Pricing", tabOrder=1001)

where the key is the

Code: Select all

@AdminPresentationCollection(friendlyName = "New Pricing", manyToField = "sku",
       currencyCodeField="value",tab = "Special Pricing", tabOrder=1001)

use Annotations to setup how you want it to look in the Admin.

rodcefet
Newbie
Newbie
Posts: 3
Joined: Thu Oct 24, 2013 2:25 pm

Re: Need to add new Tab in Admin 3.0

Postby rodcefet » Mon Oct 28, 2013 12:05 pm

Thanks for the reply jasoneasterday

But actually I need to add a new module in GWT version 3.0, not a new Tab A new module that is similar to the Inventory module (http://docs.broadleafcommerce.org/core/ ... y-modules/ inventory)
I have found no documentation.

Could you please help

Thank you

jasoneasterday
Beginner
Beginner
Posts: 19
Joined: Tue Jun 04, 2013 6:59 am

Re: Need to add new Tab in Admin 3.0

Postby jasoneasterday » Mon Oct 28, 2013 1:08 pm

yea, i don't use GWT and have been using Spring annotations instead of GWT. Sorry, i can't help you on that :(

Jason

rodcefet
Newbie
Newbie
Posts: 3
Joined: Thu Oct 24, 2013 2:25 pm

Re: Need to add new Tab in Admin 3.0

Postby rodcefet » Thu Oct 31, 2013 7:38 am

Jason got the new button to be shown in the menu, I used the tags AdminPresentation as below

@ Entity
@ Inheritance (strategy = InheritanceType.JOINED)
@ Table (name = "BLC_CONFIG_PAYMENT") @ Cache (usage = CacheConcurrencyStrategy.READ_WRITE, region = "blStandardElements")
@ AdminPresentationClass (populateToOneFields = PopulateToOneFieldsEnum.TRUE, friendlyName = "Payment")
public class PaymentConfigImpl implements Serializable {PaymentConfig

Thank you for the tip

clapcreative
Newbie
Newbie
Posts: 6
Joined: Thu Nov 05, 2015 7:53 am
Location: Los Angeles, CA
Contact:

Re: Need to add new Tab in Admin 3.0

Postby clapcreative » Tue Jan 12, 2016 6:51 am

Thanks
thank you very much


Return to “3.0 Upgrade and Migration”

Who is online

Users browsing this forum: No registered users and 0 guests