Search in sources :

Example 1 with WindowUIElementsGenerator

use of org.adempiere.ad.window.process.AD_Window_CreateUIElements.WindowUIElementsGenerator in project metasfresh-webui-api by metasfresh.

the class InMemoryUIElementsProvider method getUISections.

@Override
public List<I_AD_UI_Section> getUISections(final int AD_Tab_ID) {
    // Generate the UI elements if needed
    if (!adTabId2sections.containsKey(AD_Tab_ID)) {
        final WindowUIElementsGenerator generator = WindowUIElementsGenerator.forConsumer(this);
        final I_AD_Tab adTab = InterfaceWrapperHelper.create(Env.getCtx(), AD_Tab_ID, I_AD_Tab.class, ITrx.TRXNAME_ThreadInherited);
        final boolean primaryTab = adTab.getTabLevel() == 0;
        if (primaryTab) {
            generator.migratePrimaryTab(adTab);
        } else {
            generator.migrateDetailTab(adTab);
        }
    }
    return adTabId2sections.get(AD_Tab_ID);
}
Also used : I_AD_Tab(org.compiere.model.I_AD_Tab) WindowUIElementsGenerator(org.adempiere.ad.window.process.AD_Window_CreateUIElements.WindowUIElementsGenerator)

Aggregations

WindowUIElementsGenerator (org.adempiere.ad.window.process.AD_Window_CreateUIElements.WindowUIElementsGenerator)1 I_AD_Tab (org.compiere.model.I_AD_Tab)1