Customize the Editor Task


Overview

 
The EditorTask control provides a suite of tools for Web-based editing of feature layers in ArcGIS Server map services. The runtime dialog provides tools to modify, add, and remove feature geometry and attributes.  The EditorTask can also be customized and extended to filter attributes, manage tools, handle events during the editing process, and manage panels. 
The following set of requirements apply to the EditorTask capabilities:  
  • The EditorTask requires an ArcGIS Server Local map service.  
  • The ArcGIS Server map service can be either pooled or non-pooled.
  • Both versioned and non-versioned layers can be edited in non-pooled services, while only non-versioned layers can be edited in pooled services.

    At runtime, the Editor panel contains a set of sub panels which contain different items depending on the purpose and feature type being edited.  Editing non-versioned data will change the availability of some commands on the Editor panel.  When using non-versioned data with a pooled service, the Editor panel will not contain a Undo, Redo, or Save button for pooled services.   When using non-versioned data with non-pooled service, the Undo and Redo button will not be available.   Undo and Redo are capabilities of a versioned geodatabase.  The Save option is a capability defined by a non-pooled service.     
  • While the map service can contain many different data types, editable layers for the EditorTask must be ArcSDE enterprise or workgroup layers. 
  • Shapefiles and personal geodatabases cannot be edited with the EditorTask. 
  • The data frame in the map service that contains an editable layer can be projected on the fly by the web ADF or projected within the mxd. (different from EditorTask .Net)
  • If more than one feature layer share the same name in a map service, only one is editable.  It is recommended that each editable layer in a map service have a unique layer name.
  • One WebContext can only associate with one EditorTask.
Customization
While the EditorTask includes a comprehensive set of out-of-the-box capabilities, many Web editing solutions will require customizing the behavior of the EditorTask to satisfy user specific requirements.  The EditorTask offers two options for developing a custom solution:
 
 
  • Using the out-of-the-box EditorTask, add custom functionality by changing the default JSP pages or subclassing the EditorTask and its child controls
  • Using lower level Editing Bussiness Objects to create and reassemble Editing functionality.
 
Option 1 is designed for convenient access to standard EditorTask events in a Web application.   Option 2 is more complex, but provides comprehensive access to the implementation details of the EditorTask and its subcomponents.   It also enables you to package a Web ADF editing solution as a redistributable custom EditorTask control and can even be running on frameworks other than JSF.
 
EditorTask Look and Feel
A web application has EditorTask will contain following files in its web context directory:
 
  • mapviewer.jsp, edit.jsp, settings.jsp, version.jsp, xy.jsp
Those files define the look and feel of an EditorTask.
 
  • arcgis_webcontrols_ags.jar
Core EditorTask java API, Busniess Objects, and other ADF dependencies.
 
 
  • Faces-config.xml, AJAX-renderers.xml
EditorTask managed bean and AJAX renderer.
 
  • All Editing related JavaScript functions for the Web ADF framework are in js/esri/adf/EditTask.js. 
  • The EditorTask configuration is done through this adf.EditTask object which is an instance of the adf.EditTaskSettings Class. This class defines the configuration and creates the UI for the Editing Task. See adf.EditTaskSettings API documentation for more details under the Reference section.  All javascript functions related to Editing Task are accessed through adf.EditTask object.
 
To change look and feel of EditorTask, we need to deal with 4 jsp files (mentioned above).
Instructions are listed step by step below.
 
