JeeWiz Home  
The Model-Driven System Builder

JeeWiz Architect's Guide
 
Contents  >   15.  'Screen' Reference
 


15.12 Page Object

Used on
uiJar
Superclasspanel
Subclassed By
wizardPage
DescriptionThis is the overall screen page - this is one page shown to a user. It has a required view object, events and state objects.

Typically, there will be one named script (e.g. 'myPage.jsp') for each page model object. Within that, the controls on a page should trigger activity at the server by setting a request parameter to a value. The event-handlers pick up the requested activity via the value in the event-request-parameter-factor.

The view object, if defined, will be newly created on each request to the page and automatically filled with values from the request.

There is a default event handler, which is invoked if none of the other event handlers are triggered. This event handler is indicated by having no name or by having the 'is-default-event' set to true. The 'is-default-event' can have a name, but it is not used (but it is useful for documentation or for migrating existing systems).

Constraints are applied to the underlying data before the event handling logic is started.

State objects declared here should be page-level. State objects can also be referenced in the "use-state-object" list. This restricts the list of global and session state objects. If the list is omitted, all objects from the enclosing application are made availabe on this page.

Note to developers:

The standard page rendering lays out a form with input controls and does navigation in a standard way. Variations should be done using the 'template=' mechanism to set up another templating directory. Then override any of the standard scripts as necessary.
Contained
Lists
1
Name  panel
Type  panel
Inherited from  panel
 
2
Name  forward
Type  forward
Inherited from  panel
 
3
Name  constraint
Type  constraint
Inherited from  panel
 
4
Name  field
Type  field
Inherited from  panel
 
5
Name  tabMenu
Type  tabMenu
Inherited from  panel
 
6
Name  style
Type  String
Description  You can specify one or more styles to give information to the code generation scripts. The meaning of the styles is up to the script writer.

The styles can be used as flags by the script calling $styleList.contains( "styleOfInterest" )

[ Currently, there is no built-in support for style="styleType=value" type semantics. This would have to be defined by each script writer. ]

Examples of the use of styles:
  • characteristics of a web page (e.g. should it be included in one of the menus)
  • whether an entity should be automatically mapped to a data-view (the 'maintain' style).
Note that styles and the 'group' property are different concepts, and therefore complimentary. Many modelling objects - such as data-views and their fields, or business methods - can be put into groups as a hint as to where to render the UI pages. Typically groups are used to define 'where' to place the meta class, whereas styles indicate how to render the object.
Unique  false
 
7
Name  rolesAllowed
Type  String
Description   If no roles are specified all roles are allowed that are not explicitly prohibited, otherwise only the specified roles are allowed.
Unique  false
 
8
Name  rolesBlocked
Type  String
Description   Members of these roles are blocked, whether they are granted permission elsewhere or not.
Unique  false
 
9
Name  section
Type  section
Indexed property  name
 
10
Name  include
Type  String
Description  This defines the field froms the data-view of the page that are to be accessible through this page.
Unique  false
 
11
Name  pageVars
Type  String
Unique  false
 
