> I have 2 questions:
> 
> 1) why do the setters have to return void?

Since that's what the JavaBeans specification dictates. To analyze beans
we use the standard JDK Introspector API:
http://java.sun.com/j2se/1.5.0/docs/api/java/beans/Introspector.html

> 2) why are setters necessary at all? What if you have read-only
> properties in your bean, is it not reasonable to want to display them
> in your template?

The reason is consistency. You will 99% of the time populate the bean
from values (resquest, database, ...) and then display it. If all
getters would be displayed, you can get a lot of unwanted values that
appear (imagine all the getXXX() methods that exist).

I hope this helps.

Best regards,

Geert

-- 
Geert Bevin             Uwyn bvba               GTalk: [EMAIL PROTECTED]
"Use what you need"     Avenue de Scailmont 34  Skype: gbevin
http://www.uwyn.com     7170 Manage, Belgium      AIM: geertbevin
gbevin at uwyn dot com  Tel: +32 64 84 80 03   Mobile: +32 477 302 599

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to