Friday May 21, 2010

usage of setPropertyListener and setActionListener

The incorrect usage could lead to hard-to-debug problems so better to understand the fundamentals behind it's working.

setpropertyListener queues an event on the server side, so if for a command component you have a showPopup behavior/actionListner as well as setPropertyListener then fwk does the queuing correctly and raises further event on the component. While, the setactionListener simply raises an event on the server side instead of queueing it, so any further event on command component gets cancelled.

Also, if you use an ActionListener and showPopup behavior together on a command component, then the order of their invocation is undetermined and also one of event gets cancelled on the component. So, either use only actionListner and do the popup invocation stuff progrmmatically in your bean or use the declarative stuff logically so that no clash of event happens.

ADF Bounded Taskflow Activation

hey guys,
It's really been a while since I last blogged. Just came across a hard-to-debug scenario, so thought of sharing it for the benefit of ADF developers.
I had a page fragment(jsff) wrapped inside a  bounded taskflow, for which the activation was conditional and was based on a requestScope property (be it a requestScope variable or a property coming from a requestScope bean). As soon as the taskflow activates and page renders the requestScope parameters life span ends. After that, when you raise an event inside the page (click of commandLink, moseHover, valueChange event etc) then for the first time the event gets fired but it fails to affect the change in the page, moreover, for the subsequent times the event itself doesn't get fired. Any guesses as to what could be the culprit..?

I guess, I already gave the reason in the initial paragraph. For the first time when the event gets fired, the fwk sees that the page is already lying in inactivate state, so it fails to affect the change and for subsequent times it doesn't even fire the event because it already knew that the page/region is inactive. So, in such a scenario we must use either a pageFlowScope property or transientVO property which could exist till the page's life span.

Saturday Apr 24, 2010

Dynamic Tab Implementation in ADF

Well, this can be a common usecase across apps to open tabs dynamically at runtime based on the request.

Well, in order to achieve this you can have a parent container, lets say a panelTab component.Inside panelTab , u can have a showDetailItem inside an af:foreach or an af:iterator binded to a bean static list which will have as many show detail items as you wish to be shown.

something like this.

private static List = { new showDetailItem("1"),new ShowDetailItem("2") ...};

now in the backing bean you can have a method that takes care of rendering and disclosing an specific tab based on the index.

public void openMyTab(){

List<MyItems> list = refToParentContainer.getChildren();
int indexOfTabToBeOpened = //Write a method that will compute the tab index of the next //tab.

list.get(index).setRendered(true);
list.get(index).setDisclosed(true);

similarly you can set other properties too.

}

Else, instead of having af:foreach/iterator iterating through the SD items , you can go for static SDs in the page with render property set to false and then you can follow the same approach to render/disclose it at runtime.


Wednesday Jan 27, 2010

How to get Application Module instance ?

[Read More]

Thursday Jan 21, 2010

Shared Application Module Myths Unveiled

[Read More]

Wednesday Jan 20, 2010

ADFBC : clearCache Usage

[Read More]

Thursday Jan 14, 2010

Semantic Web : Connecting the dots...

[Read More]

Wednesday Jan 13, 2010

Cloning / Copying of View Object Rows: ADFBC Way

[Read More]

Thursday Jan 07, 2010

Query Mode of a View Criteria

[Read More]
About

Talk on ADF (Mail To: vijay.x.mohan@oracle.com)

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today