STEP 1: Init method
The inline script inside edit.jsp is the entry point of the out-of-box Editor Task which is shown below.
[JavaScript]
 < script type = "text/javascript" > adf.addOnLoad(function(){
    /** Initializes the Editing Task*/
    adf.EditTask.mapId = "map1"; 
    /* edit window */
    adf.EditTask.editDivId = "esri_editDiv"; adf.EditTask.selectEditLayerId = 
        "selectEditLayerId"; adf.EditTask.editorWindowsRefreshId = 
        "editorWindowsRefreshId"; 
    /* edit version window */
    adf.EditTask.editVersionDivId = "esri_editVersionDiv";
        adf.EditTask.selectEditVersionId = adf.EditTask.formId + 
        ":editVersionSubview:selectEditVersionId"; 

    /* settings window */
    adf.EditTask.settingsDivId = "esri_editSettingsDiv";
        adf.EditTask.editSnappingRulesDiv = "editSnappingRulesDiv";
        adf.EditTask.snapTolId = "editconfig_snapTolerance";
        adf.EditTask.snapEnabledId = "editconfig_snapEnabled";
        adf.EditTask.snapColorId = "editconfig_snapTipsColor"; 
    /* xy window */
    adf.EditTask.xyDivId = "esri_editXYDiv"; 

    if (adf.Controls.maps[wma.mapId] != null){
        adf.hitch(adf.EditTask, adf.EditTask.initEditor)(); 
    }
    else{
        adf.subscribe("/adf/app/init", adf.hitch(adf.EditTask,
            adf.EditTask.initEditor)); 
    }
}

);
 <  / script >
This registers the initEditor function to be called when the ADF Web Application has initialized the map and other basic controls required for ADF Application before the EditTask can be initialized. It uses dojo’s publish-subscribe mechanism to achieve this.
The mapviewer.js has set of Div Elements as shown below on which the Editor Task UI will be added, when initEditor gets executed.
[HTML]
<div style="display:none">
  <div id="esri_editVersionDiv">
    <jsp:include page="version.jsp"/>
  </div>
  <div id="esri_editDiv">
    <jsp:include page="edit.jsp"/>
  </div>
  <div id="esri_editSettingsDiv">
    <jsp:include page="settings.jsp"/>
  </div>
  <div id="esri_editXYDiv">
    <jsp:include page="xy.jsp"/>
  </div>
</div>
When InitEditor is executed the back bean EditBean will get initialized; some of the panels/windows defined within the div will be created to the above mapviewer div elements. They are still hidden until you launch EditorTask.
STEP 2: Launch EditorTask
 
 
 
 
 
 
 
MapViewer.jsp:
[HTML]
<div id="task-menu" class="tasks-menu">
  <ul>
    <li class="menu-bar">
      <a
        href="#"
        class="menu-header"
        title="Editing"
        onclick="adf.EditTask.showEditorWindow();">
        <span>
          Editing::1
        </span>
      </a>
    </li>
  </ul>
</div>
Click on the “Editing::1” on the MapViewer, you will invoke a JavaScript call “adf.EditTask.showEditorWindow();”. It is defined in js/esri/adf/EditTask.js, and it is an AJAX call. We will have more details of it in the following sections.
 
STEP3: Workspace chooser Window
 
Starting from 9.3.1, the Java ADF editing task allows editing multiple workspaces in the multiple resources that have been added to the application.
 
The corresponding JSP page for this window is version.jsp, which is included in mapViewer.jsp:
<div id="esri_editVersionDiv"><jsp:include page="version.jsp" /></div>
 
As mentioned earlier the adf.EditTask.showEditorWindow() method handles the window initialization. It is an AJAX call, the response handled by adf.EditTask.editorShowWindowHandler(). You can override this handler to change the pages navigation.
An editing workspace chooser is shown below. The first drop down box has all the editable workspaces (configurations) that have been setup while creating the application in Manager or using the IDE plug-ins. If editable layers in a particular workspace are versioned, the second drop down list will show the versions corresponding to the chosen workspace.
 
 
[XML]
 <h:outputText id="selectConfigBean" value="#{mapContext.attributes.mapEditor.selectConfigLabel}" 
                                rendered="#{mapContext.attributes.mapEditor.numberOfConfig > 1}"></h:outputText>
 <h:selectOneMenu id="selectEditConfigBeanId" value="#{mapContext.attributes.mapEditor.configurationName}" 
                  immediate="true" rendered="#{mapContext.attributes.mapEditor.numberOfConfig > 1}"
                  onchange="adf.EditTask.refreshVersionsRequest(this.value);">
     <f:selectItems value="#{mapContext.attributes.mapEditor.configurationNames}" />
 </h:selectOneMenu>
 <h:outputText id="selectversion" value="#{mapContext.attributes.mapEditor.selectVersionLabel}"></h:outputText>
 <h:selectOneMenu id="selectEditVersionId" value="#{mapContext.attributes.mapEditor.version}" immediate="true" 
                  disabled="#{mapContext.attributes.mapEditor.numberOfVersions < 2}">
     <f:selectItems value="#{mapContext.attributes.mapEditor.versions}" />
 </h:selectOneMenu>
 <a:button id="startEditing" mapId="map1" type="button" value="#{mapContext.attributes.mapEditor.startEditingLabel}" 
                onclick="adf.EditTask.refreshEditorRequest('startEditing','startEditing');return false;" serverAction="#{mapContext.attributes.mapEditor.refresh}"/>
