Would it be possible to make the view selection algorithm pluggable, as a Strategy or something like that? Just a thought.
On Wed, Feb 19, 2003 at 05:59:34PM +0100, Rickard Öberg wrote: > Anders Engström wrote: > >That sounds resonable, when you put it that way. Am I correct in my > >assumption that you can return your own 'result' from an action - it > >doesn't have to be 'error', 'success' etc. to map the result > >string to a view? > > Yes, we just predefined a couple that seemed common. But you can return > anything, as long as you match 'em with corresponding view mappings. > Re-thinking this exception thing... I agree that WW should not select views based on exception class - but (from a web-front-end view) there should be a way for an application to present its own error page (with nice layout and perhaps an "email sysadmin button" on it :). In the current code-base when an exception is thrown in action.execute() a standard web-work page is rendered by ServletDispatcher. There is no (?) way to override this. It would be very useful if one could define an application error page in views.properties on-exception.view=error.jsp or an action-specific exception view HelloAction.on-exception.view=hello_error.jsp this view would receive the exception the normal way (provided the jsp "isErrorPage"). //Anders -- |===================================| | Anders Engström | | [EMAIL PROTECTED] | | http://www.gnejs.net | |===================================| |Your mind is like an umbrella. | |It doesn't work unless you open it.| | /Frank Zappa | |===================================| ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork