Automatic opening of menu entries at login

Activity

Show:

Nicolas Micoud October 12, 2016 at 1:04 PM

Thanks , tested again and it worked. I must have forget something this morning !
, please find a patch that move AutomaticLogin stuff from AdempiereWebUI to DefaultDesktop to fix bug described in yesterday's comment.

Thanks & Regards,

Nicolas

Hiep Lq October 12, 2016 at 12:40 PM

not sure about best place, just follow your code snippet.
why not

try {
ServerContext.setCurrentInstance(ctx);
renderHomeTab();
automaticOpen();
} finally {
ServerContext.dispose();
}

Nicolas Micoud October 12, 2016 at 7:13 AM

Hi , thanks for answering.
I try to put it elsewhere but i was not able to find the perfect place, there was always something missing (current userID, Context, ...)
So, at the end, i do the following :

In DefaultDesktop, add a new method:

which is called from DefaultDesktop.doCreatePart

So the call of automaticOpen is done only at login.

Do you see another way to achieve it ?

Thanks,

Nicolas

Hiep Lq October 11, 2016 at 7:36 PM

renderHomeTab is called at WGadgets, so it isn't a good place.

Nicolas Micoud October 11, 2016 at 12:07 PM

Hi ,

Found a bug...
If the first object opened is a window, then its title became the tab browser name.
After some debug, i found that the window is registered before the "Home" (means that the windows has WindowNo=0 and Home has WindowNo = 1).

So I remove all stuff from ADempiereWebUI and put it in DefaultDesktop.renderHomeTab(), right after the dashboardController.render(homeTab, this, true);

In my local 2.1 version, the method looks like :

I also move automaticOpen() and getMenuID from AdempiereWebUI to DefaultDesktop.

As I'm not sure it's the best thing to do, i do not create a patch to fix this.
Can you confirm it or give advice ?

Thanks,

Nicolas

Fixed

Details

Assignee

Reporter

Labels

Priority

Created January 11, 2016 at 12:25 PM
Updated November 10, 2021 at 8:45 PM
Resolved October 14, 2016 at 9:16 AM