You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jonathan O'Connor <ni...@eircom.net> on 2009/01/23 18:24:02 UTC

NPE when adding sortable property to model without Conduit

Hi,
I was adding a property to a model, and I set the PropertyConduit to 
null. Then when the grid was rendering I got a big long exception stack 
trace starting with an NPE:

    * org.apache.tapestry5.internal.grid.CollectionGridDataSource$2.compare(CollectionGridDataSource.java:78)
    * org.apache.tapestry5.internal.grid.CollectionGridDataSource$3.compare(CollectionGridDataSource.java:91)
    * java.util.Arrays.mergeSort(Arrays.java:1270)
    * java.util.Arrays.mergeSort(Arrays.java:1281)
    * java.util.Arrays.sort(Arrays.java:1210)
    * java.util.Collections.sort(Collections.java:159)
    * org.apache.tapestry5.internal.grid.CollectionGridDataSource.prepare(CollectionGridDataSource.java:97)
    * org.apache.tapestry5.corelib.components.Grid$CachingDataSource.prepare(Grid.java:333)
    * org.apache.tapestry5.corelib.components.Grid.setupDataSource(Grid.java:503)
    * org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java:468)
    * org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java)
    * org.apache.tapestry5.internal.structure.ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:495)
    * org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:917)
      ETC...

It took me awhile to figure out my problem, so I would like a nicer 
exception thrown in CollectionGridDataSource.prepare if the conduit is 
null, I want to see the name of the property causing the problem.

Should I add a issue to JIRA about this?
Ciao,
Jonathan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org