How to add new menu of new module?


#1

When I added a new Module In the axelor-demo .I add a Menu.xml under the scr/main/resources/views path。When i restart the intellj Idea .The left sider of website didn’t have my new menu information. I found the there is no record in the meta_menu of database。

After that,I modified the already exists menu . The menu under axelor-demo-sale .I changed the name “Sales Management” to “Sales Management_new” .When I restarted the Intellj idea ,I found the name of the menu din’t named “Sales Management_new” . SO I don’t know ,How to deal the two problems 。


#2

when you add a menu to need to add it to the user, the group or the role…


#3

What I mean is that when i added a ne menu.xml under the resource directory .and I restart intellj idea .the table (meta_menu) of database no record about I added.


#4

Hi,

All stuff inside domains and views folder are loaded only when you have a fresh database. If your database has been already filled the data inside these folder are ignored. In that case you can delete/create a new database to make a fresh install of to use the import mecanism to load your menus.

Regards


#6

is this normal??
what if i have an in production application and i need to add a new module? do i have to drop the existing database to add this module?? this is none sense!!!


#7

do not confuse: whe you deploy a module, its content is automatically extracted (view, domain, data-init, etc…). If you update this module (eg. modifying a domain) and put the jar inside the webapp, any update inside the jar will be ignored; i that case you have to patch the db youself and to force view refresh.

You can add/remove any module at any time but you can’t update update an existing module just by modifying its jar.


#8

what do you mean patch the database myself?
please help me because i have to drop the database and then create a new one then launch tomcat again and this take up to 25 mins each time i update a view in any model, and keep in mind that this operation is launched on a 2.5 Ghz CPU and 6 GIB Ram VPS!!!


#9

HI,
If you add a new field or a new domain indise your module this modification will be not deployed at the next start. So you have to create tables/colums/foreign key your self. Why ? just because there is not update feature of the DB (too complexe to mange) so the table will be only created when the dabatase is empty.

For views, it’s possible to force the reload by using the “reload” button inside the admin/view/all view grid.

Regards