mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/
|
|
Stylesheets within Web 2.0 Applications
Web 2.0 technology
utilize in-line stylesheets. The main benefit of this is that all style
information is contained within the document. That means no matter if your
servlet is run off of your application server, sent via email, or downloaded as
an Excel File and stored on your PC it will always have the same look and feel.
The “classic” templates were unable to have this portability functionality and,
as such, downloaded and emailed pages looked drastically different than pages
run directly from the application server.
If you open up an application
through m-Painter, you will notice the stylesheet information is directly
listed on the page. Although it is listed, that information does not get saved
to the page and is actually retrieved at run time. (It is only listed so
m-Painter can mimic what you will see at run time).
*However, if you wish to manually
include a different look, you can include the styles directly within the servlet
through m-Painter.*
The extra portability, along side
the same runtime functionality, make the new Web 2.0 stylesheets
a Win-Win for you as a developer.
But I really want to use my old system? Is this possible?
Of course. However, this method is not
encouraged by mrc as you lose all of the portability functionality. Simply edit
the file “mrc_servlet_stylesheet_css.html file within your Data Dictionary
directory. You will notice many lines of stylesheet information, after making a
proper back up, delete all of the text in the file. In its place, enter this
information:
</style>
<LINK REL="stylesheet"
TYPE="text/css" HREF="/mrcjava/mrcclasses/nameofstylesheet.css">
<style type="text/css">
Replacing nameofstylesheet.css
with then name of the stylesheet you wish to use.
Of course, it bears repeating, with
the method described in this section you lose all of the above listed benefits
of including the CSS directly into the source of your servlet.