Tuesday, November 15, 2011
Monday, November 14, 2011
Oracle ADF : Industry Automation Tools for Continuous Integration
In current industry environment we have automated tools for performing scheduled task like check development Branch , Trunk for health check of code line for application , Deploy periodically.
There are various tools available in market to perform this job , However , I would list few most used.
Task Needed to be Performed
Take last from version control system , Compile Code , Generate Java Doc , Package the whole application in to Ear , Deploy it on Development or QA Server.
Tools for Build
-Apache Ant , Apache Maven
Tools for Continuous Integration
- Cruise Control , Hudson
ADF BC : Default Value for Attribute
If you want assign default value to attribute when creating row in ADF BC then do the following.
I am explaining with temporary field.
Create DefaultValAttr in EO and Set the Literal to default value 1. This can be any attribute EO Attribute , Transient etc.
So when you create a row in EO then this attribute will have value 1.
Add this attribute to VO
When I created the row ,it assigned 1 to defaultvaluettr , this applied to any type of attribute.
Thursday, November 10, 2011
ADF : Load Customer Specific Properties file in Application Scope
When software application is delivered or deployed on customer site then for each customer there is different setting.
Some architect use Database , Properties file or Some other method.
Here I am going to demo you how to use properties file.
Create General project in jdeveloper as below.
- Create Java File to read properties
- Create properties file in resource directory
Enter following content in properties file.
Write following java code and Run.
import java.io.IOException;import java.io.InputStream;import java.util.Properties;public class LoadProperties {public static void main(String[] args) throws IOException {Properties props = new Properties();InputStream st =Thread.currentThread().getContextClassLoader().getResourceAsStream("MyApp.properties");props.load(st);System.out.println(props.getProperty("CUST_CURRENCY"));System.out.println(props.getProperty("CUST_LANG"));System.out.println(props.getProperty("CUST_CITY"));}}
Friday, November 4, 2011
ADF : Clean Table Filter Using Command Button
ADF Table and Form are the most used component by developer for day to day job. However , ADF Table component is out of box and there are various way we can customize to meet our requirement.
There is one of feature of ADF Table called in-build filter. However , For each column we have to press enter to search for our criteria.
After above filtering is done and if we want to clear the filter then we have to manually delete the text for all 3 filter and press enter.
Solution:- To solve this issue I created one button on Panelcollection component and bind action listener to following method and it took care of clearing all 3 value automatically and re rendering old result.
Note:- I have managed bean with table binding available.
public void clearEmpQbeFilter(ActionEvent actionEvent) {FilterableQueryDescriptor qd =(FilterableQueryDescriptor)t1.getFilterModel();if (qd != null && qd.getFilterCriteria() != null) {qd.getFilterCriteria().clear();t1.queueEvent(new QueryEvent(t1, qd));}}