[richfaces-issues] [JBoss JIRA] Reopened: (RF-8212) Extended data table - keyboard navigation of rows of a selectable grid breaks after rerendering another datatable with selectionMode=none

Ryan Yoder (JIRA) jira-events at lists.jboss.org
Fri Dec 18 13:05:37 EST 2009


     [ https://jira.jboss.org/jira/browse/RF-8212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Yoder reopened RF-8212:
----------------------------



I found one other line of code that needs to be changed to fully fix this bug.
 In refreshEvents function.

refreshEvents: function() {
		this.setListeners();
		if(this.options.selectionMode != "none") {
			this.eventKeyPress = this.processKeyDown.bindAsEventListener(this);
			Event.observe(document, "keydown", this.eventKeyPress);
		}
		A4J.AJAX.AddListener({
			onafterajax: function(req, event, data) {
				if(!$(this.prefix + ":n")) {
					// RSY: added if
					if(this.eventKeyPress)
						Event.stopObserving(document, "keydown", this.eventKeyPress);		
				}
			}.bind(this)
		});

> Extended data table - keyboard navigation of rows of a selectable grid breaks after rerendering another datatable with selectionMode=none
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-8212
>                 URL: https://jira.jboss.org/jira/browse/RF-8212
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tables
>    Affects Versions: 3.3.1, 3.3.2.SR1, 3.3.3.BETA1
>         Environment: tomcat 6, facelets, RichFaces 3.3.1
>            Reporter: Ryan Yoder
>            Assignee: Andrey Markhel
>            Priority: Minor
>             Fix For: 3.3.3.CR1
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> The keyboard navigation of rows of a selectable grid breaks after rerendering another datatable with selectionMode=none.
> A selectable grid on the top of the pagehas an a4j:support event="onselectionchange" to reRender another grid below it that is showing details about the currently selected row in the upper grid.  The lower grid should have selectionmode="none" to produce this bug.
> The up/down arrows no longer work on the upper grid after the selection is changed and the lower grid reRenders.
> The problem lies in the following code:
> ExtendedDataTableSelection.js
> removeListeners: function() {
> Event.stopObserving(document, "keydown", this.eventKeyPress);
> The problem is that for the bottom grid, the this.eventKeyPress is null which has the effect of removing all keydown event listeners on the page, including the top grid's listener.
> Add an if statement before this line to fix the bug.  I have tested it and it works for me.
> removeListeners: function(){
> 		if(this.eventKeyPress)	{ // added if to ensure that all keydown event listeners are not removed
> 			Event.stopObserving(document, "keydown", this.eventKeyPress);
> 		}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list