tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Folke Behrens (JIRA)" <j...@apache.org>
Subject [jira] Created: (TAP5-497) When traversing a property path a null should be handled more gracefully
Date Wed, 04 Feb 2009 15:45:59 GMT
When traversing a property path a null should be handled more gracefully
------------------------------------------------------------------------

                 Key: TAP5-497
                 URL: https://issues.apache.org/jira/browse/TAP5-497
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.0.18
            Reporter: Folke Behrens


It would be nice if no NullPointerException is thrown if a parent property is null.

E.g. When the value of "user.status.flag" is resolved and the "user" property or the "status"
sub-property is null then an NPE is thrown. Here it would be nice if there's a way to say
that it's ok to just return null and not the value of "flag". I think OGNL solves this by
allowing a question mark instead of period in the property path: "user?status?flag", ugly
but very convenient.

This is especially useful with embedded entities (JPA) and Hibernate. Hibernate sets embedded
entities to null if all their properties are null in the database.

-- 
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