This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I would really appreciate if any one can let me know what is a property of a component and attribute of a component in jsf world. [...]
The core components in JSF are "rendering independant", meaning that they define behavior that is the same no matter how they are rendered. For example, a UICommand component can be rendered as a link or a button, but the behavior is the same. Another examples is a UIInput, which may be rendered as one input field for text input, or as three fields for year, month and day input, or as four fields for credit card number input; the core component behavior is the same no matter how it's rendered.
The rendering and decoding of input for a component is delegated to a separate Renderer attached to the component. So, for instance, if you want a UICommand rendered as a link, you attach a Link renderer; if you want a button, you attach a Button renderer.
With that background, it's easy to describe the distinction between a component "property" and an "attribute".
All rendering independent configuration items for a component are specified as a set of regular bean properties, i.e., by type-safe get and set methods. For the UICommand component, "action" is one example, used to bind the component to a method invoked when the command is triggered.
All rendering dependent configuration items are specified as generic attributes, represented by entries in an attributes Map that the Renderer attached to the component reads. UICommand/Button examples are "alt", "disabled", "style", and all the other HTML attributes that are supported by an HTML <input type="submit"> element. Using generic attributes for rendering dependent stuff makes it easy to develop new Renderers that need new configuration items, because the component class doesn't have to be modified with new bean get/set methods. [ June 12, 2004: Message edited by: Hans Bergsten ]
Hans Bergsten, firstname.lastname@example.org<br />Author of O'Reilly's<br />- JavaServer Pages,<br />- JavaServer Faces<br /><a href="http://www.hansbergsten.com/" target="_blank" rel="nofollow">http://www.hansbergsten.com/</a>