tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <antonio.petre...@gmail.com>
Subject Re: Issue with retrieving Tiles definitions in code
Date Tue, 09 Mar 2010 12:47:37 GMT
2010/3/9 Gallagher, Jim (UK Europe Middle East & Group Functions,
Technology Services) <Jim.Gallagher@rbs.co.uk>:
> This behaviour was available in Struts-Tiles, has it been removed from Tiles 2.0?

I think it was an unintended feature :-D

> The rules definition is, as you say, not designed to be rendered. It's purpose is to
hold a list of security roles  - these roles are processed programmatically and this decides
whether the user sees that menu item (or entire menu), based on their assigned role.

Tiles has a very basic role-based security: most of JSP tags
(insertTemplate, insertAttribute, insertDefinition) have a "role"
attribute, where you can put comma-separated list of enabled roles
(the user must be under at least one role).
These roles can be defined in XML files too.
If you need something more complicated, I think that your entry point
might be the DefinitionsFactory:
However I think that you should move your rules outside of Tiles and
load them separately.

If you have more questions on how to implement a DefinitionsFactory,
feel free to ask here.


P.S. I strongly suggest to migrate to, at least, Tiles 2.1.x: there
are new features (like wildcards, EL expressions) that can help
development a lot. Moreover, the API is cleaner.

View raw message