[jira] Commented: (MYFACES-985) UIData with multihierarchical children inside produces NPE

2006-01-06 Thread Andrew Kharchenko (JIRA)
[ 
http://issues.apache.org/jira/browse/MYFACES-985?page=comments#action_12361953 
] 

Andrew Kharchenko  commented on MYFACES-985:


OK. Thanx for advice.

 UIData with multihierarchical children inside produces NPE
 --

  Key: MYFACES-985
  URL: http://issues.apache.org/jira/browse/MYFACES-985
  Project: MyFaces
 Type: Bug
   Components: Implementation
  Environment: Tomcat 5.0
 JDK 1.4
 Reporter: Andrew Kharchenko 
 Assignee: Mathias Broekelmann
  Attachments: UIData NPE Sample.rar

 I've found incorrect UIData behaviour under MyFaces which produces 
 NullPointerException on runtime and which works fine under Sun implementation.
 Here it is:
 I have a custom component which is extentor from UIInput. This component has 
 UIPanel extentor component as child which is added to children list of 
 UIInput component on rendering. 
 For one's turn, UIPanel extentor has one more UIInput extentor component as 
 child which is added to children list of UIPanel component on rendering.
 This component works fine standalone, but when it is added to UIData, I have 
 NPE on runtime. Here is the part of listing:
 java.lang.NullPointerException
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at javax.faces.component.UIData.setRowIndex(UIData.java:178)
 I will also attach sample component's classes, definitions and test page if 
 it will be granted after issue creation.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (MYFACES-985) UIData with multihierarchical children inside produces NPE

2006-01-05 Thread Andrew Kharchenko (JIRA)
[ 
http://issues.apache.org/jira/browse/MYFACES-985?page=comments#action_12361836 
] 

Andrew Kharchenko  commented on MYFACES-985:


I'm just trying to avoid multiple adding of the same children. OK, this is the 
way to check children presence in component tree and do not add it again. I'll 
try to implement my component in such way but still I'm not sure it will help.

 UIData with multihierarchical children inside produces NPE
 --

  Key: MYFACES-985
  URL: http://issues.apache.org/jira/browse/MYFACES-985
  Project: MyFaces
 Type: Bug
   Components: Implementation
  Environment: Tomcat 5.0
 JDK 1.4
 Reporter: Andrew Kharchenko 
 Assignee: Mathias Broekelmann
  Attachments: UIData NPE Sample.rar

 I've found incorrect UIData behaviour under MyFaces which produces 
 NullPointerException on runtime and which works fine under Sun implementation.
 Here it is:
 I have a custom component which is extentor from UIInput. This component has 
 UIPanel extentor component as child which is added to children list of 
 UIInput component on rendering. 
 For one's turn, UIPanel extentor has one more UIInput extentor component as 
 child which is added to children list of UIPanel component on rendering.
 This component works fine standalone, but when it is added to UIData, I have 
 NPE on runtime. Here is the part of listing:
 java.lang.NullPointerException
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at javax.faces.component.UIData.setRowIndex(UIData.java:178)
 I will also attach sample component's classes, definitions and test page if 
 it will be granted after issue creation.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (MYFACES-985) UIData with multihierarchical children inside produces NPE

2006-01-05 Thread Andrew Kharchenko (JIRA)
[ 
http://issues.apache.org/jira/browse/MYFACES-985?page=comments#action_12361838 
] 

Andrew Kharchenko  commented on MYFACES-985:


As I said, I've replaced this part of code in renderer:


for (Iterator iterator = children.iterator(); iterator.hasNext();) {
  UIComponent child = (UIComponent) iterator.next();
  if (child instanceof UIInputTestComponent) {
children.remove(child);
break;
  }
}
  UIInputTestComponent itc = (UIInputTestComponent) 
context.getApplication().createComponent(UIInputTestComponent.COMPONENT_TYPE);
  itc.setId(component.getId() + _id);
  itc.setNeedChildren(false);
  children.add(itc);


with this one: 



boolean isPresent = false;
for (Iterator iterator = children.iterator(); iterator.hasNext();) {
  UIComponent child = (UIComponent) iterator.next();
  if (child instanceof UIInputTestComponent) {
isPresent = true;
break;
  }
}
if (!isPresent) {
  UIInputTestComponent itc = (UIInputTestComponent) 
context.getApplication().createComponent(UIInputTestComponent.COMPONENT_TYPE);
  itc.setId(component.getId() + _id);
  itc.setNeedChildren(false);
  children.add(itc);
}


