[richfaces-issues] [JBoss JIRA] Updated: (RF-8263) RichFaces ScrollableDateTable doenst clean the selection correctly when Data Model changes, in a SEAM CONVERSATION ENVIRONMENT.

Javier Quirante (JIRA) jira-events at lists.jboss.org
Thu Jan 14 06:40:30 EST 2010


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

Javier Quirante updated RF-8263:
--------------------------------

    Description: 
I have an ScrollableDataTable that is opened in a Modal Panel (it is in the same xhtml, both the page that shows the scrollableDataTable and the scrollableDataTable itself).

The fist time I search in the table is all right. I select for instance THE FIRST item , the Modal Panel hides, and the Object list is cleaned.

Its return to the same without the modal panel and the item selected.

The second time I back to the dateTable i make a new search and when the results are shown: the FIRST element is ALREADY SELECTED.


It seems the JSF tree doesn´t refresh correctly. This problem wouldn´t occur if the scrollableDataTable were in another page or in the modal Panel is called with
a GET button.

So my solution is, when i clean the data Model also clean the component ScrollableDataTable on the JSF Tree and the selecion model of richfaces:

org.richfaces.model.selection.SimpleSelection ss = (org.richfaces.model.selection.SimpleSelection) seleccionBusqueda ;
ss.clear();
facesManagerBean.limpiarSelectionRichScrollableTable();

where the method limpiarSelectionRichScrollableTable is 

	public void limpiarSelectionRichScrollableTable(){
		log.debug("Entra en limpiarSelectionRichScrollableTable: ");
    	this.cleanSelectionRichScrollableTable(FacesContext.getCurrentInstance().getViewRoot());
	}
	
	public void cleanSelectionRichScrollableTable(UIComponent root) {
		log.debug("Entra en cleanSelectionRichScrollableTable: " + root.getId());
	     for (UIComponent component : root.getChildren()) {
	         if (component instanceof HtmlScrollableDataTable) {
	        	 HtmlScrollableDataTable valueHolder = (HtmlScrollableDataTable)component;
	        	 root.getChildren().remove(valueHolder);
	         }
	         cleanSelectionRichScrollableTable(component);
	     }
	}


But I think that this, should be done by the component itself when the data model changes. Something you can do?
Thanks in advance.

  was:
I have an ScrollableDataTable that is opened in a Modal Panel (it is in the same xhtml, both the page that shows the scrollableDataTable and the scrollableDataTable itself).

The fist time I search in the table is all right. I select for instance THE FIRST item , the Modal Panel hides, and the Object list is cleaned.

Its return to the same without the modal panel and the item selected.

The second time I back to the dateTable i make a new search and when the results are shown: the FIRST element is ALREADY SELECTED.
At least appears in bold type.

It seems the JSF tree doesn´t refresh correctly. This problem wouldn´t occur if the scrollableDataTable were in another page or in the modal Panel is called with
a GET button.

So my solution is, when i clean the data Model also clean the component ScrollableDataTable on the JSF Tree:


	public void limpiarSelectionRichScrollableTable(){
		log.debug("Entra en limpiarSelectionRichScrollableTable: ");
    	this.cleanSelectionRichScrollableTable(FacesContext.getCurrentInstance().getViewRoot());
	}
	
	public void cleanSelectionRichScrollableTable(UIComponent root) {
		log.debug("Entra en cleanSelectionRichScrollableTable: " + root.getId());
	     for (UIComponent component : root.getChildren()) {
	         if (component instanceof HtmlScrollableDataTable) {
	        	 HtmlScrollableDataTable valueHolder = (HtmlScrollableDataTable)component;
	        	 root.getChildren().remove(valueHolder);
	         }
	         cleanSelectionRichScrollableTable(component);
	     }
	}


But I think that this, should be done by the component itself when the data model changes. In fact the background row is not not coloured only appears in bold style letter.
Something you can do?
Thanks in advance.



> RichFaces ScrollableDateTable doenst clean the selection correctly when Data Model changes, in a SEAM CONVERSATION ENVIRONMENT.
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-8263
>                 URL: https://jira.jboss.org/jira/browse/RF-8263
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-ScrollableDataTable
>    Affects Versions: 3.3.1
>         Environment: jsf-api-1.2_13 jboss-seam-2.1.1
>            Reporter: Javier Quirante
>            Priority: Minor
>
> I have an ScrollableDataTable that is opened in a Modal Panel (it is in the same xhtml, both the page that shows the scrollableDataTable and the scrollableDataTable itself).
> The fist time I search in the table is all right. I select for instance THE FIRST item , the Modal Panel hides, and the Object list is cleaned.
> Its return to the same without the modal panel and the item selected.
> The second time I back to the dateTable i make a new search and when the results are shown: the FIRST element is ALREADY SELECTED.
> It seems the JSF tree doesn´t refresh correctly. This problem wouldn´t occur if the scrollableDataTable were in another page or in the modal Panel is called with
> a GET button.
> So my solution is, when i clean the data Model also clean the component ScrollableDataTable on the JSF Tree and the selecion model of richfaces:
> org.richfaces.model.selection.SimpleSelection ss = (org.richfaces.model.selection.SimpleSelection) seleccionBusqueda ;
> ss.clear();
> facesManagerBean.limpiarSelectionRichScrollableTable();
> where the method limpiarSelectionRichScrollableTable is 
> 	public void limpiarSelectionRichScrollableTable(){
> 		log.debug("Entra en limpiarSelectionRichScrollableTable: ");
>     	this.cleanSelectionRichScrollableTable(FacesContext.getCurrentInstance().getViewRoot());
> 	}
> 	
> 	public void cleanSelectionRichScrollableTable(UIComponent root) {
> 		log.debug("Entra en cleanSelectionRichScrollableTable: " + root.getId());
> 	     for (UIComponent component : root.getChildren()) {
> 	         if (component instanceof HtmlScrollableDataTable) {
> 	        	 HtmlScrollableDataTable valueHolder = (HtmlScrollableDataTable)component;
> 	        	 root.getChildren().remove(valueHolder);
> 	         }
> 	         cleanSelectionRichScrollableTable(component);
> 	     }
> 	}
> But I think that this, should be done by the component itself when the data model changes. Something you can do?
> Thanks in advance.

-- 
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