Tuesday, October 29, 2013

Point to html page from ADF taskflow using URL View

In an ADF task Flow use URL view component
at URL* specify the path of the page
fog e.g  /context-root/ServerError.html

Friday, October 25, 2013

Logout from Single Sign On an ADF application

  <af:goLink text=' #{securityContext.authenticated ? "Logout" : "Login"}'
                             id="gl1"
                             destination='#{securityContext.authenticated ? "/adfAuthentication?logout=true&amp;end_url=/<context-root>/faces/start-page-of-the-app"  : "/adfAuthentication?success_url=/<context-root>/faces/start-page-of-the-app"} '/>

or

Use a Logout Button with an Action Listener method to avoid this exception while logout - oracle.adf.controller.ControllerException: ADFC-04008: The BindingContext on the session is null 

       
<af:commandButton text=" #{securityContext.authenticated ? &quot;Logout&quot; : &quot;Login&quot;}" id="cb7"
                                actionListener="#{backingBeanScope.backingBean.logout}"/>


       
    public void logout(ActionEvent actionEvent) {
        ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext(); 
              HttpServletRequest request = (HttpServletRequest)ectx.getRequest(); 
              String url = request.getContextPath() + 
                            "/adfAuthentication?logout=true&end_url=/faces/start-page-of-the-application"; 
              try 
              { 
                 ectx.redirect(url); 
              } 
              catch (Exception ex) 
              { 
                  System.out.println("Exception!! Logging out"+ex);
                 // Handle the exception 
              } 
    }


Session Invalidate Add before logging out : update required

Deploying ADF application with both HTTP Client Authentication(Public Key Certificate) and Form-Based Authentication

To Start with, implement security for the application with Form Based Authentication by specifying the login page, error page and default page




Then to configure  HTTP Client Authentication(Public Key Certificate) Go To -> Web.xml of the application and -> manually change <auth-method>FORM</auth-method> to <auth-method>CLIENT-CERT,FORM</auth-method> 




          Now if the application is deployed to single sign on, the application would be authenticated with HTTP Client Authentication(Public Key Certificate) . If the application is deployed as standalone  on LDAP it would require Form Based Authentication to login                                                                                    

Friday, October 18, 2013

issue accessing 10g database from 11g using DBLink ADF

Issue when you try to use a query with DBLink with 10g database in an ADF VO
e.g select * from table@10GDBLink
https://forums.oracle.com/thread/1080919


ORA-28267 Invalid Namespace Value/ JBO-27122 SQL Exception ADF

Wednesday, October 16, 2013

Wednesday, October 9, 2013

issue filtering date column in table ADF

 
SELECT  trunc(UPDATE_TS) UPDATE_TS,  // TIMESTAMP
          INSP_ID,
       trunc(LAST_INSP_DATE) LAST_INSP_DATE // DATE
FROM INSP_TABLE

Use Trunc to truncate the timestamp and date to be able to filter data in an af:table

Also use  <af:convertDateTime pattern="MM/dd/yyyy"/> in both table filter as well as input date component

http://dkleppinger.blogspot.com/2011/09/how-to-ignore-time-component-of-date.html

Tuesday, October 1, 2013

custom validator ADF

http://jjzheng.blogspot.com/2010/10/create-custom-validators-in-adf.html

http://lucbors.blogspot.com/2011/10/adf-11g-quicky-3-adding-error-info-and.html

bind the component to bean; on Submit click, if there is any message/error to be shown; trigger the warning/error to the component

Regular Expressions to validate input string adf