STEP4: Editor Window
Editor window is the main window of an EditorTask, which is defined in edit.jsp.
 
 
 
Take a look at edit.jsp, the GUI elements and JSF elements match are quite straight forward.
Most of JAVA IDEs provide visualized environments to help you change layout of JSP too:
 
 
 
By moving around the elements in the JSP, you can change the editor window to following layout:
 
 
You must have noticed a new JSF control used in edit.jsp: “button”. It is new in 9.3 and is a customized JSF control.  
 
 
Buttons
Here is the definition of the button:
[XML]
<tag>
  <name>button</name>
  <tag-class>com.esri.adf.web.faces.taglib.ButtonTag</tag-class>
  <body-content>empty</body-content>
  <description>Button control.</description>
  <attribute>
    <name>id</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
      Programmatic name of the control.
        Best practice to use the id name same as the server action method name if serverAction defined.
        For Example, id="
      <b>addPoint
      </b>
      " serverAction="#{myContext.attributes.myAttribute.<b>addPoint</b>
      }"
    </description>
  </attribute>
  <attribute>
    <name>mapId</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    <description>References an id associated with the map control.</description>
  </attribute>
  <attribute>
    <name>serverAction</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    <description>
      MethodBinding representing the application action to invoke when
      this component is activated by the user.  The expression must
      evaluate to a public method that takes a MapEvent (with clientAction)
      or no parameters (with no clientAction), and returns void.
      The id name should be same as the server action method name if serverAction defined.
    </description>
  </attribute>
  <attribute>
    <name>clientAction</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>Tool client action.</description>
  </attribute>
  <attribute>
    <name>defaultImage</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>References a default image associated with the button control.</description>
  </attribute>
  <attribute>
    <name>hoverImage</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>References a hover image associated with the button control.</description>
  </attribute>
  <attribute>
    <name>selectedImage</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>References a selected image associated with the button control.</description>
  </attribute>
  <attribute>
    <name>rendered</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
      Flag indicating whether or not this component should be rendered (during Render Response Phase),
        or processed on any subsequent form submit.
    </description>
  </attribute>
  <attribute>
    <name>value</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>The value binding expression for the backing bean associated with this control.</description>
  </attribute>
  <attribute>
    <name>type</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>The content type of the input.</description>
  </attribute>
  <attribute>
    <name>style</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>CSS style(s) to be applied when this component is rendered.</description>
  </attribute>
  <attribute>
    <name>styleClass</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
      Space-separated list of CSS style class(es) to be applied when this element is rendered.
        This value must be passed through as the "class" attribute on generated markup.
    </description>
  </attribute>
  <attribute>
    <name>disabled</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
      Flag indicating that this element must never
      receive focus or be included in a subsequent
      submit.
    </description>
  </attribute>
  <attribute>
    <name>toolTip</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>Tool tips information.</description>
  </attribute>
  <attribute>
    <name>onclick</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <description>
      Javascript code executed when a pointer button is clicked over this element.
    </description>
  </attribute>
