Exercie JSF : Create your own component
Create a new facelet custom componentTraficLight
, that represents the value of a given property.
The XHTML file should contain someting like:
<prefix:traficlight value="-1" />which should be rendered like:
<img src="redlight.gif">It should be also possible to have:
<prefix:traficlight value="#{mybean.property}" />You can use the following images (if you have time you can create your own images ;-)):
The color green is used for positive values, yellow for zero and red for negative values.
Related Pages
Contact
Prof. Dr. Emmanuel Benoist
Berner Fachhochschule - TI
Quellgasse 21
CH-2501 Biel/Bienne
Switzerland
Mail: emmanuel.benoist (at) bfh.ch
Berner Fachhochschule - TI
Quellgasse 21
CH-2501 Biel/Bienne
Switzerland
Mail: emmanuel.benoist (at) bfh.ch
Social Networks
Follow
me
on
Linkedin, Scholar
& Research gate