2016-09-06 23:21 GMT+02:00 Ken McWilliams <[email protected]>:
> It's been some time but I'm pretty sure I was able to access the ValueStack
> from within tiles definitions using the OGNL prefix. I didn't do any I18N
> stuff from it...
>
> Taking a look at WW-4685, the request makes sense but it does not entirely
> remove the need to tiles internationalization. In the case of right to left
> languages it isn't just a matter of replacing bits of text but there could
> be good reason to use a different layout entirely. Anyways with WW-4685
> implemented it would be better all round.
>
> I have a feeling that the use-case in WW-4685 could be made to work along
> the lines of: "OGNL:magicAccessor(''home.title)"
>
> This is from memory and it was quite some time ago, if the current
> struts2-tiles plugin does not allow for the OGNL EL prefix in tiles then
> this is really a must.

It is supported but I don't know how to construct an expression as the
Root is set to Tiles' JspRequest, so maybe it is possible to access
Struts' ValueStack but I don't know how.

> If the resource bundles are searched first, there could be name collisions?
> Perhaps each prefix should just do one thing? "OGNL:" for value stack and
> "I18N:" for the resource bundles?

I thought about the same, what if I define two prefixes:
- S2 to access values on ValueStack, e.g. S2:propertyOnAction
- I18N to resolve expression as a key from resource bundles, e.g.
I18N:key.from.bundle


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to