12
Name  import
Type  String
Description  List of classes or packages to import. The imports get put into 'import' statements in the *.java files (and could be put in a 'using' statement in C#).

In XML, you can use one or more <import> nested elements as an alternative to the 'import=' property.

See also the import list on the Business Object Model jar, which provides additional facilities.
Unique  false
Inherited
properties
jwpattern (base property)

displayTitle from panel.displayTitle

layout from panel.layout

view from panel.view

masterView from panel.masterView

instanceId from panel.instanceId

form from panel.form

viewDetail from panel.viewDetail

editDetail from panel.editDetail

role from panel.role

banding from panel.banding

bandingInterval from panel.bandingInterval

presentationStyle from panel.presentationStyle

border from panel.border

childBorder from panel.childBorder

margin from panel.margin

childMargin from panel.childMargin

padding from panel.padding

childPadding from panel.childPadding

color from panel.color

childColor from panel.childColor

backgroundColor from panel.backgroundColor

childBackgroundColor from panel.childBackgroundColor

extraStyle from panel.extraStyle

height from panel.height

 15.12.1  Property 'name'
 15.12.2  Property 'title'
 15.12.3  Property 'container'
 15.12.4  Property 'pageInitialisationCode'
 15.12.5  Property 'generatePage'
 15.12.6  Property 'keepstash'
 15.12.7  Property 'menuEntryEvent'
 15.12.8  Property 'entryEvent'
 15.12.9  Property 'processName'
 15.12.10  Property 'loopName'
 15.12.11  Property 'autoPersist'
 15.12.12  Property 'format'
 15.12.13  Property 'package'
 15.12.14  Property 'eventRequestParameter'
 15.12.15  Property 'group'
 15.12.16  Property 'screenPosition'
 15.12.17  Property 'template'
 15.12.18  Property 'description'
 15.12.19  Property 'uid'
 15.12.20  Property 'failureForwardPage'
 15.12.21  Property 'failureForwardRequestString'
 15.12.22  Property 'linkCaption'
 15.12.23  Property 'text'
 15.12.24  Property 'hideWhenBlocked'

15.12.1  Property 'name'
Overridespanel.name
DescriptionThe name of the page is the logical name of the page. It should be descriptive of the action taken by the the page rather than the data displayed - e.g. 'OrderMaintenance' rather than 'Order'. For example, if you use UML, the name could be the use-case name.

The name must be a valid variable name in .NET and J2EE because it will be used to create classes in the C# and Java languages.

Don't add a prefix or suffix (e.g. 'Page') to the name you specify here. This will be done by the name mapping in JeeWiz, and ensures that the naming scheme can be easily adapted to local requirements.

The most important part of the structure of a page is that it can have
  • a data-view, whose fields and related views will be displayed and all data to be input
  • a number of actions to trigger logic at the server.
TypeString
Requiredtrue

15.12.2  Property 'title'
Overridespanel.title
DescriptionThis is the title for the page. The default is the name plus ' Page'.

This is what should go up in a banner headline. See also the link caption.
TypeString

15.12.3  Property 'container'
DescriptionThe container is optional and gives guidance to the page-generation templates as to the surrounding environment for this page. Typically it should be the name of another page or script that will create the outer parts of the page.

There is a special function - getContainedPages() - that can be called in the case where the container is a page. The script writer can use $page.containedPages as the list of contained pages in this case.
TypeString

15.12.4  Property 'pageInitialisationCode'
DescriptionThis is the page initialisation code. It is optional. If present, it is included in the page processing code after all state has been set up, and before processing of the events starts. It is therefore useful to declare and initialise any additional objects required by the page processing.
TypeString

15.12.5  Property 'generatePage'
DescriptionSet the 'generate' flag to false if you are going to code this page by hand. In that case, it should be in the specification/pages directory or generated by another template.
Typeboolean
Defaulttrue

15.12.6  Property 'keepstash'
DescriptionAny populated value object held in the session will not clear itself on display. It will need to be manually cleared. Any updates will have to be handled manually, too.
Typeboolean
Defaultfalse

15.12.7  Property 'menuEntryEvent'
Overridespanel.menuEntryEvent
DescriptionAn event that is always run on coming to a page from a menu option.
TypeString

15.12.8  Property 'entryEvent'
Overridespanel.entryEvent
DescriptionAn event that is always run on coming to a page from an event.
TypeString

15.12.9  Property 'processName'
Overridespanel.processName
DescriptionIndicates the page is the first in an automatable process section. Causes the database to be interrogated for a new process number, which is stored in the session.
TypeString

15.12.10  Property 'loopName'
Overridespanel.loopName
DescriptionIndicates the page is the first in an automatable loop section.
TypeString

15.12.11  Property 'autoPersist'
Overridespanel.autoPersist
DescriptionTurns exit events into business method create. Only used on process flows.
Typeboolean
Defaultfalse

15.12.12  Property 'format'
Overridespanel.format
DescriptionAllows variations of the style. To tweak form widths, etc
TypeString

15.12.13  Property 'package'
Overridespage.package
Aliasnamespace
DescriptionThis is the package attribute: it declares the name of the package that this interface (or class, or entity, etc.) belongs to.

It can be used on

  • reference types (interfaces and classes) and all their derivatives
  • associations
  • assemblies of model-objects
  • containers of same, like jars.
It uses delegation of responsibility to search its parent chain. For example, in the J2EE realm, this means that the package can be specified on (working up the containment chain):

  • an entity,
  • or its ejb-jar,
  • or the application,
  • or in the assembly
  • or in the build properties '.jwp' file.
If none of these is specified the package will be null. Null packages are not recommended but legal for simple Java builds. For larger systems, null packages are not allowed.

The combination of the package and class name (i.e. the fully-qualified Java classname) must be unique across all reference types and their derivatives in a build.
TypeString
Delegatestrue

15.12.14  Property 'eventRequestParameter'
Overridespage.eventRequestParameter
DescriptionDefines the name of the request parameter that determines which event needs to be handled. This is delegated from the page to the application and then the external configuration, so it can be set in any of these places.
TypeString
Defaultaction
Delegatestrue

15.12.15  Property 'group'
Overridespage.group
DescriptionA group is a hint to generation scripts as to where to place this object.

It provides an alternative, more flexbile way of grouping business-methods, objects, data-views and pages.

For example, pages for data-maintenance might be in the "DataMaintenance" group, while specially-designed sessions might be in the "BusinessFunctions" group. (Expressing this grouping cannot be derived from the hierarchy: all pages are children of a single application.)

Another usage could be to group fields for presentation based on their group name.

The 'group' property should be used to guide presentation to the user, whereas 'style' should be used to guide further pattern generation.

The 'default' group is the null value (script writers must use '#if( !$group )' to identify the default group.
TypeString

15.12.16  Property 'screenPosition'
Overridespage.screenPosition
DescriptionA numeric value indicating the position of this page or field within a group. This affects the position of the item's display on the screen, relative to other members of the group. The value is a string of 1-6 digits; the order is calculated numerically rather than alphabetically - so 25 is higher than 5. Lower-valued positions appear first.

If this is not specified, then the order of controls within a group is determined by the order in the XML specification file. The order within the specification can be set if the XML is being specified directly and this field need not be specified. However, for specifications from UML design tools this may not be possible and it will be necessary to set this field to control screen order.
TypeString
Delegatestrue

15.12.17  Property 'template'
Overridespage.template
DescriptionThe template property is a hint to the code-generation scripts.

If the object has a number of variants in a particular rendering, this value can be used to select the variant.

There is currently no special support in the generator for template scripts and this feature is not used in any JeeWiz-provided scripts. However, if you are writing local variants of the scripts, you can use it to give minor variations of functionality.

If you are used to 'stereotypes' in UML modelling, this interacts with JeeWiz as follows:

  • some well-known stereotypes (entity or EJBEntityBean / boundary) translate directly to JeeWiz objects, producing / in the XML specification
  • in addition, any steretype from UML is added to the JeeWiz object as the template property.
TypeString

15.12.18  Property 'description'
Overridespage.description
DescriptionOptional description.

Use this to
  1. document the meaning of a particular item
  2. specify functionality at the design stage for implementation later.
TypeString
Support Element Inputstrue

15.12.19  Property 'uid'
Overridespage.uid
DescriptionThe 'uid' is a Unique IDentifier for a methods in the business object model (and derivatives like J2EE).

The 'uid' uniquely identifies the method, even if the name or signature of the method changes.

This will normally be generated by the modelling tool; if not, it can be entered manually (but make sure it is unique!).
TypeString

15.12.20  Property 'failureForwardPage'
Overridespage.failureForwardPage
DescriptionDefines the default page to go to in a failure situation (e.g. constraint failure). This must be the name of a page in the current application.
TypeString
Delegatestrue

15.12.21  Property 'failureForwardRequestString'
Overridespage.failureForwardRequestString
DescriptionDefines the additional request action to execute in a failure situation. Default is just to display the page. If this value is specified, it results in the default event for the forwarded page being set to this value.
TypeString
Delegatestrue

15.12.22  Property 'linkCaption'
Overridespage.linkCaption
DescriptionThis is the caption that goes on links, buttons or other controls.

It should be a short, one- or two-word name that will fit on a small button.
TypeString

15.12.23  Property 'text'
Overridespage.text
DescriptionThe 'text' is the code insert for the body of the method - the text between the '{' and '}' brackets.

If the method has a return value, you should write the return statement too.
TypeString

15.12.24  Property 'hideWhenBlocked'
Overridespage.hideWhenBlocked
Description Whether a blocked principal should be prohibited from seeing links they can not use.
Typeboolean
Defaulttrue
 


Copyright (c) 2001-2008 New Technology/enterprise Ltd.