Friday, December 30, 2011

Reference attributes in other view objects using groovy

This post is based on a question I asked to Mr.Andrejus Baranovskis's on his public Wiki. How to reference attributes in different view objects through groovy.

 And he answered me that its doable after exposing the ViewLink Accessor between the two view objects and then accessing the attribute through ViewlinkAccessor.AttributeName

He posted the last post for this year on his blog with an example, just follow the link:

Friday, December 16, 2011

Add Custom validator - nicely attached to InputText Field

After building your business components, and adding your view object through data controls to the jspx or jsff page as editiable field you need to do the following:

- Add a new Java bean to your application resources in my case I named it TestValidation.
- Select the InputText field, and in property inspector go to Behavior property, then inside Validator area select edit to add new custom validator.

- Then it will build a method inside your bean with list of params will be used during validation phase.

-  Write the business logic you need to check the value of the input filed, the object param contains the new entered value.
- Then throw the validationException with custom message to your current FacesContext.
- At runtime you will get a nicely error message attached to the InputText field.

Monday, December 12, 2011

I did technical review on this book - Oracle ADF Enterprise Application Development—Made Simple

  • Develop an ADF application quickly using database tables together with common ADF user interface components and data visualization components.
  • Estimate the effort required to build an ADF enterprise application.
  • Organize the development team, choose support tools, and write development guidelines to ensure a uniform development approach.
  • Set up the necessary infrastructure and configure a development workstation.
  • Develop necessary templates and framework classes to allow productive and flexible development.
  • Build a complete application using all the enterprise support tools.
  • Test your ADF enterprise application at the component, integration, and system levels.
  • Use skinning to change the look of the application to correspond to the enterprise's visual identity.
  • Customize the application to meet the needs and expectations of different users.
  • Secure the enterprise application and assign roles for specific functionality.
Book in Details

    Sunday, December 4, 2011

    Redeveloping an Oracle Forms Application with Oracle ADF

    A very nice presentation by Oracle about Oracle Forms migration to Oracle ADF. The main idea there is no magic bullet you have to do some work but Oracle try making it easy to migrate.

    See the below like for more details, you can go directly to minute 14 to skip the intro:

    Oracle Forms to ADF migration

    Sunday, September 18, 2011

    oracle.jbo.NotConnectedException: JBO-25200 While using View Criteria

    This error "which i think its a bug in JDeveloper 11g Release 2", appeared while building view criteria with bind variable inside the SQL query using read-only view.

    While developing a view object based on SQL query I add a where condition in which it select a specific employee information as an example " (where empno=:empno) " from details table in which it will return multiple records, then I wanted to build a view criteria on this view object to filter the result based on another attribute.

    So while the page begins loading, it throws the following exception:

    oracle.jbo.NotConnectedException: JBO-25200:.
    at oracle.jbo.server.DBTransactionImpl.checkConnected(
    at oracle.jbo.server.DBTransactionImpl2.createPreparedStatement(

    And the application stops working since the connection to the database is lost.

    The error message is not clear to what is happening inside the application flow, and it does not provide enough information about the actual error. But eventually and after building the project from scratch, I discovered that the bind variable used inside the SQL query as discussed before, should be set to HIDE value under control hints.

    Finally got it to work... :)