Saturday, 18 September 2021

Javascript in ADF

 JavaScript in ADF

  • One of standardway to add Java script to ADF page
    • AF:Document -> Facets -Document -> Meta Container
    • Meta Container -> insert inside -> adf faces -> Resource & and select type as JavaScript
  • Show Alert on some action
    • Create javascript function inside af:resource tag
      • function displayAlert(event){
            alert ("I am from Java Script Function");
        }
    • Call the java script function from adf components(input Text)
      • Insert ClientListner inside any adf faces inputText  
      • Provide the JavaScript function name which is created & select the type(trigger when to invoke the function eg: keyDown, Click..  )
  • Java Script function to Toggle - Collapse pannel splitter 
    • var component = AdfPage.PAGE.findComponent('ps1');
      component.getProperty("collapsed");
      component.setProperty("collapsed",true);
  • Toggle the layout between Horizontal and Vertical
    • Set ClientComponent property of PageGroupLayout element property to True
    •  var component = AdfPage.PAGE.findComponent('pg1');
      component.setProperty("layout","vertical");
  • How to invoke ADF component method defined on button action from JS code
    • var component = AdfPage.PAGE.findComponentbyAbsoluteId('button1');
      AdfActionEvent.queue(component,component.getPartialSubmit());
  • How to open popup in JavaScript
    • var popup = AdfPage.PAGE.findComponentbyAbsoluteId('p1');
      popup.show();
  • Show date popup automatically with out allowing user to enter manually 
    • function disableInputdate(event){
      event.cancel();
      }
    • ClientListner to Call above function on keyPress
    • Execute code once the page/document is loaded. JS script inturn executes method in backing bean
      • AF:Document-> add Client listner -> provide method name "loadPage" and action as Load
        function pageLoad(event){
        var source = event.getSource();
        AdfCustomEvent.queue(source,"callserver",{},false);
        }
      • JS code to access backing bean code
        • AF:Document -> add Server listner -> provide  type "callServer" & method from backing bean
      • loadPage()
        var source = event.getSource();
        AdfCustomerEvent.queue(source,"callServer",{},false);
    • Send Parameter from Client to JS -> backing bean. Show Employee details on double click of dept row
      • Add clientListner & serverListner to the table component
      • clientListner type is dobleclick & method as tableDBClick
      • function tableDBClick(event){
        var source = event.getSource();
        var name = source.getProperty("deptName");
        AdfCustomEvent.queue(source,"calltableserver",{deptName<param>:deptName<value>},false);
        }
      • serverListner type as calltableserver and method as backing method depttabledblclick
      • public voice depttabledblclick(ClientEvent clientEvent){
        string deptName = clientEvent.getParameters.get("deptName");
        showPopup("p2");
        }
      • public void showPopup(String popupname){
          StringBuilder strb = new StringBuilder("AdfPage.PAGE.findComponentbyAbsoluteId(\""+popupname+"\ ").show();");
        FacesContext fctx = FacesContext.getCurrentInstance();
        ExtendedRenderKitService erks = Service.getRenderKitService(fctx,ExtendedRenderKitService.class);
        erks.addScript(fctx,strb.toString());
        }
        }
      • Add clientAttribute to the table component to send parameter to JS method
        <af:clientAttribute name="deptName" value = "#{row.departmentId}">
      •  Backingbean Method

    • User ENTER to navigate to next field
      • function tabIndex(event){
        var code = event.getKeyCode();
        var component = event.getSource();
        if (!e){
        var e= window.event;
        if e.shiftKey{
          if (code==13){
        event.cancel();
        var prevComponent = AdfPage.PAGE.findComponentbyAbsoluteId(component.getProperty("prevComponentId"));
        prevComponenet.focus();
        }}
        else if (code==13){
        event.cancel();
        var nextComponent = AdfPage.PAGE.findComponentbyAbsoluteId(component.getProperty("nextComponentId"));
        nextComponenet.focus();
        }}
    • Compare values in 2 input fields
      • <![CDATA[
        function checkvalue(event){
        var output1 = document.getElementById("it5::content");
        var output2 = document.getElementById("it6::content");
        output1.value == output2.value then.....
        }
        ]]>
    • How to find component id
      • af:Document -> properties -> initial focus id -> point to your document to get the ID

    Wednesday, 18 August 2021

    BPM

     Business Process Management

    • Split the business into number of processes and each process can talk to each other.

    Building blocks

    • Notations
    • Human tasks

    Developing appln

    • Split business into number of processes
    • Design each process using notation
    • Implement each notation
    • Create ADF project for Human Task UI
    • Deploy BPM and ADF projects
    •  

    Activity Notations

    • Service -> to call a webservice
    • Send & Receive-> to call another Bpel process
    • Business Rule -> 
    • Scripts
    • Call -> call another process
    • subprocess
    • update -> automatically update human task

    Interactive Notation

    • User - any human action to be done
    • FYI - human task where to give some information
    • Management
    • Group Vote ->
    • Complex
    • Initiator -> Human task that initiates once user manually initiates 

    Notification Notation

    • Mail

    Catch & Throw Notations

    • Catch exceptions

    Gateway Notations

    • Exclusive - 

    Projects Creation

    • BPMN Process
      • Process Data Objects(Variables that can be used in process

    • Business Components
      • Business Catalog module(App Module)
        • Business Object(Employee Data)
        •  
    •  

    Monday, 26 July 2021

    BI/OTBI/BICC/OBIEE

     How to enable Query logging

    • BI admin tool -> Tools -> Options -> set system logging level between 1 to 7 -> checin the changes
    • Create a simple report 
    • To check the query created
      • Administration -> Manage sessions -> Clear all cursors
    • Refresh the report created in step2 to execute again
    • View log in manage sessions
    • search for "sending query to database" string
    • Copy query and run against DB

    Saturday, 30 January 2021

    UCM

     Unified Content Server

    • Import file into Fusion
    • Export file from Fusion

    File can be imported/exported for an account.

    • fin/payables/import
    • fin/payables/export

    Webservices

    • wsdl: https://<host:port>/idcws/GenericSoapPort?WSDL
      • Eg: https://fuscdrmsmc86-fa-ext.us.oracle.com/idcws/GenericSoapPort?WSDL
    • Convert contents to Base64 encoded format
    •        <ucm:GenericRequest webKey="cs">
               <ucm:Service IdcService="CHECKIN_NEW">
                  <ucm:Document>
                     <ucm:Field name="?">?</ucm:Field>
                     <ucm:File name="context.txt" href="PrimaryFile">
                        <ucm:Contents>cid:119455180306</ucm:Contents>
                     </ucm:File>
                  </ucm:Document>
               </ucm:Service>
            </ucm:GenericRequest>
    •   <ucm:GenericRequest webKey="cs">
               <ucm:Service IdcService="GET_FILE">
                  <ucm:Document>
                     <ucm:Field name="dDocName"><UCM content ID></ucm:Field>
                     <ucm:File name="RevisionSelectionMethod" >Latest</ucm:File>
                  </ucm:Document>
               </ucm:Service>
            </ucm:GenericRequest>
    • Adding Policy
      • Project -> Show Project View -> WS-Security Configurations -> add WSS entry as Username -> provide details
    • Apply policy config to the soap request
    •