Controlling the Appearance of the Application

LANSA

Controlling the Appearance of the Application
This example was created using an HTML skeleton. The advantage of using a skeleton is that it removes the need for most (if not all) of the HTML editing after each LANSA recompile of a function.
  • First we designed the layout using only HTML and hard coded values. Basically the left menu and the body composed by the header with the banner, text and the footer.
  • After that we created the skeleton (WRKMBRPDM FILE(SETDTALIB/DC@W22) MBR(SET_178)) and pasted the HTML.
  • The background and layout of the left menu is a simple image called S_178bg.gif . It is just a horizontal line with different colors created using the BACKGROUND HTML attribute in the BODY tag: <BODY BACKGROUND="S_178bg.gif". The browser automatically tiles the image so you get the effect the background in the whole page.
  • The contents of the left-hand menu are laid out in the component S_178MENU.
  • In the skeleton, where it says %W3FLD, LANSA will put the fields in your request command
  • In the skeleton, where it says %W3BRW, LANSA will put the browselist
  • In the skeleton, where it says %W3FRM, LANSA will put the FORM tag
  • The <RDML ONCONDITION="S_178FRNT"> controls the insertion of the advertisement so that it only happens in the main page. Hence, in SET_178B I included it in S_GRPPANL and set the value to non-blank. The other functions don't have it so it will be blank and the HTML enclosed will not be sent.
  • The background and foreground colors of the browselist headers and cells were controlled with the graphic variables beginning with *LW3BLBC, *LW3BLCCB, *LW3BLCCF and *LW3BLFC.
  • Each function has a header text specific to it. I created a field called S_178FDES which has a default of “*FUNCTION”. I created one visual input component for each function with the same name as the function, containing the header text for that function. In the skeleton you will see this line <RDML COMPONENT="&FLD_S_178FDES"> which means replace what is between the double quotes with the contents of the field S_178FDES which will be the name of the current function and so the components with those names will be picked.
  • The big advantage of using a skeleton is that it removes the need for most (if not all) of the HTML editing after each LANSA recompile of a function.
  • Where screens required two browselists, the browselist was taken out of the REQUEST statement that is actually displayed, and both browselists were included in the header component. (for example in component SET178B). Apart from allowing multiple browselists to be displayed, this technique allows the positioning of the browselists to be better controlled. And no editing of the HTML after compile is required.