Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each region within the layout can have a different type, where the type determines how the content added to the region is displayed, tab is the default if not set and the available types are: tab::

Type

Description

tab

Multiple views can be added to the region with tabs being added to the region to allow the user to switch between the contained content

...

accordion

Multiple views can be added to the region with collapsible labels added to the region to allow the user to switch between the contained content

fit

...


One view can be added to the regions and the view will be sized to take up the entire available area

border

...


No views can be added to the region, instead the region is given its own layout and views are added to that layout

If no layout in configured in the client then a single center region will be created. The type of this default center region will be either tab or a fit depending upon the number of views that are added to it, if there's only one view then it'll be fit, but if there's more that one view then it'll be tab.

...

Code Block
xml
xml
linenumberstrue
<layout>
	<center type="tab"/>
	<west width="300" type="tab"/>
</layout>

which looks like

{{LayoutSample1.png}}

Image Added

the first thing we do is to change the west type to border (which is temporarily invalid, because a border type always needs the layout content)

...

Code Block
xml
xml
linenumberstrue
<layout>
	<center type="tab"/>
	<west width="300" type="border">
		<layout>
			<center type="tab"/>
			<south type="fit" height="200"/>
		</layout>
	</west>
</layout>

{{LayoutSample2.png}}Image Added

So basically what used to be west is now west.center and we have a new west.south region (we could also add a north, east and/or west)

...

Code Block
xml
xml
linenumberstrue
<layout>
	<center name="map" type="tab"/>
	<west width="300" type="border">
		<layout>
			<center name="toc" type="tab"/>
			<south name="logo" type="fit" height="200"/>
		</layout>
	</west>
</layout>

{{LayoutSample3.png}}Image Added

This can be applied recursively and to each of the five regions available in a layout

Code Block
xml
xml
linenumberstrue
<layout>
	<center type="border">
		<layout>
			<center type="tab"/>
			<west type="fit" width="100"/>
		</layout>
	</center>
	<west width="300" type="border">
		<layout>
			<center type="tab"/>
			<south type="fit" height="100"/>
		</layout>
	</west>
	<south type="tab" height="200"/>
	<east width="400" type="border">
		<layout>
			<center type="border">
				<layout>
					<east type="fit" width="100"/>
					<center type="tab"/>
				</layout>
			</center>
			<north type="fit" height="200"/>
		</layout>
	</east>
</layout>

{{LayoutSample4.png}}Image Added

Also, you should set a default height for north and south regions and a default width for east and west.
Further for north, south, east and west a minSize and maxSize should be provided if you set split to true. If split is false or not set then the region can't be resized.
You can also set collapsible to true to allow for easy collapsing of the region

...

Code Block
xml
xml
linenumberstrue
<layout>
	<center name="map" type="tab"/>
	<west width="300" type="border" collapsible="true">
		<layout>
			<toolbar>
				<item action="..."/>
			</toolbar>
			<center name="toc" type="tab"/>
			<south name="logo" type="fit" height="200"/>
		</layout>
	</west>
	<statusbar>
		<item component="..."/>
	</statusbar>
</layout>

{{LayoutSample5.png}}Image Added

Finally, keep in mind that the toolbar and statusbar added to the layout is in addition to the global toolbar and statusbar that are outside of the layout (not that you have to define any of them if you don't want to).