Versions Compared

Key

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

...

name

type

required

description

plugin

string

yes

Name of the plugin where the model view belongs.

view

string

yes

Name of the view where the component belongs.

model component

string

yes

Name of the model component where the hook listener will be added to.

node value

string

yes

Definition of the hook. Please see an article describing defining hook using XML.

...

Please find below an example of plugin defining one hook module. Lines 8-10 contain a module which defines new on-save hook in model sampleModel which belongs to the plugin otherPlugin.additional column.

Code Block
languagexml
themeEclipse
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<plugin plugin="samplePlugin" version="1.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://schema.qcadoo.org/plugin" 
    xmlns:modelview="http://schema.qcadoo.org/modules/modelview" 
    xsi:schemaLocation="http://schema.qcadoo.org/plugin http://schema.qcadoo.org/plugin.xsd http://schema.qcadoo.org/modules/modelview http://schema.qcadoo.org/modules/modelview.xsd">

    <model<view:modelview-grid-hookcolumn plugin="otherPluginorders" view="ordersList" modelcomponent="sampleModelgrid">
	<view:column name="realizationTime" fields="realizationTime" orderable="true"     <model:onSave class="com.qcadoo.samplePlugin.SampleHookService" method="callMeOnSavesearchable="false" width="30" link="false" />
    </modelview:modelview-grid-field>column>

</plugin>