[
https://issues.apache.org/jira/browse/TAP5-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090230#comment-13090230
]
Denis Stepanov commented on TAP5-1615:
--------------------------------------
There is no workaround!
- null is converted to false
- unknown not null object is converted to a string by calling toString metod
and then string is converted to a boolean
ToString method is usually implemented for debug purposes and can be slow.
Use case is implementing a logic related to a case when object is a null or not.
Please accept the patch.
> Add not null check expression syntax
> ------------------------------------
>
> Key: TAP5-1615
> URL: https://issues.apache.org/jira/browse/TAP5-1615
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Denis Stepanov
> Priority: Minor
> Attachments: tapestry-notnull.patch
>
>
> New sytax will allow to check if expression result is not null
> value="prop?" - returns true if "prop" is not null
> value="prop.a.b.c?" returns true if "c" is not null
> value="prop?.a?.b?.c?" returns true if "c" is not null
> value="m()?" returns true if result of the method "m" is not null
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira