You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mathias Broekelmann (JIRA)" <in...@incubator.apache.org> on 2005/03/21 16:40:36 UTC

[jira] Created: (MYFACES-142) h:datatable with nested EditableValueHolder not working

h:datatable with nested EditableValueHolder not working
-------------------------------------------------------

         Key: MYFACES-142
         URL: http://issues.apache.org/jira/browse/MYFACES-142
     Project: MyFaces
        Type: Bug
    Versions: Nightly Build    
    Reporter: Mathias Broekelmann


This bug is only visible by using h:datatable with a EditableValueHolder in a column of the table. x:datatable is still working since the new implementation of UIData is overwritten in HtmlDataTableHack which still contains the old implementation (is that OK?).

There is a NullPointerException in Line 426 when the page is rendered for the first time. The EditableValueHolderState object state is null.

The bug can easily be reproduced by changing the x:datatable tag in countryTableForm.jsp to h:datatable tag (remove preserveDataModel attribute also)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-142) h:datatable with nested EditableValueHolder not working

Posted by "Mathias Broekelmann (JIRA)" <in...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-142?page=comments#action_61329 ]
     
Mathias Broekelmann commented on MYFACES-142:
---------------------------------------------

I´m not shure if that fixes the whole but I´ve tested the following patch with the myfaces-examples and our application - it seems to be working:

Index: UIData.java
===================================================================
RCS file: /home/cvspublic/incubator-myfaces/src/jsfapi/javax/faces/component/UIData.java,v
retrieving revision 1.29
diff -u -r1.29 UIData.java
--- UIData.java	16 Mar 2005 20:10:59 -0000	1.29
+++ UIData.java	21 Mar 2005 15:42:04 -0000
@@ -412,7 +412,7 @@
 					continue;
 				}
 
-				if (child instanceof EditableValueHolder)
+				if (!_firstTimeRendered && child instanceof EditableValueHolder)
 				{
 					EditableValueHolder childEVH = (EditableValueHolder) child;
 					Object state =
@@ -1110,7 +1110,7 @@
 		_rowState = (UIDataRowState) values[ROW_STATE_INDEX];
 
 		// restore state means component was already rendered at least once:
-		//        _firstTimeRendered = false;
+		_firstTimeRendered = false;
 	}
 
 	//------------------ GENERATED CODE BEGIN (do not modify!) --------------------


> h:datatable with nested EditableValueHolder not working
> -------------------------------------------------------
>
>          Key: MYFACES-142
>          URL: http://issues.apache.org/jira/browse/MYFACES-142
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mathias Broekelmann

>
> This bug is only visible by using h:datatable with a EditableValueHolder in a column of the table. x:datatable is still working since the new implementation of UIData is overwritten in HtmlDataTableHack which still contains the old implementation (is that OK?).
> There is a NullPointerException in Line 426 when the page is rendered for the first time. The EditableValueHolderState object state is null.
> The bug can easily be reproduced by changing the x:datatable tag in countryTableForm.jsp to h:datatable tag (remove preserveDataModel attribute also)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira