They point the finger at me.. again!

Snippet to check if the transaction is dirty

Posted in ADF, ADF Faces, ADF UI, Datacontrol, snippets by vtkrishn on July 28, 2010

We can use the following code snippet to check if the transaction is dirty or not

BindingContext bctx = oracle.adf.controller.binding.BindingUtils.getBindingContext();
if (bctx.findDataControlFrame(bctx.getCurrentDataControlFrame()).isTransactionDirty()) {
 //show the timestamp
 }
 else{
 //don't show
 }
About these ads

Placeholder Datacontrol

Posted in ADF, ADF UI, Datacontrol by vtkrishn on May 6, 2010

There are two types of development in ADF development using jdeveloper. ui-first approach and data-first approach.

ui-first approach – design the UI first and then the data

data-first approach – design the data first and then design the UI accordingly.

In the first approach, we are sure that its very hard to design a real-time web application without some data. For this purpose adf provides a placeholder datacontrol using which we can design the page accordingly. The placeholder datacontrol is a simulation of actual data control in realtime scenario and we have full options to design the page without the actual data using this.

To start with,

In the Application Navigator, right-click the project and choose New

In the New Gallery, expand Business Tier, select Data Controls and then Placeholder Data Control, and click OK

Enter the values for place holder name, Directory name, Description and click ok

Datacontrol.dcx, adfm.xml, placeHolder.xml file gets created

Now, right-click the created datacontrol in the panel and select ‘Create Placeholder data type

create the attributes and click ok

The created datacontrol is exposed in the panel like a normal datacontrol

The attributes that are exposed can be dragged and dropped to the page as usual

Tagged with: , ,
%d bloggers like this: