Wednesday, November 30, 2011

Viewing ADF Log Messages on Standalone/Production Servers

If you have used the ADF Logging capabilities ( eg. as mentioned in the blog of Duncan Mills: ), then you will figure out that its very easy to test and use in JDeveloper IDE, but most guides does not tell anything about how to enable/disable them on standalone/production WLS. I pasted the same question on forum post and thanks to Timo who pointed that for doing the same on standalone/production WLS, we need to install Enterprise Manager as well. Here is that forum post:

If the EM is installed, then after selecting the managed server, from the WebLogic Server menu select Log Configuration, and change the logging level for your AM, as shown below:

After that, the log messages will be visible in the diagnostic log files.

Monday, November 21, 2011

Working With The Switcher Component.

This blog shows how we can use Switcher component. Switcher is used for conditional layout changes. For example, when used within a table, using switcher you can render different component for each row based on some values present in the rows. In this sample, I am using SCOTT.EMP table to render different images based on different 'Deptno' values for each emp row. The logic to use switcher is simple. A switcher contains with in it (one or many, based on the requirement) facets, and a switcher has a property called facetName which should point to the facet we want to render.

Here are the screen shots to explain this:

Fig 1:

The above figure shows that we want to render the facet whose name matches the value of Deptno for the current row.

Fig 2:

Since I know the Deptno has values like 10, 20, or 30, I have named the facet accordingly:

Fig 3:

Fig 4:

Fig 5:

The above 3 figure shows what we want to render in each facet.

Fig 6:

The above figure shows how the EmpView page looks like after adding the switcher.

Fig 7:

The above figure shows the output when the EmpView page is run.