Showing posts with label ADF CheatSheet. Show all posts
Showing posts with label ADF CheatSheet. Show all posts

Wednesday, 6 November 2013

JDeveloper: Making the most of your IDE, Database Connections

Adding Database Connections within seconds to a new ADF application

When creating new applications, you can simply add new Database connections to the application within a matter of seconds, all you need is the Database Connection already in your IDE.

Open Database Navigator and Click and Drag your Connection onto your Application.

Select the connection you want
Select Connection
Drop the connection onto the applicaiton
Drop Connection Onto Application
 The connection will then be inside the application
Connection in Application

#bearMan

Friday, 25 October 2013

ADF CheatSheet: Create Bindings Quickly

ADF CheatSheet: Create Bindings Quickly


Hello and welcome back to my evolutionary blog ;)

Have you ever needed to create many Page Bindings, quickly, but not needed a UI for them?

A quick way to create them is to find the attribute you needed in the Bindings area, and drag and drop that binding as though you were creating the UI for it. Once the UI part of it is done, you can cut that component off, there will be a dialog to ask if you want to remove the Bindings as well, and you must say no.

ctrl+X

Before
After

#bearMan out.

Monday, 7 October 2013

ADF CheatSheet: VO Attribute value

ADF CheatSheet: VO Attribute value

One thing I also do alot for auditing is setting Attributes to who created it or when it was created for those.

To see who edited something, or to set a value to an Attribute that is stored in a Session Variable you can use the code below in order to set the default value to that attribute.

adf.context.current.sessionScope.get('empId')
For Date
adf.currentDate
For Date and Time
adf.currentDateTime
Just one thing, make sure you set the sessionScope variable to the same Object type as the Attribute.
#bearMan

Friday, 4 October 2013

ADF CheatSheet: EO Sequence

ADF CheatSheet: EO Sequence

One thing I use alot is sequences, one thing you can do to set a default value to the sequence, is change a Attribute to Type: DBSequence and set the default value to

(new oracle.jbo.server.SequenceImpl("USERS_SEQ", object.getDBTransaction())).getSequenceNumber()

#bearMan