Monday, September 19, 2005

UIX Hack 3 - Removing the 'type' column from a portlet

This came up recently on the OTN Discoverer forum, where the poster asked how to remove the 'type' column from the List of Worksheets portlet.
"Is there a way to remove the "Type" column from Discoverer List of Worksheets portlet? I can see where to remove Modified Date, Creation Date, etc., but it doesn't from there allow me to remove the "Type" column. My users don't care whether it's a Workbook or Worksheet, and it's taking up valuable page real estate."

While there is no way to remove this using the UI, yet (there is a reason why the 'type' column is mandatory), UIX makes it possible to remove this column.

See my earlier posts about UIX and some other UIX hacks - "UIX Hack 1 - Removing the 'Connect Directly' section" and "UIX Hack 2 - Remove the Last Refresh Date from Discoverer Portlets".

And very importantly, here is the disclaimer, and warning:
  • I am NOT suggesting that you go around and muck with these UIX files.
  • Any changes you make to UIX files are unsupported.
  • Oracle Support will not support your installation if you run into problems as a result of making changes to these UIX files.
  • You will have to reproduce any errors on an instance without these UIX changes for Oracle Support to help you.
  • Any upgrades or patches you apply may overwrite custom changes you make to your UIX files.
Take the screenshot below, where you have a simple List of Worksheets Discoverer portlet. What you do not want is for the 'Type' column to appear.

The UIX file you have to edit is located under your installation's "\j2ee\OC4J_BI_Forms\applications\discoverer\discoverer\uix\list_of_worksheets" folder, as shown below. The file you have to edit is "show_list_of_worksheets.uix". Note that I have made a backup of my file, BEFORE doing any editing - as should you.There are two (2) lines of code that you have to remove, as shown below.

and


Be sure to delete only two lines, and the correct ones, as shown above.

After you are done deleting these two lines, save and close the file. Then go to your Application Server Control and restart your 'OC4J_BI_Forms' component. Once the component has been restarted, refresh your Portal page.
If you did everything right, and there really wasn't all that much to it anyways, your LOW portlet should now look like the image below: just the worksheet/workbook name and no 'type' column.