Have you consider wrapping your component 
'creationDateFormat' with an If component - so that
the date is only rendered if it is not null ?

There might be a drawback with the above approach. The
default sorting on your date column might not work.
 
Shing


--- Manuel Thurn <[EMAIL PROTECTED]> wrote:

> Hi!
> 
>  
> 
> For a project I want to display a list of objects in
> an html table. I'm
> using the Table component of the contrib library of
> Tapestry. One column
> should show a formatted Date (or Calendar) object.
> It works fine as long as
> the Date is not null. But if the database contains
> objects with null values
> I get the following Exception:
> 
>  
> 
> Unable to read OGNL expression.:  source is null for
> getProperty(null,
> "tableRow")
> 
>  
> 
> Here is a snippet of the .page file. creationDate is
> a Calendar object. To
> format it I get the Date with getTime() and use the
> format parameter of the
> Insert component.
> 
>  
> 
> <component id="campaignTable" type="Contrib:Table">
> 
> <binding name="source" value="dataItems"/>
> 
> <binding name="columns" value="literal:name,
> description, creationDate"/>
> 
> </component>
> 
>  
> 
> <component id="creationDateFormat" type="Insert">
> 
> <binding name="value"
>
value="components.table.tableRow.creationDate.time"/>
> 
> <binding name="format" value="dateFormat"/>
> 
> </component>
> 
>  
> 
> I would be happy if you could help me find a way to
> handle this exception.
> 
>  
> 
> Thanks,
> 
>  
> 
> Manuel
> 
>  
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


                
___________________________________________________________ 
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The 
Wall Street Journal 
http://uk.docs.yahoo.com/nowyoucan.html

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

Reply via email to