On Wed, 30 Jul 2014 12:05:13 -0300, Stephan Windmüller
wrote:
It worked! Thank you very very much!
Yay! Never done that myself. :p
I had to extend AbstractBinding though, because LiteralBinding stores
fixed values which are never altered.
Good catch. :)
Currently I am passing both Mes
On 30.07.2014, Thiago H de Paula Figueiredo wrote:
So, if you don't override this method, AbstractBinding subclasses are
invariant and values get cached for performance.
Create a VariantLiteralBinding subclass that overrides isInvariant() to
return false, use instead of LiteralBinding and I gue
On Wed, 30 Jul 2014 10:42:39 -0300, Stephan Windmüller
wrote:
Injecting the service in onActivate and setting the value does not
work.
Define "does not work". Did you debug your binding factory?
Yes, and it seems that "newBinding" is only called once for each
location and the value is c
Am 30.07.2014 um 15:18 schrieb Thiago H de Paula Figueiredo:
Don't forget productService must be a perthread service. Otherwise, any
request for the current product will set it for all others and a mess will
arise.
I can imagine that. ;)
To prevent this, I added "@Scope(ScopeConstants.PERTHRE
On Wed, 30 Jul 2014 10:02:55 -0300, Stephan Windmüller
wrote:
And here is my problem: The current product is selected based on the
activation context. How can I modify the service based on the values of
the context?
@Inject
private ProductService productService;
void onActivate(...) {
Am 30.07.2014 um 14:14 schrieb Thiago H de Paula Figueiredo:
Why don't you create your own 'productmessage' binding so you can write
${productmessage:title} and have it treated like you wrote
messages.get("title")?
That looks really promising, thank you for the detailed explanation!
Here's a
On Wed, 30 Jul 2014 07:45:20 -0300, Stephan Windmüller
wrote:
Hello,
Hi!
in our Tapestry application we have several product lines which require
a different wording on the pages. My first thought was to provide my own
implementation of the Messages service and set the product line in
Hello,
in our Tapestry application we have several product lines which require
a different wording on the pages. My first thought was to provide my own
implementation of the Messages service and set the product line in the
Java Code with something like
messages.setProductLine(Product