| Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers |
![]() |
![]() |
IntroductionEvery webMethods package can serve Web pages -- just think about the Administrator (WmRoot) or the Database Configuration screens (WmDb). You, too, can build Web pages and launch them directly from the Administrator. This webMethods Ezine article discusses how a developer can modify webMethods services and Web pages to build a custom menu item in the Administrator and use that menu to launch Web pages that have a webMethods look-and-feel. The to this article is the User Interface Wizard and it performs all of the work for you through four easy steps:
When you are finished, your package will have its own user interface that resembles the webMethods Integration Server's own Web pages. If you are anxious to get started, go ahead and download the and test it out. Reading the article, though, may help to give a better understanding and stimulate your creativity. How a webMethods Web page is built
Launch the Administrator from any browser at http://serverhost:serverport. The Administrator will resemble the following:
The screen shot above is actually built from Web pages and DSPs in the directory /packages/WmRoot/pub/. The physical URL of the Administrator is http://serverhost:serverport/WmRoot/. This Web page is a composite of several pages:
The mimics the functions of the WmRoot index.dsp Web page. It allows you to build a home page for your package that shares webMethods style and design. The left-pane menusOne key element of webMethods' style is the use of left-pane menus. The creates the left-pane for you, but it is good discussion to understand what the package is doing. You may want to make your own edits to the code, after all. The left-pane menu is controlled in "menu.dsp" with the following piece of code:
1 <script src="menu.js.txt"></script>
2 <style>
3 body { border-top: 1px solid #97A6CB; }
4 </style>
5 </HEAD>
6 %invoke wm.server.ui:mainMenu%
7 <BODY CLASS="menu"
onload="initMenu('%value buttonUrls/sections[0]/submenu[0]/url%');">
Notice the invocation of
buttonURL contains the details of the left-pane menu items, including the menu section title and its respective sub-links. It is the output of line 6 and is referenced in line 7, its value passed to the Javascript function initMenu. Knowing how the buttonURL Record is used , we can build a custom service to generate a Record named buttonURL and then pass that Record into the modified menu.dsp file below. The modified file is what employs.
1 <script src="menu.js.txt"></script>
2 <style>
3 body { border-top: 1px solid #97A6CB; }
4 </style>
5 </HEAD>
6 %scope param(filename='./packages/packageName/config/ui.cnf')%
7 %invoke packageName.folderName:addMenuItemsToMenu%
8 <BODY CLASS="menu"
onload="initMenu('%value buttonUrls/sections[0]/submenu[0]/url%');">
In the modified menu.dsp, line 6 is setting an input variable named filename which is used as input to line 7's invocation of
Deconstructing the Record buttonURLTo make the best use of the Record buttonURL, let's look more closely at its structure:
The root node has one child, a repeating node named "sections". For each menu item to add to the Administrator, there will be a "sections" sub-node. There are three children of "sections". They are as follows:
The repeating sub-node "submenu" itself has four children and their content is straight-forward.
Go Deeper on the Subject: The wMUsers Discussion Forums Igor Androsov has over 14 years of experience in the IT Industry. For last 5 years he has been a software mercenary specializing in Integration process and technology using wide array of languages and platforms: C/C++, Java UNIX, LINUX, OS/2 and Windows. Igor started working with webMethods in 1998 as a new Integration tool implementing a B2B Exchange. He has implemented large distributed systems for multiple Fortune 500 enterprises.
Igor can be reached via email at
|
| © All Rights Reserved, 2001-2008. |