Friday, December 30, 2011

ADF: Custom Client Attributes

As Oracle say:
"The clientAttribute tag specifies the name/value for an attribute which will both be made available both on the server-side (Faces) component as well on on the client-side equivalent. This tag will be ignored for any server-rendered components, as it is only supported for the rich client. ClientAttributes are not synchronized to the server since unknown attributes from the client are not synchronized to the server."

Client attributes simply allows developers to add custom properties to an ADF Faces component instance. Next JavaScript can read custom attribute by calling the getProperty('attr_name') function on a component handle.

Use case:
  • passing to Javascript additional infromation, out of scope for the component.
  • passing to the client Context informations
  • alternative to Javascript callback

No comments:

Post a Comment