Thursday, August 12, 2010

ADF 11g: Change attribute order in query component

Ever wondered if you can change the order in which the attributes are displayed in an 'af:query' component? It can be done. Here is how.

After you have created BC you can drop the named criteria "all queriable attributes" as an 'af:query' component with table.



When you run this, you will see the default generated query component. let's assume that the attributes in this component are not in the order that you like. You are in desperate need to show the "job" attribute first.



The solution is at view object level. You can change the order of the attributes by invoking the "Set Source Order" button. This button will show you a popup in which you can reorder the attributes. Use the button(s) so the attributes are in the order you want.



If you run the page again, the query component shows the "job" attribute first.



Too bad that this is a design time solution. There are some pending ER's regarding this subject.

2 comments:

Amit Mishra said...

It wont work if attribute are coming thorugh inlined view criteria using different view object.
Could you please suggest reordering of such attributes

Anonymous said...

Tnx