</tag>
There are 2 basic button usages:
 
  • A Button with client action and server action
  • A Button with only server action
 
A sample for the first one is “select”. You move your mouse draw a select box on the map (a client action) and highlight the selections (a server action). “delete” is a sample for second one. To delete selected features you only need to click the button, which is a server action.
 
What is a server action? It is a method of the backing bean “EditBean”.
 
For Example:
[XML]
<a:button
  id="select"
  mapId="map1"
  clientAction="adf.MapRectangle"
  serverAction="#{mapContext.attributes.mapEditor.select}"
  defaultImage="./images/tasks/editing/selectfeature.gif"
  hoverImage="./images/tasks/editing/selectfeatureU.gif"
  selectedImage="./images/tasks/editing/selectfeatureD.gif"/>
The  server action of this “select” button is binding to:
mapContext.attributes.mapEditor.select .
 
Open your faces-config.xml you will see the “mapEditor” refers to an instance of
 
com.esri.adf.web.ags.data.edit.bean.EditBean
 
It  has a method:
  public void select(MapEvent event)
The argument event is pasted over from client action, which carry the geometry created by client action “ EsriMapRectangle ”, for this sample, it is a WebGeometry “WebExtent” ADF object.
 
What is a client action? It is a javascript function. “ EsriMapRectangle ” is defined in esri_map.js  There are some client actions specific defined for EditorTask in esri_edit.js, and those actions support “snap tips” function.
 
Delete button has no client action:
[XML]
<a:button
  id="delete"
  mapId="map1"
  serverAction="#{mapContext.attributes.mapEditor.delete}"
  defaultImage="./images/tasks/editing/delete.gif"
  hoverImage="./images/tasks/editing/deleteU.gif"
  selectedImage="./images/tasks/editing/deleteD.gif"
  disabled="#{!mapContext.attributes.mapEditor.selected}"
  toolTip="EditTask.TaskInfo.Tip.deletefeature"/>
The correspond server method is EditBean.delete () Which has no argument.
 
You may need to link a javascript function to a button but not necessarily a client action. you may use “onclick” event:
[XML]
<a:button
  id="startEditing"
  mapId="map1"
  type="button"
  value="#{mapContext.attributes.mapEditor.startEditingLabel}"
  onclick="adf.EditTask.refreshEditorRequest('startEditing','startEditing');"
  serverAction="#{mapContext.attributes.mapEditor.refresh}"/>
It is not hard to customize an EditorTask with buttons.
Let’s take “select” as a example. To override the default behavior of the button, you can follow those steps:
 
Step 1: Extend EditBean
 
[Java]
package com.esri.adf.web.test.ags.data.edit.bean;
import com.esri.adf.web.ags.data.edit.action.SelectByExtent;
public class EditEx extends EditBean{
    private static final long serialVersionUID = 1L;
    /**
     * Instantiates an object of EditEx.
     */
    public EditEx(){
        super();
    }
    /**
     * Overrides the default "select" action.
     * @param event the map event from browser.
     */
    public void xorSelect(MapEvent event){
        try{
            // convert spatial reference
            WebGeometry extent = toMapGeometry(event.getWebGeometry());

            // get select bounds
            IEnvelope env = EditWebUtil.toEnvelope((WebExtent)extent, getCache()
                .getServerContext());

            // create select action
            SelectByExtent select = new SelectByExtent(env);

            // set XOR mode
            select.setXorMode(true);

            // process select action
            process(select, true);

            // refresh screen
            getWebContext().refresh();
        }
        catch (Exception e){
            e.printStackTrace();
        }
    }
}
Step 2: Change faces-config.xml
[XML]
<managed-bean>
  <managed-bean-name>mapEditor</managed-bean-name>
  <managed-bean-class>com.esri.adf.web.test.ags.data.edit.bean. EditEx</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
    <property-name>taskConfig</property-name>
    <value>#{taskConfig1}</value>
  </managed-property>
</managed-bean>
Step 3: Bind the new server action
[XML]
<a:button
  id="select"
  mapId="map1"
  clientAction="adf.MapRectangle"
  serverAction="#{mapContext.attributes.mapEditor.xorSelect}"
  defaultImage="./images/tasks/editing/selectfeature.gif"
  hoverImage="./images/tasks/editing/selectfeatureU.gif"
  selectedImage="./images/tasks/editing/selectfeatureD.gif"
  toolTip="EditTask.TaskInfo.Tip.selectfeatures"/>
For more complex cases, you may need to create your own EditActions, which will be covered in next sections.  
Events and AJAX Commands
You should have noticed the “button” is AJAX enabled, which is different than generic JSF controls. For example, after you select a feature on the map, you will get all the associated attributes of that feature. In the edit.jsp, we only have one empty div there. Where are those attributes come from?

 
[HTML]
<div
  id="attsDiv"
  style="border: thin solid rgb(190, 190, 190); width: 100%; overflow:auto; text-align: center; color: #444444; font-family: verdana; margin-bottom: 3px;">
  No features selected
</div>
Let’s take a close look of “select”.
[XML]
<a:button
  id="select"
  mapId="map1"
  clientAction="adf.MapRectangle"
  serverAction="#{mapContext.attributes.mapEditor.select}"
  defaultImage="./images/tasks/editing/selectfeature.gif"
  hoverImage="./images/tasks/editing/selectfeatureU.gif"
  selectedImage="./images/tasks/editing/selectfeatureD.gif"
  toolTip="EditTask.TaskInfo.Tip.selectfeatures"/>
#1. The client action of select is “adf.MapRectangle ”. The postback handler is “ adf.Controls.processPostBack ”:
 
adf.Utils.submitForm(map.formId,self.clientPostBack,adf.Controls.processPostBack);  
 
#2. The initEditor() method (in adf.EditTaskSettings) registered an “editBeanHandler” method to handle element “EditBean” in responses.
//register postback tag handler
adf.Controls.addPostBackTagHandler( "EditBean" , editBeanHandler);
 
#3. The EditBean ” element is created by EditBean .toXML (Element root).
It returns all the selected features info:
[XML]
<EditBean
  message="Features Selected"
  redo="false"
  selected="true"
  shape="POINT"
  undo="false"
  vertices="false">
  <selectedAttributes index="0" next="false" oid="9" pre="false" size="1">
    <selectedAttribute index="15" name="P_OTHER" readOnly="false" type="3" value="0.77"/>
    <selectedAttribute index="4" name="ELEVATION" readOnly="false" type="0" value="2726"/>
    <selectedAttribute index="19" name="P_65_UP" readOnly="false" type="3" value="11.91"/>
    <selectedAttribute index="8" name="P_MALES" readOnly="false" type="3" value="48.34"/>
    <selectedAttribute index="11" name="P_BLACK" readOnly="false" type="3" value="0.58"/>
    <selectedAttribute index="16" name="P_UNDER5" readOnly="false" type="3" value="7.44"/>
    <selectedAttribute index="18" name="P_18_64" readOnly="false" type="3" value="62.480000000000004"/>
    <selectedAttribute index="3" name="STATE_NAME" readOnly="false" type="4" value="Idaho"/>
    <selectedAttribute index="7" name="POP1990" readOnly="false" type="1" value="125738"/>
    <selectedAttribute index="12" name="P_AMERI_ES" readOnly="false" type="3" value="0.64"/>
    <selectedAttribute index="17" name="P_5_17" readOnly="false" type="3" value="18.17"/>
    <selectedAttribute index="2" name="STATE_FIPS" readOnly="false" type="4" value="16"/>
    <selectedAttribute index="13" name="P_ASIAN_PI" readOnly="false" type="3" value="1.57"/>
    <selectedAttribute index="9" name="P_FEMALES" readOnly="false" type="3" value="51.660000000000004"/>
    <selectedAttribute index="6" name="STATE_CITY" readOnly="false" type="4" value="1608830"/>
    <selectedAttribute index="1" name="CITY_NAME" readOnly="false" type="4" value="Boise"/>
    <selectedAttribute index="14" name="P_HISPANIC" readOnly="false" type="3" value="2.72"/>
    <selectedAttribute index="10" name="P_WHITE" readOnly="false" type="3" value="96.44"/>
    <selectedAttribute index="5" name="CITY_FIPS" readOnly="false" type="4" value="08830"/>
  </selectedAttributes>
  <EditLayers size="7">
    <option index="0" name="Capitals_v" selected="selected"/>
    <option index="1" name="Cities_v"/>
    <option index="2" name="Rivers_v"/>
    <option index="3" name="Roads_v"/>
    <option index="4" name="Counties_v"/>
    <option index="5" name="Lakes_v"/>
    <option index="6" name="States_v"/>
  </EditLayers>
  <ConfigBean
    hlColor="0,255,255"
    maxSelectionCount="-1"
    snapEnabled="false"
    snapTipsColor="250,153,0"
    snapTolerance="10"
    tolerance="10"
    verticesColor="255,0,0">
    <SnapRules edge="false" end="false" id="0" layer="Capitals_v" vertex="false"/>
    <SnapRules edge="false" end="false" id="1" layer="Cities_v" vertex="false"/>
    <SnapRules edge="false" end="false" id="2" layer="Rivers_v" vertex="false"/>
    <SnapRules edge="false" end="false" id="3" layer="Roads_v" vertex="false"/>
    <SnapRules edge="false" end="false" id="4" layer="Counties_v" vertex="false"/>
    <SnapRules edge="false" end="false" id="5" layer="Lakes_v" vertex="false"/>
    <SnapRules edge="false" end="false" id="6" layer="States_v" vertex="false"/>
  </ConfigBean>
</EditBean>
#4. editBeanHandler (in adf.EditTaskSettings) creates the attributes elements dynamically based on the response(see function showSelectedAttributes(xml, attsDiv) method )
 
By modifying showSelectedAttributes function, you can create an attributes panel in your own style. However. for just attributes filtering, you can also use an interface:
 
com.esri.adf.web.ags.data.edit.ActionEventListener
 
With some code like this:
[Java]
public Attribute filter(Attribute attribute){
    attribute.setReadOnly(true);
    return attribute;
}
You can disable all the attribute input boxes. See javadoc for more details.
 
Sometimes you need extract power to handle dynamic editor request. For example, once you change an attribute, you need to update map service. You may already find out all the attribute input elements are binding to an AJAX request “updateAttributeRequest”:
 
select_input.onchange=function(){updateAttributeRequest(this.id,this.value);}
 
The method has an inner variable like this:
 
var params = "EditBean=EditBean&AJAXServerAction=updateAttributes&id=" + id + "&value=" + value;
 
&AJAXServerAction=updateAttributes ” actually is a method name of EditBean:
   
public void updateAttributes(Map<?, ?> request, Element response)
 
The updateAttributeRequest method invokes the backbean method “updateAttributes”, and past back an “Element response” to client javascript handler:
[XML]
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <EditorWindow window="edit" windowOpened="true"/>
  <EditBean
    message=""
    redo="false"
    selected="true"
    shape="POINT"
    undo="true"
    vertices="false">
    <selectedAttributes index="0" next="false" oid="9" pre="false" size="1">
      <selectedAttribute index="15" name="P_OTHER" readOnly="false" type="3" value="0.776"/>
      <selectedAttribute index="4" name="ELEVATION" readOnly="false" type="0" value="2726"/>
      <selectedAttribute index="19" name="P_65_UP" readOnly="false" type="3" value="11.91"/>
      <selectedAttribute index="8" name="P_MALES" readOnly="false" type="3" value="48.34"/>
      <selectedAttribute index="11" name="P_BLACK" readOnly="false" type="3" value="0.58"/>
      <selectedAttribute index="16" name="P_UNDER5" readOnly="false" type="3" value="7.44"/>
      <selectedAttribute index="18" name="P_18_64" readOnly="false" type="3" value="62.480000000000004"/>
      <selectedAttribute index="3" name="STATE_NAME" readOnly="false" type="4" value="Idaho"/>
      <selectedAttribute index="7" name="POP1990" readOnly="false" type="1" value="125738"/>
      <selectedAttribute index="12" name="P_AMERI_ES" readOnly="false" type="3" value="0.64"/>
      <selectedAttribute index="17" name="P_5_17" readOnly="false" type="3" value="18.17"/>
      <selectedAttribute index="2" name="STATE_FIPS" readOnly="false" type="4" value="16"/>
      <selectedAttribute index="13" name="P_ASIAN_PI" readOnly="false" type="3" value="1.57"/>
      <selectedAttribute index="9" name="P_FEMALES" readOnly="false" type="3" value="51.660000000000004"/>
      <selectedAttribute index="6" name="STATE_CITY" readOnly="false" type="4" value="1608830"/>
      <selectedAttribute index="1" name="CITY_NAME" readOnly="false" type="4" value="Boise"/>
      <selectedAttribute index="14" name="P_HISPANIC" readOnly="false" type="3" value="2

