You are here: Administration > Extending EDQ > Example custom output selector

Example custom output selector

Custom output selectors are added to a widgets.xmlfile in the same way as OEDQ processors (widgets) and updated to the localselection subdirectory of the config directory.

The following is an example of a script-based gadget for an Output Selector:

  <!-- ************************************************************ -->  

  <!-- script for a simple 'first value' selection gadget -->

  <!-- ************************************************************ -->  

  <widget id="dnm:customselect"

          class="com.datanomic.director.match.library.util.JavaScriptSelectionGadget">

    <guidata>

      <label>%custom.firstvalue.name</label>

      <group>select</group>

      <icon>script</icon>

    </guidata>

    <!-- inputs -->

    <inputs>

      <input id="1" type="string" maxattributes="unlimited">

        <guidata><label>%custom.firstvalue.input</label></guidata>

      </input>

    </inputs>

    <!-- outputs -->

    <outputs cardinality="1:1">

      <output id="1" type="string" name="result">

        <guidata><label>Result</label></guidata>

      <output id="2" type="string" name="success">

        <guidata><label>Success</label></guidata>

      </output>

    </outputs>

<parameters>

      <parameter name="script">

<![CDATA[

function doit()

 {

   output1 = input1[0];

   output2 = "Y";

 }

]]>

      </parameter>

      <parameter name="function">doit</parameter>

    </parameters>

  </widget>

Oracle ® Enterprise Data Quality Help version 9.0
Copyright © 2006,2012, Oracle and/or its affiliates. All rights reserved.