|
5.10 How to Make the Screens Look Different The model is primarily a logical rather than a physical model, i.e. it is not specific to a particular rendering. So very different looks could be applied to the same model and the pages would look very different. Nevertheless, it is possible to influence the look of the pages somewhat directly in the model. First there are the various styles, which can make fields, relations and buttons appear different. Some styles also support a format, which also changes the look. These styles and formats are not guaranteed to be handled as you expect by the transform. If your architect gives you more styles and use them in the model, they may be ignored by other renderings, and if you request an unsupported style the application will still generate by using the default style. It is also possible that the same style running on one transform will appear looking different if a different transform is used. This is unlikely to be a problem in normal use, and makes it possible for unchanged models to be run against new transforms, giving them a different look. One particular use of style and format that can make a considerable difference to look is using a String field, with a style of text and a format of @htmlclass or @htmlstyle. This adds boilerplate text to the screen either using the html style facility to change the colour, size font and so on, or the html class facility in conjunction with a css style sheet. The menu format can be selected from the application menuStyle. An initial splash screen can be used if specified against the application or ui jar components. Also on the application is the column style, which can be used to increase or decrease the number of columns of data. Although this gives a little variety, it doesn't really change the look of a page that much. If you want to change the overall look or get fine control over exactly where fields are placed, this involves enhancing the transform. Mostly this is a job for the architect, possibly in combination with a screen designer, but it's worth mentioning a little bit here so you know what can be done, and what it entails. Let us first consider the general look: the colour and the placement of items at the top and bottom of the screen. These are constant between pages, and if you change them for one page you change them for the whole application. They are fairly well isolated in half a dozen files, and by overriding these files it is possible to change the look without changing the functionality. There may be several days work involved in creating a corporate or departmental style, and this may be used for multiple applications, so it is time well spent once you are sure the application is functionally acceptable. Fine control of a single page is a different consideration. For some pages it may absolutely necessary, but these are few and far between. In the J2EE transform there are three page templates: one for pages with no data, called page_no-form, one for the security login screen, called page_simple, and one for all other pages called page. If you architect creates another template, you can point your page to it (by setting the template property). The page will then appear however the architect has set it up. It could involve a change to the whole page or just the central data section. It is even possible to draw everything in a web designer and transfer it into the template, but work and skill are involved. It can be time consuming and as it is likely to only affect a single page, it should only be used in exceptional circumstances. Links:
Copyright © 2001-2006 New Technology / enterprise Ltd. | |||||||||||||||||||||