Thursday, August 29, 2013

why do sometimes partial trigger on a component doesn't work as expected in ADF?

with the visible property
https://forums.oracle.com/thread/1072582

Wednesday, August 28, 2013

ADF Table didn't refresh after adding new rows from procedure

After calling a stored procedure(which adds new rows to a table) , table didn't refresh on programmatic partial trigger to show up the latest rows

Even re-executed the query did not works.

Thursday, August 22, 2013

Call AM Method from VORowImpl ADF

In an ExampleVORowImpl, we can overwrite the getters of the attributes to customize the return values, Here we see the count value appended with ' ( ' , ' ) '  and the count value is returned from the AM method

import com.fdny.example.model.service.ExampleAppModuleImpl;                                                      


Friday, August 16, 2013

Pass Parameter from JavaScript to a ManagedBean ADF

http://naive-amseth.blogspot.com/2011/02/passing-parameters-from-javascript-to.html
http://adfjavacodes.blogspot.com/2013/06/adf-calling-java-code-from-javascript.html

This sample code demonstartes how to pass a parameter to a backing bean method using JavaScript
   clientListener calls the javascript method
   serverListener is used to call the managed bean method
   (*serverListener is triggered only when AutoSubmit    or the partial submit property of the component is           enabled)


backing bean method:

This is the other way of passing parameter to backing bean

 In the clientListenerMethod of JavaScript var parameter is initialized here


sample JavaScript code to trigger the button

 function buttonListenerMethod() {
         //get a button and click it
         var proxyButton = AdfPage.PAGE.findComponentByAbsoluteId('cb1');
     
         var parameter = {city:"Manhattan", country:"US"};
         //click the button
         AdfCustomEvent.queue(proxyButton ,"customButtonEvent",parameter, true);
       }

or

One more good usecase where we can use ClientListener/ServerListener

http://adf-tips-neetika.blogspot.com/2014/09/client-and-server-listener.html




Tuesday, August 13, 2013

View Object with Bind Variable as view accessor

Best practice tip:
A View Object with Bind Variable should be used with a View Criteria when used as view accessor to another object.

*This has to be done to void some weird SQLException errors with bind parameter :vctemp1  etc..

Navigate to a page in an unbounded taskflow without action ADF


Monday, August 5, 2013

Contextual Events ADF

http://www.oracle.com/technetwork/issue-archive/2011/11-may/o31adf-352561.html

Check out the sample example application ContextualEventsApp code


Usecase:
Submit Button click triggers the region-consumertaskflow1 
Last Name Input text value change triggers the region-consumertaskflow2

  • Run Producer.jspx page

                This page contains regions(consumertaskflow1 and consumertaskflow2) which are refreshed                   by some actions of the page using  contextual events


  • consumertaskflow contains a page consumer.jsff which has EventHandler methods in its bindings

Methods handleEventStringPayload and handleEventObjectPayload accepts customPayLoad parameter.
consumertaskflow1 consumertaskflow2