Table of Contents |
---|
...
9. View extensions
To Sometimes to add additional content to existing views sometimes it is necessary to create 'viewExtensions' xml file (see View Tab Module or View Ribbon Group Module).
9.1. ribbon extension
...
View Ribbon extension xml file must have structuremust be defined as:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<viewExtensions <?xml version="1.0" encoding="UTF-8"?> <ribbonExtension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/viewmodules/ribbonExtension" xsi:schemaLocation="http://schema.qcadoo.org/viewmodules/ribbonExtension http://schema.qcadoo.org/modules/viewribbonExtension.xsd"> // HERE YOU PUT VIEW EXTENSIONS </viewExtensions> |
9.2. ribbon extension
Ribbon extension must be defined as:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<ribbonExtension plugin="pluginIdentifier" view="viewName"> // HERE YOU PUT RIBBON EXTENSIONSGROUPS </ribbonExtension> |
Where:
- pluginIdentifier - is a identifier of plugin with extending view
- viewName - is a name of extending view
Ribbon extensions are definitions of ribbon groups to add to existing ribbon. For more information about ribbon group definition see 'ribbon groups section'.
9.
...
2. window tab extension
Window tab extension must be defined as:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="UTF-8"?> <windowTabExtension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/modules/windowTabExtension" xsi:schemaLocation="http://schema.qcadoo.org/modules/windowTabExtension http://schema.qcadoo.org/modules/windowTabExtension.xsd" plugin="pluginIdentifier" view="viewName"> // HERE YOU PUT WINDOW TAB </windowTabExtension> |
...
- pluginIdentifier - is a identifier of plugin with extending view
- viewName - is a name of extending view
windowTabExtension tag chould should contains single window tab definition. For more information about window tab definition see 'tabbed window section'.
9.
...
3. example
Here is example that extends product view with some fields and add some ribbon items:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<viewExtensions<ribbonExtension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/modules/viewribbonExtension" xsi:schemaLocation="http://schema.qcadoo.org/modules/viewribbonExtension http://schema.qcadoo.org/modules/viewribbonExtension.xsd"> <ribbonExtension plugin="basic" view="product"> <group name="export"> <bigButton name="exportProduct" action="#{form}.fireEvent(exportProduct);" /> </group> </ribbonExtension> |
AAA
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<windowTabExtension </ribbonExtension> <windowTabExtension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/modules/windowTabExtension" xsi:schemaLocation="http://schema.qcadoo.org/modules/windowTabExtension http://schema.qcadoo.org/modules/windowTabExtension.xsd" plugin="basic" view="product"> <windowTab name="productAdditionalData" reference="productAdditionalData"> <component type="gridLayout" name="productAdditionalDataLayout" columns="3" rows="4"> <layoutElement column="1" row="1"> <component type="input" name="additionalNumber" field="#{form}.additionalNumber" /> </layoutElement> <layoutElement column="1" row="2" height="2"> <component type="textarea" name="additionalDescription" field="#{form}.additionalDescription" /> </layoutElement> <layoutElement column="1" row="4"> <component type="checkbox" name="enableAdditionalFunctionality" field="#{form}.enableAdditionalFunctionality" default="true"> </layoutElement> </component> </windowTab> </windowTabExtension> </viewExtensions> |