[
https://issues.apache.org/jira/browse/TAPESTRY-2736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778731#action_12778731
]
Greg Woolsey commented on TAPESTRY-2736:
----------------------------------------
I believe I've seen this, didn't realize it was a bug, and found a workaround
(thought I just didn't understand what OGNL was meant to do in these cases).
I found if I prefix a problematic method call with
(#this)
so instead of:
content.domain[sharedPickerProperty]
you have:
content.domain[(#this).sharedPickerProperty]
it uses the current value instead of the initial value on each call. I think
the bug is still valid, it should notice changes to these properties, but using
the above construct to force dynamic evaluation works for me in several complex
scenarios, including a custom Contrib:Table interface implementation, where I
use something like this in custom expression column classes to evaluate things
like title attribute values on a cell by cell basis.
> Ognl doesn't evaluate dynamic expressions correctly
> ---------------------------------------------------
>
> Key: TAPESTRY-2736
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2736
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.1.6
> Environment: java 1.5, tomcat 5.5
> Reporter: howard kelsey
> Priority: Critical
> Attachments: ognlTestCase.tar.gz
>
>
> Ognl doesn't evaluate dynamic expressions correctly anymore.
> For instance if you have the ognl expression
> content.domain[sharedPickerProperty] where sharedPickerProperty is a property
> of the page that is updated during a For loop the value returned is always
> that of content.domain.'first value of sharedPickerProperty'. This used to
> work in tapestry 4.0.x.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.