Some IDM users who have created their own forms have asked how to change or remove the standard header that shows at the top of each Process Request form frame.
Here's an approach that you can use to dynamically access the header.
While theoretically there is the option to locate the respective source files in IDM.war and change the code, this approach is not recommended since such changes would void your product support and can have major side effects if not implemented properly.
Another approach to globally change the contents of some header texts, e.g., the "Form Detail" text, would be to modify the string resources in IDM.war.
The alternative approach that is described here does not touch your WAR file, but programmatically modifies the header.
This also offers you the chance to make such changes to your frame header dependent on the current form, or even dependent on the user input.
This Cool Solution is subdivided into two parts:
- The first part describes the ECMAscript methods and their effects,
- The second part describes a test form that demonstrates the available features.
The ECMAscript library
- Add the script library to your form
The key element of this solution is a set of ECMAscript functions which is attached to this note (helperHeader.zip) and contains the logic to access the frame header.
You need to add the attached script to your form. This can be done in one of two ways: as "inline script" (copy the contents of the script file into the form inline script), or as "external script" (save the script in a location where UserApp can find it). See the IDM documentation for details how to add inline or external scripts.
- Initialize the library
Call the initialization method "uaFormHeader_initialize( form )"
During the initialization, the library locates the frame header and initializes the internal variables.
Call the initialization method from the event form:onload() or anytime before using the library methods the first time.
uaFormHeader_initialize( form ) needs to be called only once.
- Call the header modification methods.
There are a few main methods that you typically call:
- hideHeaderRow( target, valHidden )
This method hides or shows parts of the form header.
The parameter valHidden can be set to "true" (to hide the selected part) or "false" to make the header element visible, again. Note: Use the String "true".
The parameter target has these valid values: 0..3, "*", "top"
When used with the Integers 0..3, the method hides one of the header lines 0 (Ressource), 1 (Recipient), 2 (Process Request Category), or 3 (Description).
Note: do not hide or modify line #1 during form:onload, since the row is accessed by UserApp to display the current recipient. You may hide/modify line #1 after the form has loaded.
The value "*" hides or shows lines 0 to 3
The value "top" hides or shows the string shown at the top of the frame (which by default is "Step 3 of 3: Confirm and complete process request")
- setHeaderText( row, col, text )
This method changes the text in one of the header lines.
Each header line consists of 3 columns:
The first column is basically an empty place holder, the second column contains the title (e.g., "Ressource:"), and the third column contains the variable contents.
The parameter "row" is the line number (0..3)
The parameter "col" is the column number (0..2)
The parameter "text" is the new display text.
Note: you may also add HTML tags.
The sample request form
For your convenience I have attached a test request form, that you can import into Designer (Cool Solutions - Modify Header.zip).
Before deploying you should check and update the form trustees.
When loading the form, all headers are left untouched, and my custom controls to modify the form header are displayed:
Using the checkboxes, you can show or hide each header line individually.
Or you can hide/show all line in one go.
Another checkbox allows to hide the top section of the form.
The text fields allow you to send custom text to the header.
And you can also use HTML tags in your custom header texts.
Note: Tested with RBPM 3.7.x, Internet Explorer 8, and FF 3.6.3.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.