使用ADF Java API对任务进行修改,以下是示例代码:
import java.util.HashMap;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCDataControl;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.model.binding.DCParameter;
import oracle.adf.model.binding.DCUtil;
import oracle.adf.model.binding.DCVariableBinding;
import oracle.adf.model.binding.DCXmlFormatBinding;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.BindingContainer;
import oracle.adf.model.DataControlFrame;
import oracle.adf.model.fpc.FacesCtrlHierBinding;
import oracle.adf.model.fpc.FacesCtrlHierNodeBinding;
import oracle.adf.model.fpc.FacesCtrlHierRelationBinding;
import oracle.adf.model.fpc.FacesCtrlHierGroupBinding;
import oracle.adf.model.fpc.FacesCtrlListBinding;
import oracle.adf.model.fpc.FacesCtrlSelectBinding;
import oracle.adf.model.fpc.FacesCtrlTableBinding;
import oracle.adf.model.fpc.FacesCtrlTreeBinding;
import oracle.adf.model.fpc.FacesCtrlTreeNodeBinding;
import oracle.adf.model.fpc.FacesCtrlXMLBinding;
import oracle.adf.model.generic.DCDataControlImpl;
import oracle.adf.model.generic.DCDataControlFactoryImpl;
import oracle.adf.model.generic.DCErrorHandlerImpl;
import oracle.adf.model.generic.DCDefinitionImpl;
import oracle.adf.model.generic.DCEntityAccessorImpl;
import oracle.adf.model.generic.DCEntityDefImpl;
import oracle.adf.model.generic.DCInterfaceDefImpl;
import oracle.adf.model.generic.DCPropertyValueImpl;
import oracle.adf.model.generic.DCUIControlDefImpl;
import oracle.adf.model.generic.TriggerImpl;
import oracle.binding.BindingContainerUtils;
import oracle.binding.OperationBinding;
import oracle.jbo.Row;
import oracle.jbo.RowSet;
import oracle.jbo.ViewCriteria;
import oracle.jbo.ViewObject;
import oracle.jbo.common.helpers.*;
import oracle.jbo.common.util.*;
import oracle.jbo.server.ViewAttributeDefImpl;
import oracle.jbo.server.ViewDefImpl;
import oracle.jdeveloper.html.dt.dcm.DynamicClientMethodProvider;
DCBindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter = bc.findIteratorBinding("IteratorName");
ViewObject vo = iter.getViewObject();
Row row = iter.getCurrentRow();
if(row!=null){
row.setAttribute("AttributeName", "NewValue");
vo.getDBTransaction().commit();
}