Re: [T4]Handling Nulls in OGNL expressions

2007-07-30 Thread Martino Piccinato
Hi, please take my words with a grain of salt because I've never used this in production but in my opiinon this should be the way to proceed: have a look at this tapestry configuration point: http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/config/tapestry.ognl.PropertyAccessors

Re: [T4]Handling Nulls in OGNL expressions

2007-07-30 Thread Marcos Chicote
I wouldn't mind implementing a hivemind service if I could solve the problem this way, but I don't know how to implement the behaviour that I want. I want exactly what you discribe happens in WebObjets: if at any point in the ognl chain a null object is invoked, the hole expression evaluates to nul

Re: [T4]Handling Nulls in OGNL expressions

2007-07-29 Thread Damien Uern
(Sorry for top posting, but everybody else seems to do it on this list) Anyway, the null pointer exception in a long property access chain was one of the issues I had with OGNL a while ago and have basically just learned to live with it. It is highly annoying. One of the things I preferred wit

Re: [T4]Handling Nulls in OGNL expressions

2007-07-27 Thread Martino Piccinato
In my opinion is all that you want is not having NullPointerException it would be better to implement MethodAccessor and/or PropertyAccessor, that would return null if the target object is null, then you could simply check expressions returning nulls and returning your message, or maybe have a spec

Re: [T4]Handling Nulls in OGNL expressions

2007-07-26 Thread Marcos Chicote
Responding to my own mail... I found an old Andreas mail to the lis ( http://mail-archives.apache.org/mod_mbox/tapestry-dev/200606.mbox/[EMAIL PROTECTED]) that explained how to do this. I'll sumarize my ideas so that I can check if they are correct and maybe it will result usefull to the next

Re: [T4]Handling Nulls in OGNL expressions

2007-07-26 Thread Marcos Chicote
Hi Andreas! When I emailed to Tapestry's list I was prototyping a project. Now I'm actually developing it and I'm very interested in getting this service working. Did you find some code where you used this feature? Thanks! Marcos On 6/29/07, Marcos Chicote <[EMAIL PROTECTED]> wrote: Thanks A

Re: [T4]Handling Nulls in OGNL expressions

2007-06-29 Thread Marcos Chicote
Thanks Andreas. I have to do some more reading then. I you have some code that I can use as an example I would be really grateful. Thanks! Marcos On 6/29/07, Andreas Andreou <[EMAIL PROTECTED]> wrote: O/H Marcos Chicote έγραψε: > Thanks Andreas. > Before mailing to this list, I tried looking

Re: [T4]Handling Nulls in OGNL expressions

2007-06-29 Thread Andreas Andreou
O/H Marcos Chicote έγραψε: > Thanks Andreas. > Before mailing to this list, I tried looking at the ognl documentation > and I > found the NullHandler interface but I wasn't sure how it worked with > Tapestry or if it was possible to do it another way without altering the > BOs. > > Correct me if I'

Re: [T4]Handling Nulls in OGNL expressions

2007-06-29 Thread Marcos Chicote
Thanks Andreas. Before mailing to this list, I tried looking at the ognl documentation and I found the NullHandler interface but I wasn't sure how it worked with Tapestry or if it was possible to do it another way without altering the BOs. Correct me if I'm wrong but what I understand is that Tap

Re: [T4]Handling Nulls in OGNL expressions

2007-06-29 Thread Andreas Andreou
http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/config/tapestry.ognl.NullHandlers.html the way it works, is that you associate implementations of http://www.ognl.org/2.6.9/Documentation/javadoc/ognl/NullHandler.html with class types whose methods (or properties) may return null

[T4]Handling Nulls in OGNL expressions

2007-06-29 Thread Marcos Chicote
Hi! I have a Table component (actually I have TableRows, TableView, and all those other components that form a Table) and one of the columns in TableView is declared like this: columnName:object1.object2.property. As you can see this can throw NullPointerException if either object1 or object2 are