You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/06/07 14:22:00 UTC

[jira] [Commented] (TAP5-2728) EventContext enhancements

    [ https://issues.apache.org/jira/browse/TAP5-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551118#comment-17551118 ] 

ASF subversion and git services commented on TAP5-2728:
-------------------------------------------------------

Commit 44243eb039330bd7df15c5d7f0b1b87a9bd679be in tapestry-5's branch refs/heads/master from Ben Weidig
[ https://gitbox.apache.org/repos/asf?p=tapestry-5.git;h=44243eb03 ]

TAP5-2728: EventContext enhancements



> EventContext enhancements
> -------------------------
>
>                 Key: TAP5-2728
>                 URL: https://issues.apache.org/jira/browse/TAP5-2728
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.8.1
>            Reporter: Ben Weidig
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The EventContext is an essential tool for accessing event related data, but its functionality is quite limited.
> The most common use case -- accessing its data -- must be done in a try-catch-block.
> If multiple values are involved, the resulting code isn't that pretty.
> Adding Optional<T> tryGet(Class<T> desiredType, int index) would allow to access the values in a more lenient way and provide a bridge between a possible null value and the fluent/functional Optional API.
> Also, a boolean isEmpty() would cover another common use case with less and more speaking code.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)