I just cleaned up this exception.

The problem here is that with an empty list, the Grid component
doesn't have the BeanModel it needs to render.

I think, in this case, it should be smart about not needing the
BeanModel because there are no rows to render.

The workaround is to provide the BeanModel explicitly.

On Jan 31, 2008 3:55 PM, Chuck Kring <[EMAIL PROTECTED]> wrote:
> I have an application that pulls data from a remote database and
> presents it in a Grid component.
> Sometimes the database is not available and my access method returns an
> empty arraylist.  This triggers a bad-looking exception in tapestry 5:
>
> > org.apache.tapestry.ioc.internal.util.TapestryException
> > Failure reading parameter model of component SelectRoom:grid: xxx --
> > no source to determine list type from
> >
> > location
> >     context:SelectRoom.tml, line 11, column 141
> >
> I understand the issue - Tapestry cannot determine how to format the row
> without a valid source object.  I do think the grid component's behavior
> is a bit harsh here.
>
> Any suggestions about how to a) avoid this or b) detect the condition
> and replace the grid component layout with an appropriate error message?
>
> Thanks!
>
>                                                                  Chuck
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to