An example of a custom-action element which declares a java custom action and one initialization parameter.
<custom-action>
<java-action>
<java-action-class>com.ibm.serviceregistry.customaction.examples.IncrementVersionNumbers</java-action-class>
</java-action>
<init-params>
<init-param>
<param-name>bundleName</param-name>
<param-value>com.ibm.serviceregistry.customaction.examples.TerseResourceBundle</param-value>
</init-param>
</init-params>
</custom-action>
Following is an example of a custom-action element which declares a JavaScript custom action with inline code.
<custom-action>
<js-action>
<object-name>HomePage</object-name>
<js-content><![CDATA[
function HomePage() {
this.init = function(initParameters, context) {
// always show
return true;
}
this.execute = function(context) {
// go to the homepage
serviceregistry.navigation.homePage();
}
}
]]>
</js-content>
</js-action>
</custom-action>
Following is an example of a custom-action element which declares a JavaScript custom action with included code.
<custom-action>
<js-action>
<object-name>DetailViewer </object-name>
<js-file>/MyWebApp/scripts/detailviewer.js</js-file>
</js-action>
<init-params>
<init-param>
<param-name>TabName</param-name>
<param-value>GovernanceDetail</param-value>
</init-param>
</init-params>
</custom-action>