.72"/>
      <selectedAttribute index="10" name="P_WHITE" readOnly="false" type="3" value="96.44"/>
      <selectedAttribute index="5" name="CITY_FIPS" readOnly="false" type="4" value="08830"/>
    </selectedAttributes>
    <EditLayers size="7">
      <option index="0" name="Capitals_v" selected="selected"/>
      <option index="1" name="Cities_v"/>
      <option index="2" name="Rivers_v"/>
      <option index="3" name="Roads_v"/>
      <option index="4" name="Counties_v"/>
      <option index="5" name="Lakes_v"/>
      <option index="6" name="States_v"/>
    </EditLayers>
    <ConfigBean
      hlColor="0,255,255"
      maxSelectionCount="-1"
      snapEnabled="false"
      snapTipsColor="250,153,0"
      snapTolerance="10"
      tolerance="10"
      verticesColor="255,0,0">
      <SnapRules edge="false" end="false" id="0" layer="Capitals_v" vertex="false"/>
      <SnapRules edge="false" end="false" id="1" layer="Cities_v" vertex="false"/>
      <SnapRules edge="false" end="false" id="2" layer="Rivers_v" vertex="false"/>
      <SnapRules edge="false" end="false" id="3" layer="Roads_v" vertex="false"/>
      <SnapRules edge="false" end="false" id="4" layer="Counties_v" vertex="false"/>
      <SnapRules edge="false" end="false" id="5" layer="Lakes_v" vertex="false"/>
      <SnapRules edge="false" end="false" id="6" layer="States_v" vertex="false"/>
    </ConfigBean>
  </EditBean>
</response>
In another words, you extend EditBean to have you own method like this:
[Java]
public void myAJAXMethod(Map <  ? ,  ?  > request, Element response)
You can invoke it from JavaScript by
[JavaScript]
var params = "EditBean=EditBean&AJAXServerAction=myAJAXMethod&id=" + id + "&value=" 
    + value;

//Send AJAX request and set response processing function
var xmlHttp = adf.Utils.sendAjaxRequest(url, params, true,
    updateMapInformationResponse)
You may need to extend the javascript function “ updateEditorResponse ” to handle HTML rendering too.
 

Editing Business Objects

This is a more complex way to change out-of-box EditorTask. But it is powerful too.
 
Editing Business Objects provide 2 levels object to help you build up your own Editor with no dependency on JSF or ADF APIs.
Level 1 is utilities classes. They are static methods, you can just invoke them.
Level 2 is to use EditActions. We created a set of EditActions which are the core of the out-of-box EditorTask.
 
 
 
You can use them or extends them. Also you can create your own actions.
 
The following UML class and sequence diagram show the basic structure of  a “copy” feature:
 
 
\
 
 






Development licensing Deployment licensing
Server Server