tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BR Brett Ryan (3456)" <Brett.R...@johnsands.com.au>
Subject Re: MenuItem EL rendering
Date Mon, 15 Jun 2015 08:17:01 GMT
Pull request now submitted, sorry for all the emails.

My implementation now requires the implementor to return a value which is to be used as the
replacement. It can be any value or as I've done in the SimpleMenuItem implementation return
a copy of itself with the expressions resolved.

It would be beneficial for the attribute classes to be immutable as they would not be thread

I have one question, because I could not figure it out. How do attributes added to a list
attribute get evaluated? I could not find anything that processes the contents of list attributes
themselves. Interestingly it does work however.

There's probably some extra tests that could be added, namely what happens when the model
changes, the tests do show that indeed attribute expansion works, but do not show what happens
when the variable values themselves change on subsequent requests. This could be something
to look at when we reevaluate the tests.

I'm happy to work on the tests if you like and might start work on first merging them to their
higher occurrences.

Note, I've only updated TILES_3_0_X, if you're happy I'll merge this back to trunk.

> On 15 Jun 2015, at 12:44, Brett Ryan <brett.ryan@johnsands.com.au> wrote:
> I've just been doing further testing and only just realised that the instances created
are actually singletons, I thought they were created per request. So once the values are updated
they won't change again.
> I need to rethink what I've done and get back to you.
>> On 12 Jun 2015, at 18:47, mck <mck@apache.org> wrote:
>>> Alrighty, I've implemented the support just the way I want it, and
>>> wondered if I could contribute it back.
>>> What I've done is created a new interface (ExpressionAware) which
>>> provides the following method:
>>>  void evaluateExpressions(AttributeEvaluator, Request)
>>> This is then called from AbstractAttributeEvaluator.evaluate(Attribute,
>>> Request) which then allows the implementor to update expression values or
>>> do set new properties etc. I've implemented this in the MenuItem class to
>>> replace its values when called.
>> Fantastic!
>> I'm not seeing the patch. But could you anyhow create a jira ticket and
>> upload the patch to it.
>> I can review it there and we can continue the ongoing development
>> discussion on the ticket.
>> Feel free to create a separate ticket to for optimising the evaluation
>> tests back to tiles-core, sounds like a good idea.
>> ~mck

View raw message