|
|
|
The Model-Driven System Builder
|
|
JeeWiz Architect's Guide
|
|
|
|
Contents >
14. 'Business Object' Reference
|
|
|
14.7 BaseView Object
| Superclass | internalClass |
| Subclassed By |
|
| Description | This is the base meta-class for the view objects - data-views, ui-views and service-transfer-objects.
These classes have in common aspects of holding fields, having relationships between them, and moving and transforming data between tiers.
Note that some of the properties (e.g. initial-entity), that may seem not to be relevant to service-transfer-objects (STOs)
and ui-views, are present so that patterns can create fully-featured data-views out of STOs.
|
Contained Lists |
| 1 |
|
| |
| 2 |
|
| |
| 3 |
|
| |
| 4 |
|
| |
| 5 |
|
| |
| 6 |
|
| |
| 7 |
| 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 |
|
| |
| 8 |
|
| |
| 9 |
| Name | rolesReadonly |
| Type | String |
| Description | If the principal is not in the roles-allowed or the roles-blocked, they may have
their access limited to read only by being included in a role here.
|
| Unique | false |
|
| |
| 10 |
| 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 |
|
| |
| 11 |
| Name | rolesBlocked |
| Type | String |
| Description | Members of these roles are blocked, whether they are granted permission elsewhere or not.
|
| Unique | false |
|
|
Inherited properties |
|
14.7.1 Property 'name'
|
14.7.2 Property 'access'
|
| Overrides | java:field.access |
| Description | Views are naturally public - they communicate information between different tiers/domains, so we want them accessible from any package.
|
| Type | String |
| Default | public |
14.7.3 Property 'supportsUpload'
|
| Description | If a file upload field exists on the view, the view may support file uploading. This means that an html form has to be multipart
and because of a bug in struts 1.0, we have to flag a redirection on any struts forwards coming from the page. This flag indicates
whether these should be done from pages supported by this view.
|
| Type | boolean |
| Default | false |
14.7.4 Property 'generateMaintenancePages'
|
| Description | Set this flag to 'true' to generate the maintenance pages for this data-view.
By default it is set to 'false'.
To automatically generate maintenance pages for the data-view (which is uncommon), set it to false.
Setting this flag to true only makes sense if there is an 'initial-entity' for the dataview -
i.e. it maps back to a table on the database.
|
| Type | boolean |
| Default | false |
14.7.5 Property 'lookupPageCreated'
|
14.7.6 Property 'generateMaintenanceSession'
|
| Description | Set this flag to 'true' to generate the maintenance session bean for this data-view.
This is a delegated property, so it can be set in the jar/assembly, application or top-level configuration properties.
By default it is set to 'true'.
If you want to disable this for a particular object, set the value to 'false'.
The standard patterns will automatically generate methods on the session bean to
- search for the object
- view/update the object
- delete the object.
|
| Type | boolean |
| Default | true |
| Delegates | true |
14.7.7 Property 'group'
|
| Overrides | baseView.group |
| Description | A 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.
|
| Type | String |
14.7.8 Property 'userNameBase'
|
| Overrides | baseView.userNameBase |
| Description | This is the user-visible name for this object (currently it is used on business objects, business-methods and data-views.
In the standard rendering, this is further embellished in component.properties to create the userName, which the user will actually see.
For example, say the name of a session object is AccountTransaction.
Then the default for the user-name-base will be 'Account Transaction'.
This will be embellished in component.properties to give the userName 'Account Transactions'.
Either the userNameBase or the userName can then be used in scripts.
|
| Type | String |
14.7.9 Property 'convertEmptyStringsToNull'
|
| Description | This delegated property when set causes empty values, on input (e.g. on screens) into optional fields, to be converted to null.
This property is present on the attribute or data-view-field and their parents.
This property has no effect on required values.
By default, this property is set (in the Business Object Model's system.properties).
If this value is not set, there is no way to express 'no value' on input screens.
|
| Type | boolean |
| Delegates | true |
14.7.10 Property 'generateDataviewImplClass'
|
| Description | If this property is true, the rendering creates both an implementation class and a base class.
The default is false, which will create just the one class (with the implementation name, but with the base implementation).
This flag only needs to be set where additional methods will need to be implemented by hand to support the operation of the data-view.
|
| Type | boolean |
| Delegates | true |
14.7.11 Property 'screenPosition'
|
| Description | A 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.
|
| Type | String |
| Delegates | true |
14.7.12 Property 'initialEntity'
|
| Description | Specifies the top level entity in the Data View, from which the relationships are traversed.
This is optional: input-only data-views do not need this.
If specified, the initial entity is used for
- the entity for related fields on data-view-fields where there is no relation
- defining the primary key to be held SQL statements are executed
- defining the type of a getter to get and update the underlying entity.
For example, in a combined Order / OrderLine screen,
- the first data-view for the ordering information would have an initial entity of Order
- the orderLine data-view-relationship would be traversed to retreive OrderLine information for the given Order
- this would be presented in a second data-view having OrderLine as its inital entity.
|
| Type | String |
14.7.13 Property 'sqlStatement'
|
| Description | Optionally specifies the SQL statement to query the data for the master end. This is only relevant if an initial-entity is specified.
If the sql-statement is not provided then a SQL statementwill be automatically generated using the initial-entity as the starting point.
The data view fields will be populated using the 'relation' and 'related-attribute' property using the entity relationships as a means of traversing the entities.
|
| Type | String |
14.7.14 Property 'additionalWhereClause'
|
| Description | Specifies the extra piece on the where clause to query the data for the non-master end. This is added to the end of the generated where-clause and
|
| Type | String |
14.7.15 Property 'sqlOrder'
|
| Description | Specifies how the result set of the sql statement will be ordered. The value will be added to the end of the generated sql statement as " ORDER BY '${d}sqlOrder'".
|
| Type | String |
14.7.16 Property 'container'
|
| Description | This is used during the crud page generation routine to determine where in the menu hierachy the crud
pages should be placed. It has no effect if generate-maintenance-session or generate-maintenance-pages
are false.
|
| Type | String |
14.7.17 Property 'dataviewTriggers'
|
| Description | Requests that onLoad(), onStore() and overrideDataRetrieval() methods be generated on the dataview's implementation class.
These methods allow the programmer to implement
- specialised data manipulation after execution of the standard SQL-based retrieval (onLoad)
- specialised data manipulation before execution of the standard SQL-based update/create (onStore)
- overriding of the SQL-based data retrieval mechanism (for example, to access external systems).
This field is only relevant when the alwaysGenerateTriggers flag is not set;
if alwaysGenerateTriggers is set (which is likely to be done as a global setting), the above methods will be generated.
|
| Type | boolean |
| Default | false |
Copyright (c) 2001-2008 New Technology/enterprise Ltd.
| |