Dockable split panel - start Docked/Closed?

I’m running Platform v7.2.11 and I am implementing the Main Window with Side Menu interface adding a docked Search Folders panel on the right hand side: MainWindow with Responsive Side Menu and Search Folders on right

I would like the Search Folders menu to start out “closed/docked”. It starts out open to the default pos value:

I would like it to open up like this instead (with the dockable split closed):

I can’t find any way to set this as the default. Is there a way?

I think I’ve solved it. The solution has three parts:

In the file, set:


Set up the ExtMainScreen.xml to include:

            <split id="foldersSplit" dockMode="RIGHT" dockable="true" height="100%" maxSplitPosition="100%"
                   orientation="horizontal" pos="30%" reversePosition="true" settingsEnabled="false" >
                <workArea id="workArea" height="100%" width="100%">
                    <initialLayout margin="true" spacing="true">
                         <-- your layout here --/>
                <foldersPane id="foldersPane" height="100%" width="100%"/>

And then add the following to the

public class ExtMainScreen extends MainScreen implements Window.HasFoldersPane {

    private SplitPanel foldersSplit;
    private FoldersPane foldersPane;
    private AppWorkArea workArea;

    public void onInit(InitEvent event) {

        /* Configure Search Folders pane on the right and closed by default */

        if (webConfig.getFoldersPaneEnabled()) {
            if (webConfig.getFoldersPaneVisibleByDefault()) {
                foldersSplit.setSplitPosition(webConfig.getFoldersPaneDefaultWidth(), SizeUnit.PIXELS, true);
            } else {
                foldersSplit.setSplitPosition(0, SizeUnit.PIXELS, true);
            CubaHorizontalSplitPanel vSplitPanel = (CubaHorizontalSplitPanel) WebComponentsHelper.unwrap(foldersSplit);
            vSplitPanel.setDefaultPosition(webConfig.getFoldersPaneDefaultWidth() + "px");
            vSplitPanel.setMaxSplitPosition(100, Sizeable.Unit.PERCENTAGE);
            vSplitPanel.setMinSplitPosition(0, Sizeable.Unit.PERCENTAGE);
        } else {
            int foldersSplitIndex = getWindow().indexOf(foldersSplit);
            getWindow().add(workArea, foldersSplitIndex);

       /* the rest of your Init code */

    public FoldersPane getFoldersPane() {
        return foldersPane;

   /* the rest of your Main Window class */

Recorded here in case it is helpful. Always open to a better solution. :slight_smile: