isnt it that much easier to define one "highlight" css class and then dynamically add it to elements that need to be highlighted?
-igor On Sat, Mar 29, 2008 at 6:55 AM, Eric Rotick <[EMAIL PROTECTED]> wrote: > I have a requirement to allow users to change such things as colour, font > etc. for certain markup. Currently this is all 'wrapped' by CSS ids/classes > but the use of varying ids/classes seems wrong. > > The use case if for engineers viewing data from sensors. Some engineers > require values below a certain value to be highlighted whereas other > engineers want values above a certain value to be highlighted. The > highlighting might means changing the font to bold, the background colour to > yellow, the foreground colour to red and the surrounding box to double > lines. I could have CSS classes of highlight1, highlight2 etc but read on. > > In essence the markup is exactly the same but for the highlighting rules so > having a number of sub classed pages is not correct. In addition, the rules > at which something may change might change at run time. For example, one > particular engineer may be monitoring a system where a value is highlighted > if it goes outside of a range and another highlight if the erroneous value > has been out of range for an extended time period. Basically, each engineer > can choose their own colour scheme. Also, for very complex situations an > engineer would be overloaded by too much information. In these cases they > dim down the non important data so that the important data becomes more > prominent. > > OK, I could define a bigger set of CSS classes for each situation but each > engineer has a different way of solving the viewing problem and the current > system (not web based) does what they want. > > So, I think the solution lies in the dynamic generation of the CSS at run > time from the database. I then thought I would create a small servlet to > handle this but then, I already have Wicket running, maybe I should sub > class Page and make a CssPage class. I need to have a pop at doing this in > the future anyway for WML so the research would not be wasted. > > I was wondering if anyone had any experience or advice before I look into > this in more detail. > > Eric. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
