[JAVASERVERFACES_SPEC_PUBLIC-685] Add ability to cancel a client side listener Created: 02/Dec/09  Updated: 01/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: Ajax/JavaScript
Affects Version/s: 2.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: driscoll Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 685
Status Whiteboard:

size_large importance_large


 Description   

Sometimes, the page author would like to cancel a client side event listener.

currently, there is no way to do this - you would have to instead code the
listening function to stub out if some value were set, instead, or overwrite the
function with a noop. That's awkward.

Instead, it would be desired that the listener be removed from the list of
listeners that the JSF client library keeps.

One way to do this would be to have the addListener function return a token, and
have a separate, cancel(token) function which would remove the listener
represented by that token.



 Comments   
Comment by ganeshpuri [ 21/Jan/10 ]

corrected target

Comment by Ed Burns [ 22/Jun/10 ]

rogerk

Comment by rogerk [ 23/Jun/10 ]

triage

Comment by rogerk [ 29/Jun/10 ]

target

Comment by rogerk [ 01/Jul/10 ]

re-target

Comment by rogerk [ 27/Aug/10 ]

For now re-target for 2.2.
If time permits may revisit for 2.1.

Comment by rogerk [ 16/Nov/10 ]

triage

Comment by werpu12 [ 09/Mar/12 ]

The token approach is not needed, a client which registers a listener should always know the function. I guess a simple remove listener should be enough.
so that we have jsf.ajax.addListener and jsf.ajax.removeListener.
It is as simple as that and can be easily implemented.

Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Comment by Manfred Riem [ 01/Aug/14 ]

Setting priority to Minor

Generated at Sat May 30 05:48:36 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.