This document covers the following topics:
When you create your own workplace application, it consists of several different elements:
The workplace framework
Standard workplace frames and pop-up dialogs
Standard multi-language messages and texts
Standard behavior
A specific application
Page layouts with Natural/Java implementation
Multi-language messages and texts
Style
Behavior
Depending on the application needs, it might be convenient to use the default implementation of the workplace framework as it is. Other applications might want to adapt the look-and-feel of the default workplace frames, standard pop-up dialogs and/or texts to their own needs. The topics below describe both approaches.
The default workplace framework is the workplace implementation as used in the development workplace itself. Standard dialogs and frames used in this implementation are not part of your project. They reside in the central project HTMLBasedGUI and are simply used from within your project.
To create a workplace application with the default look-and-feel, proceed as follows:
Use the Layout Painter to create a new layout which uses the "Multi Frame Workplace" layout template (this template is located on the Workplace tab).
Customize all required properties to your needs. However,
leave the workplaceproject
property of the
MFWPFUNCTIONS control empty.
Create an MFWPBOOTSTRAPINFO XML file. See Filling the MFWPFUNCTIONS Frame Initially: MFWPBOOTSTRAPINFO.
As the value for the
mfworkplaceeventlistener
property, specify
"com.softwareag.cis.workplace.MFCustomEventListener".
This is a ready-to-use default implementation. You can also add your own event
listener, see Customizing
the MFWPFUNCTIONS Behavior.
As shown in the section Framework Overview, the workplace framework contains the following predefined frames which can be customized slightly via the corresponding properties:
Functions
Active Functions
Contents
In addition, the workplace framework uses own messages and standard dialogs from the central HTMLBasedGUI project. The files of the HTMLBasedGUI project are not intended to be modified because any modifications will be lost during the next product upgrade. Instead, you can use your own "Active Functions" frame and/or your own standard pop-up dialogs and standard messages as described below.
Open your "Multi Frame Workplace" page
layout in the Layout Painter. Set the value of the property
workplaceproject
to the name of your project. When
saving the page layout, the following files will be generated into your
project:
<myproject>/multilanguage/de/workplace.csv
<myproject>/multilanguage/en/workplace.csv
<myproject>/multilanguage/de/popups.csv
<myproject>/multilanguage/en/popups.csv
<myproject>/popupok.xml
<myproject>/popupyesno.xml
The workplace.csv files in the multilanguage directory contain standard messages used in the workplace framework for English and German. Be careful not to change the text IDs. However, you can adapt the texts and you can also add additional languages.
The names of the popups.csv files in the
multilanguage directory are defined by the
translationreference
property. See the sample
layout below.
The popupok.xml and popupyesno.xml files are the layouts for the used standard pop-up dialogs. Be sure not to change the names of the layouts, the corresponding adapter classes or the properties/methods. You can adapt the layouts but you must keep the following parts that are shown in bold below:
<page ispopup="true" model="com.softwareag.cis.popups.PopupOKModel" popupheight="170" popupwidth="310" translationreference="popups"> <pagebody takefullheight="true"> <itr height="100%" width="100%"> <textout align="center" valign="middle" valueprop="question" width="100%"> </textout> </itr> <vdist height="5"> </vdist> <itr align="center"> <button method="reactOnOK" textid="popupok.button0" withtd="false"> </button> </itr> <vdist height="8"> </vdist> </pagebody> </page>
<page model="com.softwareag.cis.popups.PopupYesNoModel" translationreference="popups" popupwidth="310" popupheight="200"> <pagebody takefullheight="true"> <vdist height="5"> </vdist> <itr width="100%" align="center"> <textout valueprop="question" width="100%" height="100" align="center"> </textout> </itr> <vdist height="5"> </vdist> <itr align="center"> <button textid="btnYes" method="reactOnYes"> </button> <hdist width="10"> </hdist> <button textid="btnNo" method="reactOnNo"> </button> </itr> <vdist height="5"> </vdist> </pagebody> </page>
To create and use your own "Active Functions" frame, proceed as follows:
Use the Layout Painter to create a new layout which uses one of the following layout templates (these templates are located on the Workplace tab):
Workplace Activities Frame
Workplace Activities Frame 2
Workplace Stripsel Activities Frame
Workplace Stripsel Activities Frame 2
The layout templates either use a TABSTRIP2 or a STRIPSEL control to render the activities. Both variants are available with and without navigation frame icons ("Close All Windows", "Reopen Navigation Frame", "Close Navigation Frame"). The layout templates which contain the number 2 in their names include the additional navigation frame icons.
You can modify the generated layout, but you must keep the parts that are shown in bold below.
<page model="com.softwareag.cis.workplace.MFActivitiesAdapter" translationreference="workplace" ... <tabstrip2 tabstripprop="activities2" ...
For controlling the navigation frame, you can use the following method names:
on0Size
(close the navigation
frame)
onNormalSize
(reopen the
navigation frame)
onCloseAll
(close all
windows)
Note that the generated layout is implemented by the Java
adapter
com.softwareag.cis.workplace.MFActivitiesAdapter
. This
Java adapter will handle these events. The "Active
Function" frame cannot be implemented by a NATPAGE control. Also
note that the events listed above are not passed to the Natural
application.
In the MFWPFUNCTIONS control of your
"Multi Frame Workplace" layout, set the
activefunctionsvariant
property to the URL of your
own "Active Functions" frame layout. Example:
activefunctionsvariant="/myproject/myactiveFunctionsFrame.html"