Object Events


public singleton object Events

This object contains the set of public, global events that are fired during XIE's WLP interaction lifecycle. The interaction lifecycle involves setting up and executing an Ajax request to the WLP server, receiving a response, and subsequently processing the response. WLP Ajax responses are encoded in an internal JSON format (the form of which is reserved and subject to change), and XIE manages the evaluation and handling of the body of these responses. The suite of public XIE events provides public access to key moments of interest during this lifecycle; listening code can use these event hooks to respond to or even influence the outcome of the interaction.

The XIE interaction lifecycle fires these events over the course of an interactions as follows:

  1. OnPrepareUpdate: Fired when an interaction has been initiated, but before the request is made; this event is cancellable; cancellation will terminate the interaction without making the underlying request
  2. OnHandleUpdate: Fired immediately after XIE receives the response, but before processing has begun
  3. OnRedirectUpdate: Fired iff the server is forcing the client to perform a redirect; processing will complete ASAP and then perform a client-side redirect
  4. Then, for each piece of response markup returned by the server, the following events are fired:
    1. OnPrepareMarkup: Fired before converting a response markup fragment into a DOM subtree; this event will fire once for each markup fragment that was returned in the response
    2. OnPrepareContent: Fired immediately after converting a markup fragment into a DOM subtree, but before doing additional processing (such as rewriting anchor hrefs and form actions); this event will fire once for each markup fragment that was returned in the response
    3. OnInjectContent: Fired immediately after injecting the fully processed (e.g. rewritten) DOM subtree into the document, but before executing any scripts associated with that content; this event will fire once for each markup fragment that was returned in the response
  5. OnCompleteUpdate: Fired after XIE has completed all response processing for the interaction, including the execution of any scripts defined by the markup updated during the interaction
  6. OnError: Fired any time an error occurs during interaction processing; processing may or may not continue once an OnError event has fired
Each event delivers a payload object to its listeners when the event is fired. The type and capabilities of each payload object differ from event to event. See the documentation for each individual event for more information about specific event payloads.

See Also:
bea.wlp.disc.xie.Events.Payloads
bea.wlp.disc.event.Event

   


Object Events.OnCompleteUpdate


public singleton bea.wlp.disc.event.Event Events.OnCompleteUpdate

This event delivers a ResponsePayload when fired. It can be useful for cleaning up custom code after an interaction or providing feedback to the user that the interaction is complete. This event is fired after all other XIE events have completed and necessary scripts have been executed. This event may or may not fire in error scenarios, depending on the severity of the error.

See Also:
bea.wlp.disc.xie.Events.Payloads.ResponsePayload

   


Object Events.OnError


public singleton bea.wlp.disc.event.Event Events.OnError

This event delivers an ErrorPayload when fired. This event only fires if XIE encouters an unexpected problem during a given interaction.

See Also:
bea.wlp.disc.xie.Events.Payloads.ErrorPayload

   


Object Events.OnHandleUpdate


public singleton bea.wlp.disc.event.Event Events.OnHandleUpdate

This event delivers a ResponsePayload when fired. It can be useful for last minute sanitizing, preparation, or saving of document state before XIE begins replacing portions of the document with new content.

See Also:
bea.wlp.disc.xie.Events.Payloads.ResponsePayload

   


Object Events.OnInjectContent


public singleton bea.wlp.disc.event.Event Events.OnInjectContent

This event delivers a ContentPayload when fired. It can be useful for DOM inspection and modification, after XIE has made any of its own modifications (e.g. rewriting) to the DOM subtree after injection into the document. As with OnPrepareMarkup, note that such changes should be undertaken with great care -- if the integrity of the markup is harmed during this event, subsequent events for both this markup and the overall interaction may fail. Also beware that certain HTML elements and artifacts present in the markup exist to support both XIE and other Disc client-side constructs, and are considered by WLP to be internal implementation details; relying on the presence of or otherwise interfering with these elements can also cause irreparable harm to the XIE response processing sequence, or may cause undefined behavior in other Disc APIs or even general application code.

See Also:
bea.wlp.disc.xie.Events.Payloads.ContentPayload

   


Object Events.OnPrepareContent


public singleton bea.wlp.disc.event.Event Events.OnPrepareContent

This event delivers a ContentPayload when fired. It can be useful for preliminary DOM inspection and modification, before XIE has made any of its own modifications to the DOM subtree in preparation for injection into the document. As with OnPrepareMarkup, note that such changes should be undertaken with great care -- if the integrity of the markup is harmed during this event, subsequent events for both this markup and the overall interaction may fail. Also beware that certain HTML elements and artifacts present in the markup exist to support both XIE and other Disc client-side constructs, and are considered by WLP to be internal implementation details; relying on the presence of or otherwise interfering with these elements can also cause irreparable harm to the XIE response processing sequence, or may cause undefined behavior in other Disc APIs or even general application code.

See Also:
bea.wlp.disc.xie.Events.Payloads.ContentPayload

   


Object Events.OnPrepareMarkup


public singleton bea.wlp.disc.event.Event Events.OnPrepareMarkup

This event delivers a MutableMarkupPayload when fired. It can be useful for filtering or rewriting the raw markup response or a document fragment before XIE begins processing it. Note that such filtering should be undertaken with great care -- if the integrity of the markup is harmed during this event, subsequent events for both this markup and the overall interaction may fail. Also beware that certain HTML elements and artifacts present in the markup exist to support both XIE and other Disc client-side constructs, and are considered by WLP to be internal implementation details; relying on the presence of or otherwise interfering with these elements can also cause irreparable harm to the XIE response processing sequence, or may cause undefined behavior in other Disc APIs or even general application code.

See Also:
bea.wlp.disc.xie.Events.Payloads.MutableMarkupPayload

   


Object Events.OnPrepareUpdate


public singleton bea.wlp.disc.event.Event Events.OnPrepareUpdate

This event delivers a MutableUpdatePayload when fired. It can be useful in preparing for the coming interaction, saving current UI state, or even preventing the interaction from occurring (by cancelling the current event; see bea.wlp.disc.event.Event for more information on cancelling events).

See Also:
bea.wlp.disc.xie.Events.Payloads.MutableUpdatePayload

   


Object Events.OnRedirectUpdate


public singleton bea.wlp.disc.event.Event Events.OnRedirectUpdate

This event delivers a RedirectPayload when fired. It can be useful for performing last minute operations before the redirect is actually performed.

See Also:
bea.wlp.disc.xie.Events.Payloads.RedirectPayload

   


Generated on Mon Feb 25 2008 09:52:54 GMT-0700 (MST).BEA Systems, Inc. All rights reserved.