Configuration Console

Modifying toolbar defaults in Landmark

This post is about using Landmark Configuration Console to modify the “default” list actions.  The defaults for a list are typically: Create, Delete, Search, Open (or View).  Some of these actions are restricted and cannot be performed.  In these instances, they will appear on the toolbar, but are dithered (greyed out) and you’d rather they not be there at all.  Other times you simply may not want an action to be possible (for example Delete).  There are also times when you may want to rename one of the actions.  It is very non-obvious how to modify these actions with Configuration Console.

To clarify, the “default” list actions are those that are not available to be modified and are typically accompanied by the Actions, Options and Drill Around options on the toolbar.

For example:

default

Note how in this example the Open and Delete are dithered.  For this particular business class, the Delete action is restricted and is not possible.  However, it still appears with the other buttons on the toolbar.  If we try to personalize or configure it, it’s not an option.  This is the toolbar configuration console for this business class:

configconsole

Note how none of the actions that we can see in the toolbar in the first screen shot are actually set in the “Actions Pinned to Toolbar” in this screenshot.  This is what I mean by “default” action.

So how do we modify a “default” action and why do I mean by “default” action anyway?  Simply put, a “default” action is an action defined at the Business Class level and then not overridden anywhere else (such as the list).  Because it is not overridden, it is inherited and is displayed on the list.  Let’s look at the LPL for this list:

lpl

The reason that you can’t modify the actions is because they aren’t defined here.  If there were actions listed here, then you would have options on the “Toolbar” tab above.  Let’s look at the LPL for the Business Class:

busclassLPL

What should be immediately obvious is that not all of the actions that are available are defined here, such as Open (or View).  I can’t explain this currently, but it would seem that there are certain actions that are inherent to Landmark itself and all Business Classes inherent them.  Regardless of where they are defined, it demonstrates the Java concept of inheritance: unless overridden, a child object – in this case a list – have all the same properties of their parent unless otherwise specified.  This basic concept gives us the clue to modify the toolbar the way we want it.

For this exercise we will want to completely hide the Delete and Update buttons and give the Create button a new label.  We can accomplish this by copying the LPL from the Business Class (or wherever the inheritance is from) and applying the modifications we want.  For this example, the fact that the “Actions” declarative is not present in the list LPL means that it is defaulting.  By adding in an “Actions” declarative and providing values, we can override the defaults.

For example:

modifiednewLPL

Which gives us this:

modifiednew

If we look at the Toolbar tab in Configuration Console, it now looks like this:modifiednewconfig

So in summary, in order to override the “default” actions on a list, you need only add the “Actions” declaration to the list LPL and then override as necessary.

HTH

 

 

Advertisements