Versions Compared

Key

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

...

View extension xml file must have structure:

Code Block
languagexml
themeEclipse
linenumberstrue
<viewExtensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://schema.qcadoo.org/view" 
        xsi:schemaLocation="http://schema.qcadoo.org/view http://schema.qcadoo.org/view.xsd">

      // HERE YOU PUT VIEW EXTENSIONS

</viewExtensions>

...

Ribbon extension must be defined as:

Code Block
languagexml
themeEclipse
linenumberstrue
<ribbonExtension plugin="pluginIdentifier" view="viewName">

      // HERE YOU PUT RIBBON EXTENSIONS

</ribbonExtension>

...

Window tab extension must be defined as:

Code Block
languagexml
themeEclipse
linenumberstrue
<windowTabExtension plugin="pluginIdentifier" view="viewName">

      // HERE YOU PUT WINDOW TAB

</windowTabExtension>

...

Here is example that extends product view with some fields and add some ribbon items:

Code Block
languagexml
themeEclipse
linenumberstrue
<viewExtensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://schema.qcadoo.org/view" xsi:schemaLocation="http://schema.qcadoo.org/view http://schema.qcadoo.org/view.xsd">

     <ribbonExtension plugin="basic" view="product">
          <group name="export">
               <bigButton name="exportProduct" action="#{form}.fireEvent(exportProduct);" />
          </group>
     </ribbonExtension>

     <windowTabExtension 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>