tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gallagher, Jim \(UK Europe Middle East & Group Functions, Technology Services\)" <Jim.Gallag...@rbs.co.uk>
Subject RE: Issue with retrieving Tiles definitions in code
Date Wed, 10 Mar 2010 08:39:56 GMT

Thanks for all your help on this.

I've managed to fix it, using a rather inelegant approach of including the roles logic further
up the dependency chain for the definitions, rather than further down.

I understand your point about moving to Tiles 2.x, but we're using mandated codebases here,
and the standards people take a little while to certify releases for use!



Jim Gallagher,
Core Web Security,
Group Technology Solutions,
Royal Bank of Scotland,
Parkgate Business Park,
Parkgate Street,
Dublin 8.
RBS Depot Code: DUB

ITS: 			7-4171-7167
External:		+353-1-648 7167 
Internet mail: 	jim.gallagher@rbs.co.uk
P Please don't print this e-mail unless you really need to.

-----Original Message-----
From: Antonio Petrelli [mailto:antonio.petrelli@gmail.com] 
Sent: 09 March 2010 12:48
To: users@tiles.apache.org
Subject: Re: Issue with retrieving Tiles definitions in code

2010/3/9 Gallagher, Jim (UK Europe Middle East & Group Functions, Technology Services)
> 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.
*** WARNING : This message originates from the Internet ***

The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St
Andrew Square, Edinburgh EH2 2YB

Authorised and regulated by the Financial Services Authority.

This e-mail message is confidential and for use by the addressee only. If the message is received
by anyone other than the addressee, please return the message to the sender by replying to
it and then delete the message from your computer. Internet e-mails are not necessarily secure.
The Royal Bank of Scotland plc does not accept responsibility for changes made to this message
after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the
responsibility of the recipient to ensure that the onward transmission, opening or use of
this message and any attachments will not adversely affect its systems or data. No responsibility
is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.

View raw message