RC6.4 SideMenu

The icon doesn’t display properly (see attached).
How can I populate the side menu, isn’t automatically populated like main menu?

sideMenu

I’ve shown you just a simple example of using SideMenu component.

Please wait for the new template in Studio, now you cannot use side panel styling, it will be included to final 6.4.0 version. At the moment you can only try to use SideMenu component that represents only menu without header and panel styles.

Hi,

SideMenu component requires vertical space to show menu items, so you have to change your layout.

XML example:


<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
        xmlns:main="http://schemas.haulmont.com/cuba/mainwindow.xsd"
        class="com.company.demo.web.screens.ExtAppMainWindow"
        messagesPack="com.company.demo.web.screens">
    <layout>
        <hbox expand="workArea"
              height="100%"
              width="100%">
            <main:sideMenu
                    width="250px"
                    height="100%"/>
            <main:workArea
                    id="workArea"
                    height="100%">
                <main:initialLayout>
                </main:initialLayout>
            </main:workArea>
        </hbox>
    </layout>
</window>

Controller:


import com.haulmont.cuba.gui.components.AbstractMainWindow;

public class ExtAppMainWindow extends AbstractMainWindow {
}

In Studio 6.4.0 you will be able to use new Side menu main window template:

side-menu-template

Hi Yuriy
Thank for your answer and the sample app. I tried the sample app and do not see anything like the mainWindow image you shared. Can you please share the sample again working?

Hi
I used the template for side menu in V6.4.1 but it was not responsive. Do you have any plan to share a sample app with responsive side menu?

1 Like

Hi,

Responsive main window with SideMenu is a separate template that is available since CUBA 6.4.1 and Studio 6.4.1:

Thus, you have to recreate your main window if you want to use it.

responsive-template