About the basic understanding of UI component

Hi all experts,

I have been with JSF for several weeks and so far the fundamental concept regarding the UI component still confuses me a lot!

Through my study I have learned that a UI component usually consists of three building blocks: the component class, the render, and the custom action that binds the render to the component class. Also, the render is merely responsible for visually exhibiting the component class to the client.

My question is: is the component class merely defining the state and behavior of the UI component and not concerned about its visual presentation at all? In other words, for instance, does the component class worry about its shape, color, etc.?

Thank you very much!

[739 byte] By [michaelzhou23a] at [2007-10-2 3:28:20]
# 1
No. JSF renderer does not output color or shape directly.I only outputs mark-ups for target client environment.Via standard JSP tag set, for instance, it outputs HTML mark-up element like <table>, <input>,<span> etc., etc.
hiwaa at 2007-7-15 22:37:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hi Hiwa,

Thanks for your warm reply!

I am now much clear about the role of renderer.

However, another confusion: is it that the component class itself, e.g. the UICommand, is not converned about visual presentation taks (because the presentation tasks are handled by the renderer)?

Thanks a lot!

michaelzhou23a at 2007-7-15 22:37:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
> UICommand, is not converned about visual presentation taks (because the presentation> tasks are handled by the renderer)?That's right. Exactly.
hiwaa at 2007-7-15 22:37:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Hi Hiwa,Thanks very much and I am totally clear now!Best regards,
michaelzhou23a at 2007-7-15 22:37:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...