myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ricotero cordoes (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TRINIDAD-1028) ChildPropertyTreeModel (javax.el.PropertyNotFoundException)
Date Wed, 23 Jun 2010 14:20:50 GMT

    [ https://issues.apache.org/jira/browse/TRINIDAD-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881702#action_12881702
] 

ricotero cordoes commented on TRINIDAD-1028:
--------------------------------------------

friend this working fine to me(sorry for the bad english).

I tink you need make a class call Person with the method getkids.

I am 2 classes, Person and Test, with a method getModel and a "TreeModel model; " attribute.


Remember this in Person 

 public String toString()
 {
     
     return this.getName();
     }

god luck

> ChildPropertyTreeModel (javax.el.PropertyNotFoundException)
> -----------------------------------------------------------
>
>                 Key: TRINIDAD-1028
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1028
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 1.2.7-core
>         Environment: Trinidad-1.2.7 and JSF1.2_08
>            Reporter: Jesper Pedersen
>
> When using the example from the JavaDoc in ChildPropertyTreeModel 
>  Person john = new Person("John Smith");
>  Person kim = new Person("Kim Smith");
>  Person tom = new Person("Tom Smith");
>  Person ira = new Person("Ira Wickrememsinghe");
>  Person mallika = new Person("Mallika Wickremesinghe");
>  
>  john.getKids().add(kim);
>  john.getKids().add(tom);
>  ira.getKids().add(mallika);
>  
>  // create the list of root nodes:
>  List people = new ArrayList();
>  people.add(john);
>  people.add(ira);
>  
>  TreeModel model = new ChildPropertyTreeModel(people, "kids");
> I get the following:
> 14:41:59,577 ERROR [STDERR] Mar 27, 2008 2:41:59 PM com.sun.facelets.FaceletViewHandler
handleRenderException
> SEVERE: Error Rendering View[/main.xhtml]
> javax.el.PropertyNotFoundException: Property 'kids' not readable on type java.util.List
>         at javax.el.BeanELResolver$BeanProperty.read(BeanELResolver.java:259)
>         at javax.el.BeanELResolver$BeanProperty.access$000(BeanELResolver.java:209)
>         at javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
>         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
>         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
>         at org.apache.myfaces.trinidad.model.SortableModel.__resolveProperty(SortableModel.java:462)
>         at org.apache.myfaces.trinidad.model.ChildPropertyTreeModel.getChildData(ChildPropertyTreeModel.java:343)
>         at org.apache.myfaces.trinidad.model.ChildPropertyTreeModel.isContainer(ChildPropertyTreeModel.java:218)
>         at org.apache.myfaces.trinidad.component.UIXHierarchy.isContainer(UIXHierarchy.java:117)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TreeRenderer._getExpandValue(TreeRenderer.java:929)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TreeRenderer._renderNode(TreeRenderer.java:687)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TreeRenderer._renderContent(TreeRenderer.java:190)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TreeRenderer.encodeAll(TreeRenderer.java:136)
>         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:224)
>         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:763)
>         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:527)
>         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:304)
>         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer.encodeChild(PanelGroupLayoutRenderer.java:188)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message