Skip to main content

Posts

Showing posts from September, 2010

How to reference the value in a ADF Table column declaratively and in Java

I am correcting myself. I think I could not find a way to reference the value in a ADF table column using EL outside the table component. As we all know, the value in the column of ADF table is referenced by using EL " #{row. AttributeName } ", while "row" is defined in the ADF table component attribute - "Var" by default. If there is a scenario that you have to reference the value outside of the table: for example, you have a button outside of the table and will be dynamically disabled if a value in the table is null and enabled if a value is not null. The question is, how you gonna reference the column value out of the table. Using the IteratorBinding EL is not accessible, I was trying to use #{Bindings.IteratorName.AttributeName.inputValue} to reference the value but it failed, since it is not the way it should be referenced. It is a attribute of the active Iterator binds to the table so simply it should be using the attribute binding. When drag and...

About ClientListener and ServerListener

ClientListener , by its meaning, is fired/triggered by its source component to execute some client side script been defined in java scripts. Oracle defines it as "The clientListener tag is a declarative way to register a client-side listener script to be executed when a specific event type is fired. This tag will be ignored for any server-rendered components, as it is only supported by rich client components." Before using the clientListener tag, be sure to look for any existing behavior tags which might eliminate the need for scripts. ClientListener is more generic and could be used anywhere there is a need for java scripts insertion. But ADF already provides some specific tag listener for some special occasion,  for example: the af:showPopupBehavior tag simplifies what it takes to display a popup. This example will invoke the JavaScript method "showPopupFromAction" when the button is clicked and will then manually display a popup. ServerListener , is fir...

"Undo changes" Java codes

To implement a cancel edit button on an view object iterator which has changed data in cache, simple java codes can be used. The script is extracted from Frank's ADF code corner series 06 - " How to cancel an edit form, undoing changes in Java ". The script is put in the managed bean of the cancel button, either in ActionListener or Action beans. The example is in the ActionListener.