Showing posts with label adf. Show all posts
Showing posts with label adf. Show all posts

Monday, June 13, 2011

Accessing ADF ViewObject's property in Groovy

Use this to access any field in ViewObject

"adf.object.viewObject.yourPropertyName"

Monday, February 14, 2011

Changing Context Root of application during deployment in Weblogic

Configuring Applications for Production Deployment: "You cannot use a deployment plan to change the context-root in an application.xml file. However, if an application is deployed as a library, you can either change the context-root through an weblogic-application.xml file or use the deployment plan to change the context-root in an weblogic-application.xml file."

Wednesday, February 9, 2011

Using request Parameters in ADF Taskflow router

In order to use request parameters or parameters which are appended as query string in URL invoked ADF Taskflow, you will have to do two steps:
  • Define a new parameter in "Input Parameter Definition" of taskflow and assign to it value of request parameter by

    #{pageFlowScope.requestParameterName}

    Actually ADF fetches request parameters and places in pageFlowScope when you call a Taskflow from URL
  • Now use this newly defined parameter anywhere you want like in a condition of router by this

    #{pageFlowScope.parameterName == 'some conditional value'}
If you want to access this value in model layer e.g. after condition you want to execute a method, you can pass it as parameter or you can also access it programmatically by this:
ADFContext.getCurrent().getExpressionEvaluator().evaluate("#{pageFlowScope.yourParameterName}");



Wednesday, October 27, 2010

CSS Classes for ADF Faces Component

Whenever we work in ADF, we will have to customize ui components to our own theme and color scheme. Often people find it hard to find list of CSS classes for ADF components as it is not directly mentioned in Web Developers guide. Here is the link in which you can find complete list of CSS classes for all ADF components

ADF CSS Selectors

Thursday, October 14, 2010

ActionListener versus Action

Action method is used to perform navigation and ActionListener is used to perform some logic in backing bean.While it is possible to define a backing bean method that performs navigation and binds the method to the actionListener attribute, this is not best practice. Instead, application logic should be placed in the backing bean method to which the actionListener is bound. Following successful execution of that method, the ADF Faces lifecycle will call the method or control flow case specified by the action attribute. If the method bound to the actionListener fails, developers can change the action outcome to suppress navigation so that the user has the opportunity to correct the issue.

Tuesday, September 28, 2010

ADF Iterator's RangeSize Property

RangeSize property does not control the number of rows displayed in a table based on the collection. In fact, the rich table in ADF 11g actually will display as many rows as can fit into the available space physically allocated to the table component, so all the range size controls is the number of AJAX transactions that are required to populate the table as the user scrolls up and down. You can set it to -1 if you want to get all records at once.

Friday, August 6, 2010

Programmatically Setting Filter for ADF Table

You can set the criteria programmatically to filter data in ADF table by:

DCBindingContainer bc =
(DCBindingContainer)context.getApplication().evaluateExpressionGet(facesContext,
"#{bindings}",
DCBindingContainer.class);
if (bc != null){
DCIteratorBinding ib = (DCIteratorBinding)bc.getIterBindings().get(p_binding);
if (ib != null)
ViewObject vo = ib.getViewObject();
if (vo != null)
vo.setWhereClause('your clause');
}




Tuesday, July 20, 2010

Refresh a ADF component programmatically

In order to refresh an ADF component in bean, do the following:
  • Bind that component to some property of bean
  • get reference of AdfFacesContext by AdfFacesContext.getInstance()
  • add that component as a partial target like adfFacesContext.addPartialTarget(comp_binding)