Title: RE: state dependent look&feel of HTML elements in struts/JSP

i think you can do this by using à bean in wich you use somes attributes to describe the state of your JSP.

Then , you test the values of this bean in your JSP to make conditional section. Struts Tags allow this kind of things.

A+ Cédric

-----Message d'origine-----
De : Roland Berger [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi 7 septembre 2001 02:44
À : Struts Mailinglist
Objet : state dependent look&feel of HTML elements in struts/JSP


Hi all

Offten one need severel JSP pages which looks almost the same. The only
difference could be that a field in one page is visible in the other not or
a link is activ in one page not in the other. Since I don't wont to write
two different JSP pages with that little difference I wonder if there is a
mechanism or framework which can do that for me.
Example:
Assumed I have a button which is activ in one JSP page which has to be set
to inactiv because the state of the datamodel (or whatever) has changed. One
solution would be to write a tag that checks the state of the datamodel and
set's the property of the button either to activ or inactiv.

Now it would be very nice if there is a framework where I can store the
state (activ/inactiv, visible/invisible, colors, etc.) of any HTML Element
(Buttons, Links, etc). Whenever I have to display the same JSP page the HTML
Element should check itself if his own state is activ/inactiv,
visible/invisible, blue/green........ . The state of a HTML Element could be
stored in an Object or even stored to a database.

Does somebody know procedures, tag libraries, framework .... which
simplifies creation of state dependent look&feel HTML Element's.
Since I'm quite new to JSP this might be a stupid question. If it is, plese
answer anyway.

Kind regards
Roland Berger

Reply via email to