GitHub user noobymatze opened a pull request:
https://github.com/apache/wicket/pull/168
idea for lazy flatMap
I fixed the formatting and provided an idea for implementing flatMap in a
lazy fashion.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/noobymatze/wicket monad-model
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/wicket/pull/168.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #168
----
commit 095cb327c0b952bb734e1ce1bfa1da41abc69426
Author: Matthias Metzger <[email protected]>
Date: 2016-04-24T18:37:44Z
fix formatting in IModel
commit 4348962480949f61574a5172ca6b7f7749ddc5ff
Author: Matthias Metzger <[email protected]>
Date: 2016-04-24T18:42:40Z
implement idea for lazy flatMap in IModel
This approach has two problems though:
1. For every call of getObject, setObject and detach the whole
model chain will be evaluated again.
2. It's the same problem like with the implementation before.
When the setObject is called and any value in the retrieval
has been null, no object will be set, which is unlike the
PropertyModel, which would initialize any values being null.
commit 3719da912cea48e2a9f8ec4de4672379a93954de
Author: Matthias Metzger <[email protected]>
Date: 2016-04-24T18:58:58Z
fix wrong formatting
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---