Core components standartized attributes
Actually the tables below also affects all rich components which provides Ajax functionality out-of-the-box.
Table 1: Names Changes
RichFaces 3.3.3.Final | RichFaces 4.x | Desctiption |
---|---|---|
process | execute | Defines id's of components to be processed in case of Ajax request. accepts:
|
reRender | render | Defines id's of components to be updated on client side after Ajax responce returned. Accepts the same values as execute does. And additionally accepts so called meta-components definitions. Every component could procide list in documentation and them could be used in JSF shortcuts notation to define parts of that component to be updated. like render="table@body" |
ajaxSingle | n/a | now just execute="@this" used. |
limitToList | limitRender | excludes automatically updateable zones(outputPanel, messages, and so on) from rendering. |
oncomplete | oncomplete | JavaScript called after Ajax request complete |
onbeforedomupdate | onbeforedomupdate | JavaScript called prior to performing DOM updates |
onsubmit | onsubmit | JavaScript called before sending the request. Allow to cancel the request by using return statement. |
action / actionListener | action / actionListener | Works the same as for standard action components. Important!: For now exists only for components(like a4j:commandButton or a4j:commandLink) and not for behaviors. So a4j:ajax and similar do not have such attributes. Them provides listener attribute (according to JSF standard) or some other custom event listeners attributes. |
status | status | Allows to point the component to status component (by id) which will be activated in case of Ajax request. |
focus | focus | not implemented. |
data | data | allow to serialize objects from server side to be used at JavaScript functions. e.g. oncomplete="alert(event.data)". |
Table 2: removed attributes:
Attribute Name | Description |
---|---|
ignoreDupResponse | moved to attachQueue behavior |
requestDelay | moved to attachQueue behavior |
timeout | moved to attachQueue behavior |
Table 3: new ones
Header 1 | Header 2 |
---|---|
listener | standard JSF attribute for behavior. Alows to define listener on BehaviorEvent when the behavior activated. |
Rich components standartized attributes
TBD
Client side API usage
The same as for 3.3.x in order to call client API on some component you should use #{rich:component('id')} function or <rich:componentControl/> behavior.
For all who used just document.getElementById(id).component or $('jQuerySelector').component - in 4.x it's not valid anymore. To call without function or component control you could use RichFaces.$('clientId'). But such usage really not recommended. If we will make some refactoring again - you will have to correct all such calls. And in case of function or tag usage - we will care about that transparently for you.
Comments