Posts

Conditionally disabling af:showPopupBehavior

The JDeveloper 12.1.2.0.0 release has a new attribute for af:showPopupBehavior tag. This new attribute can be EL wired to disable the display of a af:popup conditionally. Tag doc for disabled property says: The disabled property for  af:showPopupBehavior determines whether the client behavior should be disabled. Use this attribute to conditionally disable showing the target popup identified by popupId. Download You can  download the sample workspace from here . [Runs with Oracle JDeveloper   12C 12.1.2.0.0  ] How to run this sample? Run the popup.jsf. You may see 2 button in this page, each button on click displays a popup. The disable attribute for af:showPopupBehavior tag is EL wired for both the buttons in order to disable the display of target popup if the popup from the other button is already displayed. Note:  The EL expression set  for disabled property for   a  af:showPopupBehaviour tag    is evaluate...

Real World ADF Architecture and Design Principles Course for Oracle Partners in India

See the following link for the original message:  http://app.certain.com/profile/web/index.cfm?PKWebId=0x5212097b73 Date:  25 - 27, Sept 2013 (Wed - Fri) Time: 9:00 am - 5:30 pm Venue: Oracle India Pvt Ltd, Training Room 4J001, Prestige Lexington Tower, Near Prestige St. Johns Woods, Bangalore 560 029, India Exclusively designed for: ADF Developers, Oracle Consulting, Solution Architects Solution Consultants, and Industry Solution Architects This course is absolutely free for Oracle partners and employees.   Who is driving this training and what is there for you in it? In association with and taught by Oracle ADF Product Development. This is an advanced level workshop for Real World ADF Design & Architecture Principles, a 3 day course that will provide a clear understanding of what the term ADF architecture refers to and how to design an ADF application . Topics include :   ADF architectural patterns, options are in putting ADF ...

Groovy expression for assigning DB Sequence value to a String type attribute

You can use Groovy expression to default value for  Key attribute from a database sequence while you create new instance of an entity object. If you have access to my book Oracle ADF Real World Developer’s Guide , see page 76 for details or see the following blog from Timo Hahn   http://tompeez.wordpress.com/2011/09/02/using-groovy-expression-to-set-a-primary-key-with-a-sequence-number/ This post is just meant for sharing a simple tip that I learned today(Thanks to Steve Muench) for assigning database sequence value to a String type attribute. In case if you need to assign the sequence value to an attribute of type String in an entity object(yes, there are such use cases as well), you can add " as String " to the end of the Groovy expression and set it as default value for the entity attribute. Example: (new oracle.jbo.server.SequenceImpl("DEPARTMENTS_SEQ", adf.object.getDBTransaction())).getSequenceNumber() as String

Revisiting the topic : Programmatically disclosing a ShowDetailItem in a <af:panelTabbed>

Sometime back I blogged about Programmatically disclosing a ShowDetailItem in a <af:panelTabbed> . In today's post I'm revisiting this topic to address the same usecase for applications with customization(change persistence) ON . If the customization is enabled you may need to use appropriate ChangeManager APIs for persisting the changes that you do programmatically. Otherwise during rendering  ChangeManager will override your programmatic changes with the state for the component that is persisted in the change manger during the last user interaction. So the code snippet posted in my previous blog post needs to have following ChangeManager APIs as well to make this working for an application that use "Change Persistence/Customization". The precious post has the full code sample. For a complete working sample, you need to change  displaySelectedItem(...)  given in the last post's sample with the code snippet given below. import org.apache.myfac...

Building dynamic UI using af:dynamicComponent

The  ADF Faces 12C release comes with a dynamic component ( af:dynamicComponent ) that determines what components to display, and their values, at run time. So your model (created at run time) can have hints about the type of component as well as other UI related things, which would be picked up by af:dynamicComponent and render the UI at run time as appropriate. For example, if your UI model (AttributesModel) says that component is of LOV type, then af:dynamicComponent will render appropriate LOV for you at run time.  Note that in earlier days your code were deciding the type of the component in such cases. This new component will considerably simplify the effort you need to put for building dynamic UI. You can learn more about this component in  section 21 Determining Components at Runtime in   Developing Web User Interfaces with Oracle ADF Faces . Its well documented, so nothing more to be detailed here :) In this post I'm sharing a example that mak...

Using Java EE APIs for asynchronously invoking Application Module methods

The JDeveloper 12C release comes with WLS 12C version which is fully compatible with JavaEE 6 stack. In this post I'm talking about leveraging Java EE APIs for enhancing your ADF application. Straight to the point: JavaEE 6 has simplified the asynchronous method invocation in EJBs to a great extent. You just need to annotate the target class or method as @Asynchronous to enable asynchronous invocations. More details can be seen here:  http://docs.oracle.com/javaee/6/tutorial/doc/gkidz.html Today's post talks about leveraging this feature for invoking application module methods asynchronously. This approach can be used when you need to invoke heavy operations such as some batch job or bulk data update from UI without caring the result of  the operation(which can be monitored using some other page). Implementation is simple, we are simply wrapping application method call in an asynchronous EJB method. Client calls asynchronous EJB method which in turn invokes appli...

QOW #2: What is wrong in my action binding setting?

Image
See the answer for last QOW#1 here QOW#2 (14 July 2013): This time it's easy:) I've exposed a method from AM that takes two parameters,   public void findEmps(String firstName, String email) . Exposed it through data control for use by client and then dropped it as methodAction to a JSF page, binding to a af:commandButton. While dropping the method, I used the following setting in the editor. Do you see anything wrong here? Answer (Updated on 21 July 2013) Both Thanvir  Parthan and Sharath Ram has done a great job in answering this query, and in fact nothing is left to me in answering this one except sharing link to one of my old post.  Read this post - http://www.jobinesh.com/2009/06/detailed-look-at-binding-model.html To summarize the answer, while defining parameters for an action binding, better do not set any value for Option type.  If you specify Option as Mandatory, you are telling framework that do not consider the EL or literal...