Friday, February 24, 2017

OAF- How to get Segment values from KFF


Following is the code snippt, which can be used to get segment values from the selected KFF.


///Below is the PFR Code on Save button

         OAKeyFlexBean kffbean= (OAKeyFlexBean)webBean.findIndexedChildRecursive("kffID");     //Get the KFF bean

         KeyFlexfield kff=(KeyFlexfield)kffbean.getAttributeValue(OAWebBeanConstants.FLEXFIELD_REFERENCE);       //Getting the Reference Value
         if(kff!=null){
             if(kff.getSegment(1).getValue()!=null)
             {
                     String value = kff.getSegment(1).getValue().toString();    //This returns Value object so we can just see a object
                     String name = kff.getSegment(1).getName();                 // This returns the Segment name attached
                     String inputValue = kff.getSegment(1).getInputValue();       // This returns the Segment value when user gives as input
                    
                     System.out.println("Value -->"+ value);
                 System.out.println("name -->"+ name);
                 System.out.println("inputValue -->"+ inputValue);
             }
         }



 

Monday, February 13, 2017

Tips in ADF - for developers from OAF background

TIP # 1. How to find the backing bean of an ADF Page ?
 (In OAF, it is very easy to get the CO name which is used in a given page/region).

In ADF -- Controller logic is handled through Taskflows.

For a given page  : check the below way to get which Controller(Taskflow) is used.

Following is the page and its managed bean information.


Following is the screen for the Page file.

 Following is the content of page file in XML Code.
In the below code : (if you compare with OAF - which is based on UIX-User interface for XML) -- This is based jspx ; xml with jsp.
Top level bean in JSPX is : JSP:Root followed by : f:view

  <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_ADFRegionsPG.d1}">
      <af:form id="f1" binding="#{backingBeanScope.backing_ADFRegionsPG.f1}"></af:form>
    </af:document>
  </f:view>

In f:view -- other tag is : af:document  
this is attached to bean -- This is bean which is attached to this page.
CTRL+CLICK on : ADFRegionsPG.d1    -- Navigates to  ADFRegionsPG.java



Backing bean information : about : package, class details of it.