Quick search:


How to override columns in an item table

By default item tables show columns for the properties as defined in the method getUiFieldPaths on the class of the peanuts shown. If such a method is not defined or returns null, all properties except 'label' an id properties are shown.

The simplest way to override this is overriding the getUiColumnPaths method of a peanuts class and let it return a string with the names of the properties to show, in the same order as to show them (example). Another way is to let it return an array with the property names as values. This has the advantage that special column labels can be specified by using them as keys (example).

This will affect all generic pages showing the type, including report pages. To affect report pages only, override getReportColumnPaths.

To override the columns in a specific page or page type, find out from what PntObject..Page class it inherits and look for it in the result of a 
method search for '*ItemTable' to find the method to override.

You can override the method in the specific class of your page (not in the pnt class!), but that may affect all applications. If you do not want to affect all application you may have to copy the subclass to your application classFolder or subclass in the application class folder replacing 'Object' with the type of peanuts it should be used for. See how to specialize a page.