but it still has the same effect :(


 UIData with multihierarchical children inside produces NPE
 --

  Key: MYFACES-985
  URL: http://issues.apache.org/jira/browse/MYFACES-985
  Project: MyFaces
 Type: Bug
   Components: Implementation
  Environment: Tomcat 5.0
 JDK 1.4
 Reporter: Andrew Kharchenko 
 Assignee: Mathias Broekelmann
  Attachments: UIData NPE Sample.rar

 I've found incorrect UIData behaviour under MyFaces which produces 
 NullPointerException on runtime and which works fine under Sun implementation.
 Here it is:
 I have a custom component which is extentor from UIInput. This component has 
 UIPanel extentor component as child which is added to children list of 
 UIInput component on rendering. 
 For one's turn, UIPanel extentor has one more UIInput extentor component as 
 child which is added to children list of UIPanel component on rendering.
 This component works fine standalone, but when it is added to UIData, I have 
 NPE on runtime. Here is the part of listing:
 java.lang.NullPointerException
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at javax.faces.component.UIData.setRowIndex(UIData.java:178)
 I will also attach sample component's classes, definitions and test page if 
 it will be granted after issue creation.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (MYFACES-985) UIData with multihierarchical children inside produces NPE

2006-01-05 Thread Andrew Kharchenko (JIRA)
[ 
http://issues.apache.org/jira/browse/MYFACES-985?page=comments#action_12361845 
] 

Andrew Kharchenko  commented on MYFACES-985:


Do you mean in the component's constructor? Is it good style?

 UIData with multihierarchical children inside produces NPE
 --

  Key: MYFACES-985
  URL: http://issues.apache.org/jira/browse/MYFACES-985
  Project: MyFaces
 Type: Bug
   Components: Implementation
  Environment: Tomcat 5.0
 JDK 1.4
 Reporter: Andrew Kharchenko 
 Assignee: Mathias Broekelmann
  Attachments: UIData NPE Sample.rar

 I've found incorrect UIData behaviour under MyFaces which produces 
 NullPointerException on runtime and which works fine under Sun implementation.
 Here it is:
 I have a custom component which is extentor from UIInput. This component has 
 UIPanel extentor component as child which is added to children list of 
 UIInput component on rendering. 
 For one's turn, UIPanel extentor has one more UIInput extentor component as 
 child which is added to children list of UIPanel component on rendering.
 This component works fine standalone, but when it is added to UIData, I have 
 NPE on runtime. Here is the part of listing:
 java.lang.NullPointerException
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at javax.faces.component.UIData.setRowIndex(UIData.java:178)
 I will also attach sample component's classes, definitions and test page if 
 it will be granted after issue creation.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (MYFACES-985) UIData with multihierarchical children inside produces NPE

2006-01-05 Thread Andrew Kharchenko (JIRA)
[ 
http://issues.apache.org/jira/browse/MYFACES-985?page=comments#action_12361941 
] 

Andrew Kharchenko  commented on MYFACES-985:


Oh, just forgot. I want to notice again, that behaviour in the attached sample 
project works fine under Sun RI.

 UIData with multihierarchical children inside produces NPE
 --

  Key: MYFACES-985
  URL: http://issues.apache.org/jira/browse/MYFACES-985
  Project: MyFaces
 Type: Bug
   Components: Implementation
  Environment: Tomcat 5.0
 JDK 1.4
 Reporter: Andrew Kharchenko 
 Assignee: Mathias Broekelmann
  Attachments: UIData NPE Sample.rar

 I've found incorrect UIData behaviour under MyFaces which produces 
 NullPointerException on runtime and which works fine under Sun implementation.
 Here it is:
 I have a custom component which is extentor from UIInput. This component has 
 UIPanel extentor component as child which is added to children list of 
 UIInput component on rendering. 
 For one's turn, UIPanel extentor has one more UIInput extentor component as 
 child which is added to children list of UIPanel component on rendering.
 This component works fine standalone, but when it is added to UIData, I have 
 NPE on runtime. Here is the part of listing:
 java.lang.NullPointerException
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at javax.faces.component.UIData.setRowIndex(UIData.java:178)
 I will also attach sample component's classes, definitions and test page if 
 it will be granted after issue creation.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (MYFACES-985) UIData with multihierarchical children inside produces NPE

2006-01-05 Thread Andrew Kharchenko (JIRA)
[ 
http://issues.apache.org/jira/browse/MYFACES-985?page=comments#action_12361940 
] 

Andrew Kharchenko  commented on MYFACES-985:


Attached component is just a sample. The real component is a DateChooser which 
consists with text field, button and popup calendar. DateChooser is extended 
from UIInput and has popup panel (UIPanel extentor) as child. For one's turn, 
popup panel has Calendar (UIInput extentor) as child. That's all.

In addition, I've tried to move children addition to component's constructor 
from component's renderer and it helped. So, I think this request can be 
resolved. Thanx.

 UIData with multihierarchical children inside produces NPE
 --

  Key: MYFACES-985
  URL: http://issues.apache.org/jira/browse/MYFACES-985
  Project: MyFaces
 Type: Bug
   Components: Implementation
  Environment: Tomcat 5.0
 JDK 1.4
 Reporter: Andrew Kharchenko 
 Assignee: Mathias Broekelmann
  Attachments: UIData NPE Sample.rar

 I've found incorrect UIData behaviour under MyFaces which produces 
 NullPointerException on runtime and which works fine under Sun implementation.
 Here it is:
 I have a custom component which is extentor from UIInput. This component has 
 UIPanel extentor component as child which is added to children list of 
 UIInput component on rendering. 
 For one's turn, UIPanel extentor has one more UIInput extentor component as 
 child which is added to children list of UIPanel component on rendering.
 This component works fine standalone, but when it is added to UIData, I have 
 NPE on runtime. Here is the part of listing:
 java.lang.NullPointerException
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at javax.faces.component.UIData.setRowIndex(UIData.java:178)
 I will also attach sample component's classes, definitions and test page if 
 it will be granted after issue creation.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (MYFACES-985) UIData with multihierarchical children inside produces NPE

2005-12-29 Thread Andrew Kharchenko (JIRA)
UIData with multihierarchical children inside produces NPE
--

 Key: MYFACES-985
 URL: http://issues.apache.org/jira/browse/MYFACES-985
 Project: MyFaces
Type: Bug
  Components: Implementation  
 Environment: Tomcat 5.0
JDK 1.4
Reporter: Andrew Kharchenko 


I've found incorrect UIData behaviour under MyFaces which produces 
NullPointerException on runtime and which works fine under Sun implementation.

Here it is:

I have a custom component which is extentor from UIInput. This component has 
UIPanel extentor component as child which is added to children list of UIInput 
component on rendering. 
For one's turn, UIPanel extentor has one more UIInput extentor component as 
child which is added to children list of UIPanel component on rendering.

This component works fine standalone, but when it is added to UIData, I have 
NPE on runtime. Here is the part of listing:

java.lang.NullPointerException
 at 
javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
 at 
javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
 at 
javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
 at 
javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
 at javax.faces.component.UIData.setRowIndex(UIData.java:178)

I will also attach sample component's classes, definitions and test page if it 
will be granted after issue creation.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Updated: (MYFACES-985) UIData with multihierarchical children inside produces NPE

2005-12-29 Thread Andrew Kharchenko (JIRA)
 [ http://issues.apache.org/jira/browse/MYFACES-985?page=all ]

Andrew Kharchenko  updated MYFACES-985:
---

Attachment: UIData NPE Sample.rar

Herer is a sample components and test page included.

 UIData with multihierarchical children inside produces NPE
 --

  Key: MYFACES-985
  URL: http://issues.apache.org/jira/browse/MYFACES-985
  Project: MyFaces
 Type: Bug
   Components: Implementation
  Environment: Tomcat 5.0
 JDK 1.4
 Reporter: Andrew Kharchenko 
  Attachments: UIData NPE Sample.rar

 I've found incorrect UIData behaviour under MyFaces which produces 
 NullPointerException on runtime and which works fine under Sun implementation.
 Here it is:
 I have a custom component which is extentor from UIInput. This component has 
 UIPanel extentor component as child which is added to children list of 
 UIInput component on rendering. 
 For one's turn, UIPanel extentor has one more UIInput extentor component as 
 child which is added to children list of UIPanel component on rendering.
 This component works fine standalone, but when it is added to UIData, I have 
 NPE on runtime. Here is the part of listing:
 java.lang.NullPointerException
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:223)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at 
 javax.faces.component.UIData.restoreDescendantComponentStates(UIData.java:235)
  at javax.faces.component.UIData.setRowIndex(UIData.java:178)
 I will also attach sample component's classes, definitions and test page if 
 it will be granted after issue creation.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira