Saturday, March 5, 2016

Default Filter Value in af:table Filter

When we Enable Sorting and Filtering and need to Default value in Filter for First or each time ,
create bean with table handle

public class MyBean {
    public MyBean() {
    }
public FilterableQueryDescriptor getCustomQueryDescriptor() {
        String bindingEl = "#{bindings.MyVO1Query}";

        FacesCtrlSearchBinding sbinding =
            (FacesCtrlSearchBinding)JSFUtil.resolveExpression(bindingEl);
        FilterableQueryDescriptor fqd =
            (FilterableQueryDescriptor)sbinding.getQueryDescriptor();
        if (fqd != null &&
            fqd.getConjunctionCriterion() != null  && isInitialQuery()) {
            ConjunctionCriterion cc = fqd.getConjunctionCriterion();
            List<Criterion> lc = cc.getCriterionList();
            for (Criterion c : lc) {
                if (c instanceof AttributeCriterion) {
                    AttributeCriterion ac = (AttributeCriterion)c;
                    if ((ac.getAttribute().getName().equalsIgnoreCase("Status")) &&
                        ac.getValues().isEmpty()) { 
                        Map filterCriteria = fqd.getFilterCriteria();
                        if (filterCriteria == null) {
                            filterCriteria = new HashMap<String, Object>();
                            fqd.setFilterCriteria(filterCriteria);
                        }
                        filterCriteria.put("Status", "PENDING");
                    }
                }
            }
            setInitialQuery(false);
            RichTable tbl = getMyTable();
            QueryEvent queryEvent = new QueryEvent(tbl, fqd);
            sbinding.processQuery(queryEvent);
        }
        return fqd;
    }

}

Change af:table property
filterModel="#{pageFlowScope.MyBean.customQueryDescriptor}"

References
http://lucbors.blogspot.com/2015/08/adf-1213-implementing-default-table.html
https://community.oracle.com/thread/2232873?tstart=0
http://www.awasthiashish.com/2013/11/apply-filter-on-aftable-column.html

Monday, January 25, 2016

JDeveloper 11.1.1.7.0 Could not reserve enough space for object heap

While Running Integrated Weblogic Server instance got Error

C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client   -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m  -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Djavax.net.ssl.trustStore=C:\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks -Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true  -Xverify:none  -da -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server  -Djps.app.credential.overwrite.allowed=true -Dcommon.components.home=C:\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\Users\jeet\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1 -Djrockit.optfile=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.dir=C:\Users\jeet\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1\servers\DefaultServer -Doracle.domain.config.dir=C:\Users\jeet\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1  -Digf.arisidbeans.carmlloc=C:\Users\jeet\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1\carml  -Digf.arisidstack.home=C:\Users\jeet\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\Users\jeet\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\Users\jeet\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\servers\DefaultServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.oamprovider_11.1.1,C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jps_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol  -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=C:\Users\jeet\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\oracle\store\gmds   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath  weblogic.Server

Error occurred during initialization of VMCould not reserve enough space for object heapCould not create the Java virtual machine.

Process exited.


Solution:
1)Download - jdk-6u45-windows-x64.exe and install it.
2)After installation it creates folder C:\Program Files\Java\jdk1.6.0_45
3)Need to update this path in two files.
a)jdev.conf(<JDEV_HOME>\jdeveloper\jdev\bin)
eg. C:\Oracle\Middleware\jdeveloper\jdev\bin
#SetJavaHome C:\Oracle\Middleware\jdk160_24
SetJavaHome C:\Program Files\Java\jdk1.6.0_45

b)setDomainEnv(C:\Users\<yourUser>\AppData\Roaming\JDeveloper\system11.1.1.7.40.64.93\DefaultDomain\bin)
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_45

References :-
http://adfjsf.blogspot.com/2012/10/jdeveloper-11g-could-not-reserve-enough.html



Wednesday, February 4, 2015

ADF Skins

For 11.1.1.7.0
Fusion Dev Guide
http://docs.oracle.com/cd/E28280_01/web.1111/b31974/toc.htm

Customizing Appearance using Skins
http://docs.oracle.com/cd/E29542_01/web.1111/b31973/af_skin.htm#ADFUI330
http://docs.oracle.com/cd/E29542_01/web.1111/b31973/af_skin.htm#ADFUI335

The directory path to the XML schemas is similar to the following:
JDeveloper_Home/jdeveloper/modules/oracle.adf.view_11.1.1/trinidad-impl.jar!/org/apache/myfaces/trinidadinternal/ui/laf/xml/schemas/skin/trinidad-skins.xsd

1)Create mySkin.css under skins/mySkin/mySkin.css
2)Create below file under WEB-INF dir
------  trinidad-skins.css

<?xml version="1.0" encoding="UTF-8" ?>
<skins xmlns="http://myfaces.apache.org/trinidad/skin">
  <skin>
    <id>mySkin.desktop</id>
    <family>mySkin</family>
    <extends>fusion.desktop</extends>
    <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
    <style-sheet-name>skins/mySkin/mySkin.css</style-sheet-name>
  </skin>
</skins>
3)------  trinidad-config.css

<?xml version="1.0" encoding="windows-1252"?>
<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
  <skin-family>mySkin</skin-family>
  <skin-version>v1</skin-version>
</trinidad-config>

To Refresh skin files
****   If you changed extends in trinidad-skins.css  eg.
<extends>skyros-v1.desktop</extends>   to <extends>fusion.desktop</extends>

To affect changes on actual jspx or jsff
just swap <skin-family>mySkin</skin-family>   to  <skin-family>skyros</skin-family>
and again back to  
<skin-family>mySkin</skin-family>

References
https://technology.amis.nl/2009/07/01/using-adf-faces-11g-skinning-for-setting-the-styles-of-specific-component-instances-or-groups-of-instances/
Skinning only for One Component
http://adfskinning.blogspot.com/2012/05/oracle-adf-faces-skinning-enables.html

Sunday, September 7, 2014

ADF Exception Handling

Custom Exception Handlers can be used to suppress or alter exception reporting.


1. Model Layer

Extending  DCErrorHandlerImpl.
http://docs.oracle.com/cd/B31017_01/web.1013/b25947/web_val008.htm

1.Create class by extending DCErrorHandlerImpl.
2.Update DataBindings.cpx
<Application xmlns="http://xmlns.oracle.com/adfm/application" version="11.1.2.60.17" id="DataBindings"
             SeparateXMLFiles="false" Package="view" ClientType="Generic"
             ErrorHandlerClass="view.exception.MyCustDcExceptionHandler">
3. Handle,Extend or Skip Exceptions by overriding method
    public void reportException(DCBindingContainer dCBindingContainer,
                                Exception exception)

Got error
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.InstantiationException, msg=view.exception.MyCustDcExceptionHandler

    public MyCustDcExceptionHandler(boolean b) {
        super(b);
    }
Change To
    public MyCustDcExceptionHandler() {
        super(true);
    }




To customize known error message
@Override
public String getDisplayMessage(BindingContext ctx, Exception ex) {
String message="";
if (ex instanceof oracle.jbo.ValidationException) {
String msg = ex.getMessage();
int i=msg.indexOf("JBO-25013");//When JBO-25013 Too many object match primary key exception occur.
if(i>0)
{
message= "Duplicate Employee Id Found.";
}
message= getDisplayMessage(ctx,ex);
}
else
{
message=getDisplayMessage(ctx,ex);
}
return message;
}


References
http://adfwithejb.blogspot.com/2012/05/exception-handling-in-adf-part-1.html
http://deepak-adf.blogspot.com/2014/01/adf-exception-handling-taskflow.html
http://www.adftutorials.com/adf-custom-error-handler-to-display-custom-message-to-user.html
http://www.jobinesh.com/2011/03/customizing-business-components-error.html
http://ramannanda.blogspot.com/2011/11/error-handling-in-adf.html

2.Task Flow Exception Handler


References
http://fortunefusionminds.blogspot.com/2013/08/how-to-handles-exceptions-in-adf.html
http://andrejusb.blogspot.com/2010/05/handling-exceptions-in-oracle-ui-shell.html
http://biemond.blogspot.com/2008/10/reusable-adf-task-flow-exception.html
http://multikoop.blogspot.com/2014/02/adf-handling-exceptions-from_14.html


Handling Exception at adfc-config
http://multikoop.blogspot.com/2014/02/adf-handling-exceptions-from_14.html

  public void handleExceptionShowMessageInPopupDialog() {

    ControllerContext cc = ControllerContext.getInstance();

    Exception ex = cc.getCurrentViewPort().getExceptionData();
    String message = ex.getMessage();


    FacesContext fc = FacesContext.getCurrentInstance();
    FacesMessage facesMessage =
      new FacesMessage(FacesMessage.SEVERITY_ERROR, "UTF: " + message, null);
    fc.addMessage(null, facesMessage);

    cc.getCurrentRootViewPort().clearException();
    fc.renderResponse();

  }

3.Controller Exception Handler

1)Create a Java class that extends ExceptionHandler
2)Create folder .adf\META-INF\services and add file with the name oracle.adf.view.rich.context.ExceptionHandler. Save with no extension.
Under .adf\META-INF\services File Type should be EXCEPTIONHANDLER File.
3)In the file, add the absolute name of your custom exception handler class (package name and class name without the “.class” extension)
eg.
com.exchandl.view.ArCustomExceptionHandler



References
https://blogs.oracle.com/jdevotnharvest/entry/extending_the_adf_controller_exception_handler
http://www.yenlo.nl/nl/adf-11g-handling-the-adfc-12000-controllerexception-with-custom-exception-handling/
http://ramannanda.blogspot.com/2013/04/adf-exception-handling-scenario.html


ADF Errors
http://jneelmani.blogspot.com/2012/02/erroradf.html


Trace
http://marxsoftware.blogspot.com/2008/09/surprisingly-simple-stacktraceelement.html
http://marxsoftware.blogspot.com/2010/10/reading-java-stack-traces-few-tips.html
public static String accessExceptionStackTraceViaPrintWriter(final Throwable throwable)
   {
      final Writer writer = new StringWriter();
      final PrintWriter printWriter = new PrintWriter(writer);
      throwable.printStackTrace(printWriter);
      return writer.toString();
   }

Tuesday, April 9, 2013

ADF set Focus on Table Component


 Write Below piece of code in Action / ActionListener        


 //t1 -- Your Table Id
 //it1-- Your text component inside table
 .........       
 FacesContext ctx = FacesContext.getCurrentInstance();
        String tableId = t1.getClientId(FacesContext.getCurrentInstance());
       
       
        String inputId = "";
        RowKeySet rks = t1.getSelectedRowKeys();
        if(rks != null && rks.size() > 0) {
            Object rowKey = rks.iterator().next();
            String rowId = t1.getClientRowKeyManager().getClientRowKey(FacesContext.getCurrentInstance(), t1, rowKey);
           
            inputId = tableId + ":" + rowId + ":" + "it1";
       
        }
       
        //compose JavaScript to be executed on the client
        StringBuilder script = new StringBuilder();
        //use client id to ensure component is found if located in
        //naming container 
        script.append("var textInput = ");
        script.append("AdfPage.PAGE.findComponentByAbsoluteId");
        script.append ("('"+inputId+"');");
       
        script.append("if(textInput != null){");
        script.append("textInput.focus();");
        script.append("}");
        //invoke JavaScript
        writeJavaScriptToClient(script.toString());
 .........

      public static void writeJavaScriptToClient(String script) {
        FacesContext fctx = FacesContext.getCurrentInstance();
        ExtendedRenderKitService erks = null;
        erks = Service.getRenderKitService(
                     fctx, ExtendedRenderKitService.class);
        erks.addScript(fctx, script);
      }


Detail Explanation can be found at
http://www.bartkummel.net/2009/11/oracle-adf-set-focus-to-input-field-in-data-table/

References
https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_set_focus

https://blogs.oracle.com/shay/entry/controlling_tab_order_in_an_ad

http://technology.amis.nl/2008/01/04/adf-11g-rich-faces-focus-on-field-after-button-press-or-ppr-including-javascript-in-ppr-response-and-clientlisteners-client-side-programming-in-adf-faces-rich-client-components-part-2/

Sunday, December 9, 2012

ADF Upload Blob File in Table Column


Create Table with Blob Column

create table xx_attachment(fileId Number, file_name VARCHAR2(255),
                                          file_content_type varchar2(100),file_data blob,
                                         CONSTRAINT xx_attach_pk PRIMARY KEY (fileId));



Create EO,VO add it to AM.

Create below variable and accessor inside Managed Bean or Backing Bean.

import org.apache.myfaces.trinidad.model.UploadedFile;
...
    private UploadedFile _file;   
   
    public UploadedFile getFile() {
        return _file;
    }

    public void setFile(UploadedFile file) {
        _file = file;
    }



On JSF Page(jspx/jsf) or Page Fragment(jsff)
1)From DataControl unde XxAttachmentVO1 --> Operations --> Drag CreateInsert method and drop as ADF Button.   (When you click this Button it creates Blank row).

2)From Common Components drag inputFile(af:inputFile) component and drop on page.
Make sure  you put value as  #{<yourMangedBean>.file}

<af:inputFile label="Upload File" id="if1"
                                  value="#{<yourMangedBean>.file}"/>
3)From Common Components drag Button and drop after inputFile component.
Write below code on Button action Listner.

<af:commandButton text="Upload" id="cb11"
                                      action="#{<yourManagedBean.uploadAttach}"/>

4)Add Commit action method in Bindings.

5)For Page Form make sure usesUpload property is True.
<af:form id="f1" usesUpload="true">


import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.view.rich.event.PopupFetchEvent;

import oracle.binding.BindingContainer;
import oracle.binding.OperationBinding;

import oracle.jbo.Row;
import oracle.jbo.domain.BlobDomain;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.SQLException;
import javax.faces.event.ActionEvent;
...
    public String uploadAttach() {
        // Add event code here...
        //BindingContainer bindings = (BindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    
        UploadedFile myfile = (UploadedFile)this.getFile();
       
        BindingContext bindingctx = BindingContext.getCurrent();
        BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
        DCBindingContainer bindingsImpl = (DCBindingContainer)bindings;
        DCIteratorBinding iter = bindingsImpl.findIteratorBinding("XxAttachmentVO1Iterator");
       
        Row row = iter.getCurrentRow();
        // Upload File into Blob Column
        row.setAttribute("FileData", createBlobDomain(myfile));
       
        // File Name
        String fileName = (String)myfile.getFilename();
        row.setAttribute("FileName", fileName);
       
        // File Content/MIME Type
        String fileContentType = (String)myfile.getContentType();
        row.setAttribute("FileContentType", fileContentType);
      
        //Commit Transaction
        OperationBinding method = bindings.getOperationBinding("Commit"); 
        method.execute();
       
        return null;
    }

    private BlobDomain createBlobDomain(UploadedFile file) {
        InputStream in = null;
        BlobDomain blobDomain = null;
        OutputStream out = null;

        try {
            in = file.getInputStream();

            blobDomain = new BlobDomain();
            out = blobDomain.getBinaryOutputStream();
            byte[] buffer = new byte[8192];
            int bytesRead = 0;

            while ((bytesRead = in.read(buffer, 0, 8192)) != -1) {
                out.write(buffer, 0, bytesRead);
            }

            in.close();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.fillInStackTrace();
        }

        return blobDomain;
    }






To download file.
http://hasamali.blogspot.com/2011/09/download-file-in-oracle-adf-gui.html



ADF Multi Select Options (af:selectMany)

ADF Code Corner
https://blogs.oracle.com/jdevotnharvest/entry/how_to_access_selected_rows


http://myadfnotebook.blogspot.com/2010/09/getting-string-value-or-item-code-of.html




Create Master Detail Table
create table xx_users(user_id NUMBER,user_name VARCHAR2(100),
                                  CONSTRAINT xx_users_pk PRIMARY KEY (user_Id));
create table  xx_roles(role_id NUMBER,role_name VARCHAR2(100),
                                   CONSTRAINT xx_roles_pk PRIMARY KEY (role_Id));
Create EO,VO for above 2 tables.



create table xx_user_roles(user_role_id NUMBER,user_id NUMBER,role_name VARCHAR2(100),
                    CONSTRAINT xx_user_roles_pk PRIMARY KEY (user_role_Id),
                    CONSTRAINT xx_user_roles_fk1
                      FOREIGN KEY (user_id)
                      REFERENCES xx_users(user_id));
Create ReadOnly VO based on Above table.

Add All VO instances into AppModule.

From DataControl Add CreateInsert Operation for XxUsersVo1 as Button on Page.
From DataControl XxUsersVo1 as ADF Form.

From Data Control add XxRolesLOVVO1 as ADF Select Many Choice
as
              <af:selectManyChoice value="#{bindings.XxRolesLOVVO1.inputValue}"
                                   label="#{bindings.XxRolesLOVVO1.label}"
                                   id="smc1">
                <f:selectItems value="#{bindings.XxRolesLOVVO1.items}"
                               id="si1"/>
              </af:selectManyChoice>



On Button Pressed

    public void addRoles() {
        BindingContext bctx = BindingContext.getCurrent();
        BindingContainer bindings = bctx.getCurrentBindingsEntry();
        JUCtrlListBinding allRolesList =
                 (JUCtrlListBinding) bindings.get("XxRolesLOVVO1");
          Object[] selVals = allRolesList.getSelectedValues();
          for (int i = 0; i < selVals.length; i++) {
            //Integer val = (Integer)selVals[i];
            String val = (String)selVals[i];
              System.out.println("Int Val "+val);

             // Insert into Table after getting selected Rows or your Code
              OperationBinding crRoleMethod = bindings.getOperationBinding("CreateInsertRoles"); 
              crRoleMethod.execute();
             
              DCBindingContainer bindingsImpl = (DCBindingContainer)bindings;
              DCIteratorBinding iter = bindingsImpl.findIteratorBinding("XxUserRolesVO2Iterator");

              Row row = iter.getCurrentRow();
              // Insert Role Name
              row.setAttribute("RoleName",val );
        
            //...
          }
    }


Use if you want to pull records based on Indices

    public void addRolesUsingIndices() {
        BindingContext bctx = BindingContext.getCurrent();
        BindingContainer bindings = bctx.getCurrentBindingsEntry();
        JUCtrlListBinding allRolesList =
                 (JUCtrlListBinding) bindings.get("XxRolesLOVVO1");
           int[] selVals = allRolesList.getSelectedIndices();
      
          for (int indx : selVals ) {
                  Row rw = allRolesList.getRowAtRangeIndex(indx);
                  Number id  = (Number)rw.getAttribute("RoleId");
                  String val = (String)rw.getAttribute("RoleName");
             
               // Insert into Table after getting selected Rows  or your Code
               OperationBinding crRoleMethod = bindings.getOperationBinding("CreateInsertRoles"); 
              crRoleMethod.execute();
             
              DCBindingContainer bindingsImpl = (DCBindingContainer)bindings;
              DCIteratorBinding iter = bindingsImpl.findIteratorBinding("XxUserRolesVO2Iterator");
   
              Row row = iter.getCurrentRow();
              // Insert Role Name
              row.setAttribute("RoleName",id+" "+val );
        
            //...
          }
    }






If the Choice List is Static eg.
            <af:selectManyCheckbox label="Roles" id="smc1"
                                   binding="#{backingBeanScope.Backing_xxUserCreation.smc1}"
                                   value="#{backingBeanScope.Backing_xxUserCreation.listValue}"
                                   autoSubmit="true">
              <af:selectItem label="Accountant" value="ACCOUNTANT" id="si3"
                             binding="#{backingBeanScope.Backing_xxUserCreation.si3}"/>
              <af:selectItem label="Sales Manager" value="SALES_MANAGER"
                             id="si1"
                             binding="#{backingBeanScope.Backing_xxUserCreation.si1}"/>
              <af:selectItem label="Finance Manager" value="FINANCE_MANAGER"
                             id="si2"
                             binding="#{backingBeanScope.Backing_xxUserCreation.si2}"/>
              <af:selectItem label="Buyer" value="BUYER" id="si4"
                             binding="#{backingBeanScope.Backing_xxUserCreation.si4}"/>
            </af:selectManyCheckbox>



Add below method call on Button Pressed

addRoles(listValue);


Add below code in Managed Bean or Backing Bean


    private Object[] listValue;
   
    public void setListValue(Object[] listvalue){
        this.listValue = listvalue;
    }
   
    public Object[] getListValue(){
        return listValue;
    }
   
    public String getListString(){
        return createString(listValue);
    }
   
    public String createString(Object[] arr){
        if(arr != null){
            String values = "[";
            for(int i=0;i<arr.length;i++) {
                values = values + arr[i];
                if (i <arr.length - 1)
                values = values + ",";
                }
        values = values + "]";
        return values;
       }
        return null;
     }


    public void addRoles(Object[] arr){
       
         BindingContext bindingctx = BindingContext.getCurrent();
         BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
        
        if(arr != null){
            //String values = "[";
            for(int i=0;i<arr.length;i++) {
                //values = values + arr[i];
                System.out.println("Roles to be added "+arr[i]);
                    // Insert Row into USer Roles table
                    OperationBinding crRoleMethod = bindings.getOperationBinding("CreateInsertRoles"); 
                    crRoleMethod.execute();
                   
                   
                    DCBindingContainer bindingsImpl = (DCBindingContainer)bindings;
                    DCIteratorBinding iter = bindingsImpl.findIteratorBinding("XxUserRolesVO2Iterator");
                   
                    Row row = iter.getCurrentRow();
                    // Insert Role Name
                    row.setAttribute("RoleName",arr[i] );
                //if (i <arr.length - 1)
                //values = values + ",";
                }
        //values = values + "]";
       }
     }