Murray Collingwood wrote:

I could use a <logic:greaterThan...> tag to test the value of the security number and then display the link if appropriate. This gets more complicated when the security number 3 is used, as then I have to test values on the record as well, suddenly I have nested <logic:..> tags and the page is starting to look a lot more complicated than it should. The other problem with this approach is: "whether a user can update a record or not" is a business logic decision and shouldn't be in the interface.

Now, to complicate it even further, security number 2 is allowed to update records but uses a different form, in other words, they are only allowed to update certain values on the record. Hence I have to vary the link generated in some instances.
If the pages are radically different then perhaps you could use completely different presentations based on a user's access level--rather than passing a different result set to the page, generating different links, etc. you could just send them to an entirely different JSP.

I've found that once my page logic goes beyond a simple "show this chunk or don't" it's been easier (not always cleaner, I suppose) to have completely separate pages altogether. That said, I've only rarely had to go that far: usually passing a different collection in to the JSP, setting a true/false to choose between two links, etc. has been enough.

I'm interested in how other folks have dealt with similar issues.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to