You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Roman Mertyn (JIRA)" <ji...@apache.org> on 2017/05/22 15:02:04 UTC

[jira] [Created] (TAP5-2583) Extending expression language with "default"-option

Roman Mertyn created TAP5-2583:
----------------------------------

             Summary: Extending expression language with "default"-option
                 Key: TAP5-2583
                 URL: https://issues.apache.org/jira/browse/TAP5-2583
             Project: Tapestry 5
          Issue Type: Request
          Components: tapestry-core
            Reporter: Roman Mertyn
            Priority: Minor


Aktually value of expression "user?.name" will by dropped if instance of user is null. 

Any chance to extend this expression with default ( or alternative)  value? 

Suggestion: 
${user?.name| 'Unknown user'} will be evaluated to user's name for existing user or "Unknown user" text elsewhere. 

Same here:
${user?.group?.name| 'No Group or User'} will be evaluated to "'No Group or User" if user or user.getGroup() evaluates to NULL.





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)