Customise main window

Hi,

I am looking to customise the main window in a way that it shows the main menu on the left instead of the bar on top. I have tried several attempts according to the documentation and some suggestions on the forum but it seems the main menu cannot be moved. Each modification to it is reversed when refreshing the XML in studio.

What should be done to get the menu on the left?

Thanks for your time.
Berend T.

Hello, Berend.

Currently, there is no support for the vertical main menu by Platform. But you can hide existing main menu and describe your own, using buttons. We are planning to include this feature to the roadmap, but I can’t certainly say when it will be done.

Regards,

Gleb

Ok, thanks. I will see if I can find another solution to this.

Hmm, I might need some additional hints here. It seems that I can only set some elements in the main window that will hold the menu stuff. But whenever I want to load something from the original menu, it totally replaces the main window content destroying my menu as well.

If I am to build my own menu, I would require it to load in each and every screen meaning there is almost no benefit from using the CUBA screens, menus etc.

I think I’m on the wrong path here but I do not see how to do it otherwise. Any hints?

Hi Gleb, could you take another look at this? See comments below.

I am new to CUBA…but below are my two cents for your requirement.

Try the below vaadin add-on

This link gives details on how to use a vaadin add on with cuba platform.

https://doc.cuba-platform.com/manual-6.1/vaadin_addon_sample.html

Regards,
Chen

1 Like

Hi Chendil,
Thanks for your suggestion but I can’t get this to work either although it certainly is what I’m looking for. When integrating the module I get this error:

Task 'clean, assemble' failed
 org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.vaadin:vaadin-server:7.7.0.alpha3.
Searched in the following locations:
    https://repo.cuba-platform.com/content/groups/work/com/vaadin/vaadin-server/7.7.0.alpha3/vaadin-server-7.7.0.alpha3.pom
    https://repo.cuba-platform.com/content/groups/work/com/vaadin/vaadin-server/7.7.0.alpha3/vaadin-server-7.7.0.alpha3.jar
Required by:
    com.company.sidemenu:app-web:0.1-SNAPSHOT > org.vaadin.teemusa:sidemenu:1.0

I am new to Vaadin as well as Cuba and although things look very promising, the ramp up to getting thing done is still hard.

Well, starting all over again I now made some steps forward. Main thing that I overlooked on my previous attempts was to ‘clear’ the dependency on the default main screen (described here: https://www.cuba-platform.com/blog/whats-new-in-cuba-platform-5-5-and-studio-1-5, where it states “clear the Descriptor extends field and select AbstractMainWindow in the Controller extends field”). This got me going and now am able to build a modified main screen and such.

One thing puzzles me and that is that I extended the Havana layout for the project and then did some style overrides in havana-ext.scss. However, none of these seem to come through.

Could it be that by disconnecting to the default main screen the styling is not included anymore?

Sorry - figured it out already. There are a few things that are in play here:

  • the settings within the application; when started to use the halo theme and doing some settings, the actually applied theme in the application stays the same;
  • when extending a theme, the extended theme may differ from the actual applied theme and therefor not show any modifications.
    This was true in my case and after cleaning up everything (using a new project actually), I managed to get things solved.

HI, it seems that this add-on uses Vaadin 7.7.0 as compile dependency, so you cannot use it with CUBA right now, because CUBA uses Vaadin 7.6.

CUBA will support Vaadin 7.7 since version 6.4.