Re: Access denied page

"Michael Nash JGlobal.com" <[email protected]> Fri, 9 Jul 2004 08:03:38 -0400
Newsgroups gmane.comp.java.keel.user
Organization JGlobal
Message-ID <20040709080338.5e847732@jglobal>
Nate:

> I know, Mike, that you mentioned that there was an onerror attribute that might
> be enabled in the latest CVS cut.  And this might solve this problem...
> 
> Is there a way to show a different page than the default Keel "Access is denied"
> page when someone tries to access a model that they don't have access to?  

Not sure if that will help that particular problem, as it's a SecurityException, and not an error in the model itself. What you can do, though is include a page in your app in the same relative location as the "Access Denied" page - this will override the default JSP page when you build the app. If you want to invoke a model instead we'd have to do something else.

> 
> Also could Mike or anyone give me a quick example of how I could use onerror?

Sure: When you configure your model in system.xconf, include a line like so: 

<onerror model="myapp.somemodel"/> 

This will check at the completion of the current model if there are any errors in the response. If so, it will transition to the "myapp.somemodel" (which is often the "prompt" model to ask the user to try again).

HTH!

Mike

> 
> Thank you, 
> Nate 
> 
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org


-- 
Michael Nash

JGlobal Ltd 
Next-Generation Web Application Development and Open Source Support
http://www.jglobal.com

Bahamas Commerce and Trade
Offshore eCommerce Hosting and Business Services
http://www.bahamascommerce.com